iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
其中eth0为外网网卡名称
iptables命令用法:http://man.linuxde.net/iptables
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
其中eth0为外网网卡名称
iptables命令用法:http://man.linuxde.net/iptables
转载于:https://www.cnblogs.com/voyager-fu/p/9699728.html