Note |
---|
Applies to DNS Manager 4.X with BIND 9.2 or higher! |
Knowing how many queries are being made by your server can help you track possible attacks and gain an insight into the most queried domains.
Step-by-step guide
Assuming you are using a CentOS server with BIND version higher than 9.2, we recommend that you take the following steps.
Edit the /etc/named.conf file and in the options {} section these two lines:
Code Block zone-statistics yes; statistics-file "/var/named/slaves/named.stats";
Restart the named service.
Shell service named restart
Run the command below. This will update the /var/named/slaves/named.stats file every time you run it.
Shell rndc stats
Verify the /var/named/slaves/named.stats. In this example, only the Name server statistics are displayed.
Code Block ++ Name Server Statistics ++ 56 IPv4 requests received 47 recursive queries rejected 56 responses sent 8 queries resulted in successful answer 14 queries resulted in authoritative answer 6 queries resulted in nxrrset 42 other query failures
Info |
---|
In case you want to do graphs, you need to add the "rndc stats" command to cronjob and use Cacti on a different server to output these stats. |
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page properties | ||
---|---|---|
| ||
|
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.