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

你可能感兴趣的:(iptables)