linux防火墙firewalld
时间:2021-05-11 22:23:42
收藏:0
阅读:43
开启防火墙
systemctl enable firewalld
systemctl start firewalld
关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
通过防火墙限制ip访问
firewall-cmd --permanent --zone=public --add-rich-rule="rule family=ipv4 source address=‘x.x.x.x‘ port port=xxxxx procotol=tcp accept"
实际上相当于修改了/etc/firewalld/zones/public.xml文件

还可以通过区分zone的方式,对ip访问进行更加细粒度的控制,zone相当于组,不同的组下配置不同的访问规则。
原文:https://www.cnblogs.com/hongzuiliyu/p/14756885.html
评论(0)