分类: LINUX
2009-10-14 17:38:47
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