[CentOS] NAT from eth0:0 port 80 to lo port 8080?

Thu May 10 20:14:55 UTC 2007
Jeff Potter <jpotter-centos at codepuppy.com>

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20070510/b59edfce/attachment-0004.html>