dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
21
share rss forum feed

jza80

join:2005-10-29
Sacramento, CA
reply to nikster

Re: [Tomato] WRT54GL Tomato - How Do I Access the DSL Modem?

I suggest assigning the modem an IP address on a different subnet then the WRT54GL. Example: 192.168.25.1.

To access the modem, you need to use iptables. Login to the WRT and goto administration --> scripts --> firewall. Copy and paste the commands below into the window, then click save.

iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.25.0/30 -j MASQUERADE
ip addr add 192.168.25.2/30 dev vlan1 brd +


nikster

join:2007-12-20

1 recommendation

said by jza80:

I suggest assigning the modem an IP address on a different subnet then the WRT54GL. Example: 192.168.25.1.

To access the modem, you need to use iptables. Login to the WRT and goto administration --> scripts --> firewall. Copy and paste the commands below into the window, then click save.

iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.25.0/30 -j MASQUERADE
ip addr add 192.168.25.2/30 dev vlan1 brd +
Thanks that worked! Magic! Is there documentation for the above commands? I would like to know more in case I need to troubleshoot things.

One minor hiccup: I had to restart the WRT along the way. Without restart, the change would just not work.
Apparently the routing table change requires a restart even though the WRT doesn't say that explicitly. May have to do with the special nature of this change, I am sure not all routing table changes require a full restart.

jza80

join:2005-10-29
Sacramento, CA

Google iptables for documentation on the commands.

I found the commands on another forum (HyperWRT) and simply changed the IPs (192.168.0.0/30 and 192.168.0.2/30). My modem is on 192.168.0.1.

As for having to restart the WRT, I guess it needs to restart to load the changes made to the firewall script.