码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-05-16 15:35:00      阅读:102      评论:0      收藏:0      [点我收藏+]

标签:删除   cep   tab   命令   drop   tcp   ber   iptables   stat   

查看规则

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 命令保存。

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

标签:删除   cep   tab   命令   drop   tcp   ber   iptables   stat   

原文地址:https://www.cnblogs.com/StarUDream/p/9045553.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!