关闭Linux中的iptables,firewalld,SELINUX

firewalld

停止firewalld服务

[root@VM_0_13_centos var]# systemctl stop firewalld
或
[root@VM_0_13_centos var]# systemctl stop firewalld.service 

禁止firewall开机启动

[root@VM_0_13_centos var]# systemctl mask firewalld
或
[root@VM_0_13_centos var]# systemctl disable firewalld.service

iptables

停止iptables

[root@VM_0_13_centos var]# service iptables stop 

永久禁止iptables

[root@VM_0_13_centos var]# chkconfig --level 35 iptables off

SELINUX

停止SELINUX

[root@VM_0_13_centos var]# setenforce 0

永久禁止SELINUX

[root@VM_0_13_centos var]# vi /etc/selinux/config
#SELINUX=enforcing #注释掉
SELINUX=disabled #增加
:wq! #保存退出
setenforce 0 #使配置立即生效
posted @ 2019-04-20 23:39  每一天,为明天。  阅读(144)  评论(0)    收藏  举报