[TriLUG] SOLVED: OpenWRT/IPTables Question

Randy Barlow randy at electronsweatshop.com
Sat Apr 28 15:46:07 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Randy Barlow wrote:
> Hi Triluggers!  I've recently set up an OpenWRT router, and let's just say
> that I'm pretty much a total noob at iptables as well as the OpenWRT.  I
> wanted to set up port forwarding for various ports, so I did something
> like the following for each:
> 
> iptables -t nat -A prerouting_wan -p tcp --dport 80 -j DNAT --to
> 192.168.1.135:8
> iptables        -A forwarding_wan -p tcp --dport 80 -d 192.168.1.135 -j
> ACCEPT
> 
> Now these rules seem to work just fine if you are on the outside network,
> but on my network the ports don't get forwarded.  So I'm thinking maybe I
> need two more rules similar to the above but change the "wan" part to
> "lan" maybe?  Does that sound like what I should do?

I found a forum post that helped me figure this out at:
http://forum.openwrt.org/viewtopic.php?id=7716 for anyone who has this
question in the future :)  I still don't understand this stuff at all,
but hey, I have a working system.  Time to go and read iptables docs I
suppose!

R
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGM6R+7So1xaF/eR8RAlo6AJ0fZ0XHn+X5vREGVVEoh7wGJvjqSQCbByS8
mir5Dm49FFD94uDMUEoWr6A=
=JLAB
-----END PGP SIGNATURE-----



More information about the TriLUG mailing list