[TriLUG] OpenWRT/IPTables Question

Randy Barlow randy at electronsweatshop.com
Sat Apr 28 13:05:49 EDT 2007


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?

-- 
Randy Barlow
http://www.electronsweatshop.com
"Oh me of little faith..."



More information about the TriLUG mailing list