QUOTE(rockets @ May 13 2009, 11:24 AM)
question about this script:
/usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.1.0/24 -j MASQUERADE
ip addr add 192.168.1.2/24 dev vlan1 brd +
my modem's IP is 10.0.0.1, so...
/usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 10.0.0.0/24 -j MASQUERADE
ip addr add 10.0.0.2/24 dev vlan1 brd +
correct? used to be able to get it to work on my old modem, never got it to work on my new one.
i think u should check what subnet mask for your modem is.
if 255.255.255.0, the mask bits value is /24
if 255.0.0.0, mask bits should be /8
let say ur modem ip is 10.0.0.1 and subnet 255.0.0.0,
so the script should be:
/usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 10.0.0.0/8 -j MASQUERADE
ip addr add 10.0.0.2/8 dev vlan1 brd +
one more thing, enable dhcp in the modem and make sure router ip is not same class as modem.
ur router should be using 192.168.x.x and not 10.x.x.x
This post has been edited by leopardus: May 14 2009, 08:45 AM