ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

Booleans and ports: setsebool, semanage port

Lesson 4.38 minIntermediateDecember 1, 2026

Sign in to read this lesson

The contexts are right, but httpd still cannot connect to the database, or a service will not start on port 8090. These are SELinux's two other switches — booleans (the policy's ready-made on/off switches) and port types. In this lesson we learn to read and change both correctly.

What you will learn

  • A boolean is a ready-made option in the policy: getsebool -a | grep httpd, semanage boolean -l with descriptions.
  • setsebool -P httpd_can_network_connect_db on — without -P the change is lost on reboot.
  • Each service can bind only to ports of its own port type: semanage port -l | grep http_port_t.
  • A new port: semanage port -a -t http_port_t -p tcp 8090; do not forget to open it in firewalld too.
  • Typical booleans: httpd_can_network_connect, httpd_can_network_connect_db, httpd_enable_homedirs, samba_enable_home_dirs, use_nfs_home_dirs.

The lesson has 5 key points, an explanation and 5 questions. It opens with a package.