SELinux is preventing nginx from name_connect access on the tcp_socket port 20050.
插件 connect_ports (85.9 置信度) 建议 ******************************
If you want to allow nginx to connect to network port 20050
Then you need to modify the port type.
Do
semanage port -a -t PORT_TYPE -p tcp 20050
其中 PORT_TYPE 是以下之一:dns_port_t, dnssec_port_t, kerberos_port_t, ocsp_port_t。
插件 catchall_boolean (7.33 置信度) 建议 ***************************
If you want to allow httpd to can network connect
Then 必须启用 ‘httpd_can_network_connect’ 布尔值告知 SELinux 此情况。
Do
setsebool -P httpd_can_network_connect 1
插件 catchall_boolean (7.33 置信度) 建议 ***************************
If you want to allow nis to enabled
Then 必须启用 ‘nis_enabled’ 布尔值告知 SELinux 此情况。
Do
setsebool -P nis_enabled 1
插件 catchall (1.35 置信度) 建议 ***********************************
If you believe that nginx should be allowed name_connect access on the port 20050 tcp_socket by default.
Then 应该将这个情况作为 bug 报告。
可以生成本地策略模块以允许此访问。
Do
allow this access for now by executing:
ausearch -c ‘nginx’ –raw | audit2allow -M my-nginx
semodule -X 300 -i my-nginx.pp
更多信息:
源环境 (Context) system_u:system_r:httpd_t:s0
目标环境 system_u:object_r:unreserved_port_t:s0
目标对象 port 20050 [ tcp_socket ]
源 nginx
源路径 nginx
端口 20050
主机 localhost.localdomain
源 RPM 软件包
目标 RPM 软件包
策略 RPM selinux-policy-3.14.1-40.fc28.noarch
Selinux 已启用 True
策略类型 targeted
强制模式 Enforcing
主机名 localhost.localdomain
平台 Linux localhost.localdomain
4.17.19-200.fc28.x86_64 #1 SMP Fri Aug 24 15:47:41
UTC 2018 x86_64 x86_64
警报计数 1
第一个 2018-09-03 22:16:50 CST
最后一个 2018-09-03 22:16:50 CST
本地 ID eb4aad50-d490-4568-ba81-52f4c698ba43
原始核查信息
type=AVC msg=audit(1535984210.807:341): avc: denied { name_connect } for pid=4920 comm=”nginx” dest=20050 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket permissive=0
Hash: nginx,httpd_t,unreserved_port_t,tcp_socket,name_connect