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

Robert Spangler lazydog at zoominternet.net
Sat May 12 12:36:58 UTC 2007


On Thu May 10 2007 20:24, Jeff Potter wrote:

>  This rule looks to be the REDIRECT rule that Robert suggests.
>  Unfortunately, as I have it written here, it fail instantly --
>  telnetting to port 80 causes an instant error.
>   iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-
>  ports 127.0.0.1:8080

The rule should look more like this;

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

Have a look at this site

http://iptables.rlworkman.net/chunkyhtml/index.html

and this page;

http://iptables.rlworkman.net/chunkyhtml/x4529.html#TABLE.REDIRECTTARGET

It's a Tutorial for IPTABLES


-- 

Regards
Robert

Smile... it increases your face value!



More information about the CentOS mailing list