Friday, September 2, 2011

OpenWRT tidbits

Access bridged modem, add to /etc/firewall.user

MODEM_IP="192.168.1.1"
VLAN_IP="192.168.1.10"

#Works for backfire WRT54GS
ifconfig eth0.1 $VLAN_IP netmask 255.255.255.0
iptables -A forwarding_rule -d $MODEM_IP -j ACCEPT
iptables -t nat -A POSTROUTING -d $MODEM_IP -j MASQUERADE

#Works for trunk tp-link wr841nd v7.2
#ifconfig eth1 $VLAN_IP netmask 255.255.255.0
#iptables -A forwarding_rule -d $MODEM_IP -j ACCEPT
#iptables -t nat -A POSTROUTING -d $MODEM_IP -j MASQUERADE

IPv6 with internode production, in /etc/config/dhcp6c
set both instances of SLA_LEN to 8