Selinux
Sysadmin’s guide on selinux:
- Every process has a LABEL
- Another important part is type enforcement : isolation of process from one another based on their types.
- user:role:type:label
- Multi level security(MLS) to control domains based on security levels
- Multi Category Security : like virtual machines , selinux sandboxes
- kernel params for selinux at boot:
- autorelabel=1 forcing system to relabel
- selinux = 0
- enforcing = 0 :permissive mode7.
- check selinux status: getenforce
- enable/disable/ : setenfoce 1/0/
- status tool : sestatus
- config : /etc/selinux/config
- ls -Z , id -z and so on to create and modify context
- For a web server, different labels are created for binary, config_directory, logfile, content directory, process, ports
- selinux can set httpd to listen to specific port as:
- semanage port -a -t http_port_t -p tcp 8585
- chcon to change the context