十月 17th, 2017

1. 清除旧规则 ,一定得记得清nat记录,不清越加越多。
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X

—查看  :# iptables -nvL -t nat –line-numbers

—查看nat:# iptables -t nat -nL

2. 配置新的iptables规则

# iptables -A INPUT -p gre -j ACCEPT

# iptables -A INPUT -p tcp –dport 1723 -j ACCEPT
# iptables -A INPUT -p tcp –dport 47 -j ACCEPT

# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth1 -j SNAT –to-source x.x.x.x

Comments are closed.