谢谢老兄,OK了,又有一个小问题
我可以用 iptables -D INPUT 1 等类似指令删除INPUT OUTPUT等规则,但 prerouting postrouting 等链的规则怎么删除呢?
iptables -t nat -L 如下
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 3128
DNAT tcp -- anywhere 219.238.210.163 tcp dpt:http to:192.168.0.74
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 192.168.0.0/24 anywhere
SNAT tcp -- anywhere 192.168.0.3 tcp dpt:http to:192.168.0.2
SNAT tcp -- anywhere 192.168.0.74 tcp dpt:http to:192.168.0.25
Chain OUTPUT (policy ACCEPT)
target prot opt source destination