SELinux Port Labels and Booleans
A web server with a new site is refused by SELinux four times: two ports it may not listen on, a backend it may not connect to, and a home directory it may not read. Fix each one in the policy, with port labels and booleans, and never by leaving enforcing mode.
Skill labintermediate~30 minPro
What you'll do
- ✓Read the SELinux mode, now and for the next boot, and say why permissive is not a fix
- ✓List port labels and give a port the type a service needs, by adding or by modifying
- ✓Find the boolean for an optional behaviour and turn it on persistently
- ✓Tell from a denial whether a file label, a port label or a boolean is missing
Lab outline
- 01Where SELinux stands
- 02Port labels
- 03Booleans
Before you start
- Repair SELinux File Contexts
- Operate systemd Services
Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.