π§Linux SELinux Labs
π― Objective
π§° Prerequisites
π οΈ Confirm SELinux is enabled
sestatusSELinux status: enabled
Current mode: enforcingπΉ Lab 1: View SELinux Contexts
1.1 Check the context of files and processes
πΉ Lab 2: Switch to Permissive Mode
2.1 Temporarily set SELinux to permissive
2.2 Set it back to enforcing
πΉ Lab 3: Create a Policy Violation and Examine Logs
3.1 Create a file and change its context
3.2 View denials (from a non-httpd process context)
πΉ Lab 4: Restore Default SELinux Contexts
4.1 Reset file label using restorecon
restoreconπΉ Lab 5: View and Use Boolean Flags
5.1 List SELinux booleans
5.2 Enable boolean for FTP access
πΉ Lab 6: Analyze and Troubleshoot SELinux Denials
6.1 Analyze recent denials
6.2 Create and apply a custom policy (optional)
β
Wrap-Up
Last updated