Managing Selinux with Ansible/Puppet
summary
Shows how to manage SELinux with configuration management tools (Ansible/Puppet) by using Puppet modules plus semanage/restorecon to set file contexts, extracting denials with ausearch and audit2allow, and compiling custom .pp policies with semodule when necessary. Explains storing policy artifacts in version control, distributing them as files, and reloading policies only when those files change, and recounts a Zabbix upgrade incident where a temporarily permissive process label preserved monitoring.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:30SELinux basics
- 3:18Why not use SELinux
- 5:50SELinux contexts
- 8:00SELinux tools
- 9:47Managing SELinux state
- 11:30SELinux modules in Puppet
- 13:17Change vs restore context
- 15:43SELinux booleans
- 17:09Managing ports
- 18:57Real-world SELinux issues
- 21:04Confining processes
- 22:46Building custom policies
- 25:17Auditing tools
- 27:26Debugging with audit2allow
- 29:12SELinux permissive mode
- 31:43Storing custom policies
- 33:13Policy challenges
- 35:03Context inheritance
- 36:49Distributing policies
- 38:34Reloading policies
- 39:46Q&A
