搜档网
当前位置:搜档网 › CentOS7关闭防火墙和SELinux

CentOS7关闭防火墙和SELinux

CentOS7关闭防火墙和SELinux
CentOS7关闭防火墙和SELinux

CentOS7关闭防火墙和SELinux

防火墙就是提供基于策略的网络过滤,用于阻挡网络策略所禁止的数据流通过。防火墙由几部分组成,但最关键的部分通常是包过滤。下面是學習啦小編收集整理的CentOS7关闭防火墙和SELinux,希望對大家有幫助~~

CentOS7关闭防火墙和SELinux 工具/原料

CentOS7

SecureCRT(或XManager等ssh客户端工具)

防火墙(firewalld)

临时关闭防火墙

systemctl stop firewalld

永久防火墙开机自启动

systemctl disable firewalld

临时打开防火墙

systemctl start firewalld

防火墙开机启动

systemctl enable firewalld

查看防火墙状态

systemctl status firewalld

END

SELinux

临时关闭SELinux

setenforce 0

临时打开SELinux

setenforce 1

开机关闭SELinux

编辑/etc/selinux/config文件,将SELINUX的值设置为disabled,如下图。下次开机SELinux就不会启动了。

4查看SELinux状态

执行getenforce命令

CentOS7关闭防火墙和SELinux

相关主题