CentOS7防火墙关闭
2022-12-02 17:03:57427
CentOS7版本后防火墙默认使用的是firewalld,我们可通过运行以下命令来查看防火墙状态以及关闭防火墙。
1、查看CentOS7防火墙状态
systemctl status firewalld.service
运行上述命令后,如果看到有绿色字样标注的“active(running)”,说明防火墙是开启状态。
2、关闭运行的防火墙
systemctl stop firewalld.service
关闭后,可查看防火墙状态,当显示disavtive(dead)的字样,说明CentOS7防火墙已经关闭。
但要注意的是,上面的命令只是临时关闭了CentOS7防火墙,当重启操作系统后,防火墙服务还是会再次启动。如果想要永久关闭防火墙则还需要禁用防火墙服务。
3、禁用防火墙服务
systemctl disable firewalld.service