NAT from eth0:0 port 80 to lo port 8080?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




I'm stumped.

We have a CentOS 4.4 box with something like the following IPs:
eth0: 64.61.61.100
eth0:0 64.61.61.112
eth1: 10.0.0.100
lo: 127.0.0.1 (of course)

We want requests to 64.61.61.112:80 to be NAT'ed to 127.0.0.1:8080.

This seems like it should be really simple -- maybe the following? -- I've tried variants combining this rule with a POSTROUTING rule, tried dnat, snat, etc. -- but no luck.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING  -i eth0 -p tcp -m tcp -d 64.61.61.112 --dport 80 -j DNAT --to-destination 127.0.0.1:8080

The box's iptables are rather vanilla -- pretty much the standard "allow ssh, http" in (I added 8080 just to eliminate that as a possibility, too, even though 8080's only listened to on localhost).

What am I missing?

Thanks!

best,
Jeff
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux