본문으로 바로가기

[리눅스] selinux 설정 켜기 끄기

category 운영체제/리눅스 2017. 9. 18. 22:31
728x90
반응형

selinux는 리눅스의 보안을 강화하기 위한 커널입니다.


각종 취약점으로부터 방어를 해줍니다.


먼저  selinux에 대한 설정을 하기 위해 변경해야할 파일을 보겠습니다.


 

 

 



#]/etc/selinux


# 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 - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted



위의 파일에서 SELINUX로 되어 있는 값이 중요합니다.


enforcing, permissive, disabled의 값을 넣어 줌에 따라서 동작여부를 설정할 수 있습니다.


selinux를 끄려면 위와 같이 disabled값을 넣습니다.


 

 

 



selinux를 쓰게 되면 보안을 강화해주기 때문에 특정 서비스가 동작하지 않을 수 있습니다.


보통은 selinux를 사용하지 않습니다.


하지만 필자는 selinux를 켜고, 서비스가 잘 동작하게 설정하는 것을 추천합니다.



728x90
반응형