 | reply to scrotos
Re: [ActionTec] GT724WGR - Mapping multiple WAN IPs to my LANThanks to a very smart pal of mine, this should work for my purposes:
telnet into the router, in my case:
telnet 10.0.0.1
Then, type the following commands:
ifconfig nas0:1 x.x.110.163 netmask 255.255.255.0 iptables -t nat -A PREROUTING -i nas0 -d x.x.110.163 -j DNAT --to-destination 10.0.0.3
First line adds an additional external IP to nas. The second line does a 1:1 NAT of that IP to whatever internal IP I wanted. To confirm that it took, you can check with the following:
iptables -t nat -L -v -n --line-numbers
Though it line-wraps badly, just copy the whole thing into Notepad and you should get something that looks like this:
# iptables -t nat -L -v -n --line-numbers Chain PREROUTING (policy ACCEPT 572K packets, 47M bytes) num pkts bytes target prot opt in out source destination 1 203 12612 DNAT all -- nas0 * 0.0.0.0/0 x.x.110.163 to:10.0.0.3
Also, bear in mind that currently if you power cycle, all these changes will be lost. I think you need to edit the /etc/init.d/rcS file, but the filesystem is mounted as read-only. And if I remount it as read-write, I still get a permission error. Else I would cp rcS rcS.bak and then do a cat to add these lines to the end.
So I guess that's a to-do for me. And of course, the web interface will not show any of this routing or the additional IP you added, so don't worry about that. When I added the ip to nas0:1, I momentarily lost connection, but it popped back up in a second. |