1.iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
2./etc/init.d/iptables save
3./etc/init.d/iptables restart
4.iptables -t nat -L
结果:REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 8080