一、关闭防火墙服务
1、环境介绍
操作系统:CentOS Linux release 7.7.1908 (Core)
2、查看防火墙状态命令
systemctl status firewalld.service
注:如下面绿色字体 active (running) 表示防火墙是开启状态
3、关闭防火墙并查看防火墙状态
systemctl stop firewalld.service
systemctl status firewalld.service
可以看到,inactive (dead) 的字样,说明防火墙已经关闭
注:前面的方法,一旦重启操作系统,防火墙就自动开启。
4、禁止防火墙服务重启(永久关闭)
systemctl disable firewalld.service
执行成功,返回结果
二、关闭防火墙SELinux
1、 修改selinux配置文件
使用vim /etc/sysconfig/selinux,将SELINUX=enforcing改为SELINUX=disabled。
2、修改完成后生效
重启计算机 reboot 或 init 6
3、 查看修改后状态
[root@wangbin ~]# sestatus
SELinux status: disabled
注:SELinux status 的值为 disabled 时表示 selinux 防火墙关闭。