Permalink

ISC BIND - enabling query statistics on CentOS

01/21/2022
ISC BIND allows for export of statistics using a web UI. This artice can help you avoid a common pitfall on CentOS.


ISC BIND allows for export of statistics using a web UI.
This feature was added in ISC BIND 9.10. So as a first step on your server, check the version:

named -v

The output should look similar to this:
BIND 9.11.26-RedHat-9.11.26-6.el8 (Extended Support Version)

Next add some configuration to /etc/named/named.conf.local
statistics-channels {
inet 127.0.0.1 port 8053 allow { 127.0.0.1; };
};

Warning: If you try to restart ISC BIND now, you will see an error in the LOG saying:
bind couldn't allocate statistics channel 127.0.0.1#8053: permission denied
The warning is caused by SELinux not granting access to port 8053.
You can modify the SWLinux policy using the following command:
semanage port -a -t dns_port_t -p tcp 8053


Now restart the service:
systemctl restart named.service

Finally you will be able to access the statistics UI. Test it by using:
curl http://127.0.0.1:8083/xml


591 Aufrufe .
Hinweis
Das Weblog gibt meine persönlichen Ansichten und Kommentare wieder und entspricht nicht den Positionen meiner aktuellen oder früheren Arbeitgeber oder Kunden.
Über mich
Nach Kategorie
Meine Seiten
netcraft Linux host Blog Admin OpenNTF
Monatsarchiv