1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| [root@node1 ~]# systemctl is-active httpd.service failed [root@node1 ~]# systemctl status httpd.service ... clear.domain250.example.com httpd[821]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:82 clear.domain250.example.com httpd[821]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:82 clear.domain250.example.com httpd[821]: no listening sockets available, shutting down ... [root@node1 ~]# sealert -a /var/log/audit/audit.log 100% done found 1 alerts in /var/log/audit/audit.log --------------------------------------------------------------------------------
SELinux is preventing httpd from name_bind access on the tcp_socket port 82.
***** Plugin bind_ports (99.5 confidence) suggests ************************
If you want to allow httpd to bind to network port 82 Then you need to modify the port type. Do # semanage port -a -t PORT_TYPE -p tcp 82 where PORT_TYPE is one of the following: http_cache_port_t, http_port_t, jboss_management_port_t, jboss_messaging_port_t, ntop_port_t, puppet_port_t. ... [root@node1 ~]# semanage port -l | grep "http" http_cache_port_t tcp 8080, 8118, 8123, 10001-10010 http_cache_port_t udp 3130 http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000 pegasus_http_port_t tcp 5988 pegasus_https_port_t tcp 5989 [root@node1 ~]# semanage port -a -t http_port_t -p tcp 82 [root@node1 ~]# semanage port -l | grep "http_port_t" http_port_t tcp 82, 80, 81, 443, 488, 8008, 8009, 8443, 9000 pegasus_http_port_t tcp 5988 [root@node1 ~]# systemctl enable --now httpd.service [root@node1 ~]# systemctl is-active httpd.service; systemctl is-enabled httpd.service active enabled [root@node1 ~]# ss -ntlp | grep ":82" LISTEN 0 128 *:82 *:* users:(("httpd",pid=25751,fd=4),("httpd",pid=25750,fd=4),("httpd",pid=25749,fd=4),("httpd",pid=25747,fd=4)) [root@node1 ~]# curl http://localhost:82 ... <title>Test Page for the Apache HTTP Server on Red Hat Enterprise Linux</title> ...
|