1:查看防火墙状态
systemctl statu firewalld
此状态表示防火墙禁用状态
![](https://img-blog.csdnimg.cn/img_convert/f6c716164483b3662b3df35fd388543a.png)
此状态表示防火墙处于开启状态
![](https://img-blog.csdnimg.cn/img_convert/2dea5266ff50a261083bd42cdce9eb3f.png)
2:暂时关闭防火墙
systemctl stop firewalld
3:启用防火墙(关闭状态使用)
systemctl start firewalld
4:重启防火墙(输入命令后防火墙先关闭再启用)
systemctl restart firewalld
5:永久禁用防火墙(设置开机不自启动)
systemctl disable firewalld
6:开机自动启用防火墙
systemctl enable firewalld