我试图将所有传出流量从端口 80 转发到端口 8080 iptables,我尝试了以下规则,但它不起作用:
iptables
iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port 8080
此外,对于传入流量,我需要一个规则,将同一主机上的端口转发不作为代理。
linux iptables centos
centos ×1
iptables ×1
linux ×1