SELinux Flashcards
DAC stands for
Discretionary Access Control
( . traditional way of protecting our files and folders
.managed by the owners and their permissions, ls -l to see DAC permissions)
MAC stands for
Mandatory Access Control
. A higher level of access control than the standard DAC
.prevents security breaches in the system by only processing necessary files that the admin preapproves, ls -Z too see MAC permissions
SELinux
Security Enhanced Linux
Additional security feature of Linux on top of firewall
SElinux is a labeling system. Every process has a label. Every file/directory object in the operating system has a label. Even network ports, devices, and potentially hostnames have labels assigned to them.
selinux knows three modes
The enforcing mode will enforce policies, and may deny access based on selinux rules.
The permissive mode will not enforce policies, but can still log actions that would have been denied in enforcing mode.
The disabled mode disables selinux.
type command to know in what mode you are now
getenforce
in command line : setenforce 1 stands for
enforcing
in command line : setenforce 0 stands for
permissive
what is the configuration file for SELinux? tell about disabling mode
/etc/selinux/config only in this file you can disable selinux, not in command line
type command to set selinux, to change type for directory SUN , for example
semanage fcontext -a -t httpd_sys_content_t sun/
restorecon -R -v sun/
semanage port -a -t http_port-t -p tcp 90
semanage port -l | grep http