CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

SELinux Port Labels

One objective. Ports are labelled just as files are, and a confined service may only bind to a port whose label its type is allowed to use. The failure is a permission error on a port nothing else is using, which reads like a bug and is policy working.

Security and SELinux Guide 58 of 67 Intermediate

Check the port is genuinely unlabelled before assuming a denial. Many non-obvious ports are already in http_port_t - 8008, 8009, 8443, 9000 among them - so a service on one of those starts with no complaint and demonstrates nothing.

Every command on this page runs on RHCSA-A01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

This guide includes

Use this when a service refuses to bind to a port that is demonstrably free. This matters because SELinux labels ports too - the port is available and the type is simply not permitted to use it.

Before you start

  1. Which ports a type may use

  2. The refusal

  3. Labelling it

Official sources