Linux selinux 防火墙

cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced. //阻断
#     permissive - SELinux prints warnings instead of enforcing. //不阻拦 写记录日志
#     disabled - No SELinux policy is loaded. //关闭
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@wang /]# getenforce   //查询selinux状态

Enforcing

[root@wang /]# setenforce 0 //临时关闭
[root@wang /]# setenforce
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]
[root@wang /]# rpm -qf `which setenforce` //查询包

原文地址:https://www.cnblogs.com/buxiangxin/p/6270653.html