iptables 查看、添加、删除、修改规则

查看规则

iptables -nvL –line-number

添加规则

iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

删除规则

iptables -D INPUT 2 // 删除第二行规则

修改规则

iptables -R INPUT 4 -j DROP

别忘了使用 service iptables save 命令保存。

猜你喜欢

转载自www.cnblogs.com/StarUDream/p/9045553.html