Skip to main content

关闭防火墙

--

关闭SElinux

临时关闭:

[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive

永久关闭:

[root@localhost ~]# vi /etc/sysconfig/selinux
SELINUX=enforcing 改为 SELINUX=disabled

关闭防火墙

//临时关闭
service iptables stop
//禁止开机启动
chkconfig iptables off

CentOS7关闭防火墙

//临时关闭
systemctl stop firewalld
//禁止开机启动
systemctl disable firewalld