iptables 端口映射(80 to 8080)


 

/ect/sysctl.conf

net.ipv4.ip_forward = 1

 

#iptables -t mangle -I PREROUTING -p tcp --dport 80 -j MARK --set-mark 8888

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

#iptables -I INPUT -p tcp --dport 8080 -m mark --mark 8888 -j ACCEPT

#service iptables save

#service iptables restart

posted @ 2010-08-26 11:49  Donal  阅读(916)  评论(0编辑  收藏  举报