关闭IPtables和selinux

iptables  -L查看是否有相应的iptables规则

iptables  -F关闭iptables规则

iptables  -t  nat  -F

 

关闭selinux

getenforce  --查看selinux是否开启

临时关闭:

[root@localhost ~]# getenforce
Enforcing

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

 

永久关闭:

[root@localhost ~]# vim /etc/sysconfig/selinux

SELINUX=enforcing 改为 SELINUX=disabled

重启服务reboot

posted @ 2019-07-20 14:43  E_lian  阅读(1246)  评论(0编辑  收藏  举报