Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Adding a port for statics-channel access fails due to absence of SELinux policy
For example: adding the following to named.conf
====
statistics-channels {
inet 127.0.0.1 port 8053 allow { 127.0.0.1; };
};
=====
This is an old issue as noted by
https://www.centos.org/forums/viewtopic.php?t=4890
Version-Release number of selected component (if applicable):
How reproducible:
Always
Steps to Reproduce:
1. Add statistics-channel definition
2.
3.
Actual results:
statistics-channel fails to initialize
Expected results:
statistics-channel is access over socket
Additional info:
Statistics channel is currently expected to be open only on http port. But it requires setting special Selinux boolean for it.
When port 80 or 8008 would be sufficient, boolean toggle would help:
$ (sudo) setsebool -P named_tcp_bind_http_port=on
statistics-channels {
inet 127.0.0.1 port 8008 allow { 127.0.0.1; };
};
List of booleans related to bind is described on named_selinux(8) manual page when selinux-policy-doc package is installed.
$ (sudo) yum install selinux-policy-doc
$ man 8 named_selinux
When any custom port is desired, selinux policy has to be modified. First install semanage helper.
$ (sudo) yum install policycoreutils-python-utils
Then add custom port to dns_port_t type, which would allow bind to listen on that port. In this case, setsebool is not necessary.
$ (sudo) semanage port -a -t dns_port_t -p tcp 8053
All current port assigned to a type could be obtained by command
$ semanage port -l | grep dns_port_t
All ports available when named_tcp_bind_http_port=on is set could be obtained by command
$ semanage port -l | grep dns_port_t
Would do you think this is sufficient for listening on custom ports?
I think this is sufficient. Perhaps any sample config files could include a statistics-channel definition with recommended ports that have pre-aligend SELinux policies.
The Prometheus exporter for BIND uses 8053 in their example
https://github.com/prometheus-community/bind_exporter
I'll post a comment there with a link to this BZ to cover the SELinux config
Comment 3RHEL Program Management
2020-03-25 13:35:15 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.
Description of problem: Adding a port for statics-channel access fails due to absence of SELinux policy For example: adding the following to named.conf ==== statistics-channels { inet 127.0.0.1 port 8053 allow { 127.0.0.1; }; }; ===== This is an old issue as noted by https://www.centos.org/forums/viewtopic.php?t=4890 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Add statistics-channel definition 2. 3. Actual results: statistics-channel fails to initialize Expected results: statistics-channel is access over socket Additional info: