# Manage SELinux Security ## Dennis Kibbe ### Mesa Community College Note: This slide presentation was created using [Reveal.js](https://revealjs.com). You can access a transcript of this presentation by pressing s for speaker notes. You can access navigation help by pressing the question mark key. Audio for this presentation is artificially generated. --- # Module Outline 1. Introduction 1. Change the SELinux Enforcement Mode 1. Guided Exercise 1. Control SELinux File Contexts 1. Guided Exercise 1. Adjust SELinux Policy with Booleans 1. Guided Exercise 1. Investigate and Resolve SELinus Issues 1. Guided Exercise 1. Key Takeaways 1. Resources 1. Graded Lab Note: --- # Learning Objectives *After completing the work in this module you will be able to:* 1. Explain how SELinux protects resources, change the current SELinux mode of a system, and set the default SELinux mode of a system. 1. Manage the SELinux policy rules that determine the default context for files and directories with the `semanage fcontext` command and apply the context defined by the SELinux policy to files and directories with the `restorecon` command. 1. Activate and deactivate SELinux policy rules with the `setsebool` command, manage the persistent value of SELinux Booleans with the `semanage boolean -l` command, and consult `man` pages that end with `_selinux` to find useful information about SELinux Booleans. 1. Use SELinux log analysis tools and display useful information during SELinux troubleshooting with the `sealert` command. Note: --- # Introduction ## Manage SELinux Security Note: Unlike standard Linux permissions SELinux is a mandatory access control system that protects applications, processes, and files. --- # Change the SELinux Enforcement Mode 1. **Enforcing:** Enforcing is the default module. Violations of SELinux policy are enforced. 1. **Permissive:** Violations to SELinux policy are logged but permitted. 1. **Disabled:** SELinux is turned off. Note: --- # Guided Exercise ## Change the SELinux Enforcement Mode  Note: >>> # # Prepare Lab Environment  Note: >>> # # Log into servera  Note: >>> # # Verify the current SELinux mode  Note: >>> # # Change the SELinux Mode  Note: >>> # # Edit the SELinux Configuation File  >>> # Control SELinux File Contexts Note: --- # Guided Exercise ## Control SELinux File Contexts  Note: --- # Adjust SELinux Policy with Booleans Note: --- # Guided Exercise ## Adjust SELinux Policy with Booleans  Note: --- # Investigate and Resolve SELinux Issues Note: --- # Guided Exercise ## Investigate and Resolve SELinux Issues  Note: --- # Key Takeaways 1. Use the `getenforce` and `setenforce` commands to manage the SELinux mode of a system. 1. The `semanage` command manages SELinux policy rules. The `restorecon` command applies the context that the policy defines. 1. Booleans are switches that change the behavior of the SELinux policy. You can enable or disable them to tune the policy. 1. The `sealert` command displays useful information to help with SELinux troubleshooting. Note: --- # Resources Note: Here are some resources for the topics covered in this chapter. --- # Graded Lab ## Manage SELinux Security  Note: ---  Note: This ends this slide presentation. I hope you found it useful.