SELinux port type
The SELinux type given to a network port number, which decides which confined services may listen on it.
In more detail
The web server may bind only ports of type http_port_t, and the SSH server only ssh_port_t. semanage port -a -t adds a local rule for a new number, -m changes a number that already has a type, and -l -C lists the local rules. A firewall rule is still needed separately for clients to reach the port.
Example
semanage port -a -t http_port_t -p tcp 82Related terms
- SELinux — A Linux security layer that labels every process, file and port and allows only the accesses its policy lists.
- port — A number from 1 to 65535 that picks out one service on a machine, such as 22 for SSH or 80 for plain web traffic.
- firewalld — The RHEL firewall daemon, configured with firewall-cmd through zones, services and ports.
Taught in
- firewalld: Zones, Services And Ports That Stay Open — Red Hat Certified System Administrator (EX200) Exam Prep
- SELinux Contexts: Labels, restorecon And Rules That Last — Red Hat Certified System Administrator (EX200) Exam Prep
- SELinux Ports And Booleans: The Other Two Refusals — Red Hat Certified System Administrator (EX200) Exam Prep
- Drill: Storage, Then SELinux, Then The Firewall — Red Hat Certified System Administrator (EX200) Exam Prep
- Mock Exam, Part 1: Eighteen Tasks, One Reboot — Red Hat Certified System Administrator (EX200) Exam Prep
- Mock Exam, Part 2: Real Machines And The Ten Costly Mistakes — Red Hat Certified System Administrator (EX200) Exam Prep
- Finding Modules In Collections: ansible-doc And navigator — RHCE in Ansible (EX294): Automate Red Hat Systems
- RHEL System Roles: timesync And selinux From A Collection — RHCE in Ansible (EX294): Automate Red Hat Systems
- SELinux: Labels, Ports And Booleans That Persist — RHCE in Ansible (EX294): Automate Red Hat Systems