>>>>> "Jeremy" == Jeremy Visser <[email protected]> writes:

Jeremy> Okay, so, I have a Linksys WRT54G running OpenWrt, serving as
Jeremy> the Internet router for our home. You know the drill — NAT,
Jeremy> PPPoE, whatever.

Yup, same as I have....

Jeremy> Router's LAN IP address is 192.168.0.1. Several port forwards
Jeremy> are in place (y'know — SSH, HTTP, SMTP, IMAP, and whatnot)
Jeremy> that are already working beautifully.


Jeremy> I'm also wanting to forward TCP port 1240 on the WAN side to
Jeremy> port 80 on my box, 192.168.0.23, for running a test web
Jeremy> server. (Oh, if only I could give non-technical people a link
Jeremy> to my IPv6 address instead.)


Jeremy> So here's the OpenWrt config I use to do this. Should look
Jeremy> sane, even if you've not used OpenWrt before:

Jeremy> config 'redirect' option 'src' 'wan' option 'proto' 'tcp'
Jeremy> option 'src_dport' '1240' option 'dest_ip' '192.168.0.23'
Jeremy> option 'dest_port' '80'

This looks good.

Jeremy> And when you run `/etc/init.d/firewall restart`, it generates
Jeremy> the following iptables rule as a result:

Jeremy> r...@openwrt:~# iptables -t nat -L | grep 1240 DNAT tcp --
Jeremy> anywhere anywhere tcp dpt:1240 to:192.168.0.23:80

Jeremy> Which all worked fine for a week or two. But then for some
Jeremy> mysterious reason, when I try and access port 1240 from the
Jeremy> WAN side, it started to send traffic to port 95 on my LAN
Jeremy> side! (Despite iptables still reporting port 80.)

See if there's another iptables rule redirecting output port 80 to
somewhere else.  

I'm using white russian in almost exactly this config, and it's all
working for me.


Peter C
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to