Posted: Mon Mar 07, 2011 7:32 Post subject: Not a port forward problem but loopback NAT doesn't work
I have a Netgear WNR834B and used to have an older build (more than a year ago, mini) and decided to upgrade to the latest (build 16214 mini). I've a dyndns account and been using it flawlessly since this update. The thing is, the loopback port forwarding seems to be broken after the update. I mean I cannot connect to my local net servers thru dyndns address (which resolves to my external IP). I haven't tried but I'm sure it would work from outside of my network.
I looked for a similar problem in the forums with no avail. Is there any way I can use my dyndns address to access my local services or should I switch back to the old build
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
You're over-complicating it a bit. Iptables will calculate the network address using the supplied IP/netmask without you having to do any extra work.
kt_haddock wrote:
Can't you do like this:
Code:
LANIP=`nvram get lan_ipaddr`/`nvram get lan_netmask`
set ${LANIP//./ }
iptables -t nat -I POSTROUTING -o br0 -s $1.$2.$3.0 -d $1.$2.$3.0 -j MASQUERADE
OR
Code:
LAN=`nvram get lan_ipaddr`/`nvram get lan_netmask`
iptables -t nat -I POSTROUTING -o br0 -s $LAN -d $LAN -j MASQUERADE
Not the first one but yes to the second one.
Please just see the bug ticket for all the info you need.
http://svn.dd-wrt.com:8000/ticket/1868 _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
I just tested it.
It's syntactically incorrect (the LAN-address is not a network address), but this gets corrected by the tool iptables.
Yours is actually better as it also works with a different subnetmask.
Code:
LAN=`nvram get lan_ipaddr`/`nvram get lan_netmask`
iptables -t nat -I POSTROUTING -o br0 -s $LAN -d $LAN -j MASQUERADE
The other example with 'set ${LANIP//./ }' is incorrect. _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge