Can iptables redirect traffic to localhost?
November 21, 2010 1:48 PM Subscribe
How can I make iptables redirect a tcp port to a server listening only to localhost (127.0.0.1)?
posted by cowmix to computers & internet (8 answers total) 1 user marked this as a favorite
I'm using Centos 5.5 and I have a server that is ONLY listening to localhost (port 7777). I want to have iptables take all traffic bound to port 80 (on eth0) and redirect it to localhost port 7777.
I've seen a ton of example that show how to do this for Tomcat (which listens on port 8080 normally) but in those examples Tomcat is listening on eth0, not 'lo'. None of those examples seem to work specifically for my situation.
Has anyone out there got something like this to work?