Selinux

Sysadmin’s guide on selinux:

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