firewalld命令

1.添加x.x.x.x/24到80端口白名单:

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="x.x.x.x/24" port port="80" protocol="tcp" accept'

firewall-cmd --complete-reload

firewall-cmd --list-all

 

2.添加x.x.x.x/24到0-65535端口tcp白名单:

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="x.x.x.x/24" port port="0-65535" protocol="tcp" accept'

firewall-cmd --complete-reload

firewall-cmd --list-all

posted on 2016-09-21 11:40  傻子才悲伤  阅读(303)  评论(0编辑  收藏  举报

导航