MODEMIP=192.168.100.1
MODEM_NET=`echo $MODEMIP | cut -d "." -f 1-3`
ROUTER_WAN_PORT_IP=192.168.100.2
WAN_PORT=eth0.2
ifconfig $WAN_PORT $ROUTER_WAN_PORT_IP netmask 255.255.255.0 broadcast $MODEM_NET.255
iptables -A forwarding_rule -d $MODEMIP -j ACCEPT
iptables -t nat -A postrouting_rule -d $MODEMIP -o $WAN_PORT -j MASQUERADE
|