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

  1. 01Where SELinux stands
  2. 02Port labels
  3. 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.

← All Linux System Administration labs

Your first machine is
8 seconds away.

Learn by doing on real machines — and give every AI agent one of its own.

Free forever · No credit card · Cancel anytime

SELinux Port Labels and Booleans — Linux lab | Kube Labs