清空iptables的脚本。
vim iptb_init.sh
#!/bin/bash
iptables -F
iptables -X
iptables -Z
iptables -t nat -F
iptables -t nat -X
iptables -t nat -Z
# filter table & nat table 都要清空
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
service iptables save
chmod u+x iptb_init.sh
./iptb_init.sh
# 查看iptables
iptables -nvL --line-num
iptables -L -t nat