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

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



iptables -t nat -A PREROUTING -p tcp -i eth0:0 --dport 80 -j REDIRECT --to-ports 8080

you can try this rule

Robert Spangler wrote:
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


_______________________________________________
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