How to enable BIND DNS server logging to monitor queries and for troubleshooting?

Updated on September 3, 2017

In our previous article, we told you to how to setup DNS server using BIND on your linux machines. Enabling DNS server logging is a good practice, which will allow you to keep track of DNS queries and more importantly for troubleshooting DNS problems. DNS logging can be enabled using ‘rndc’ command; which controls the operation of your nameserver. ‘rndc’ comes as a replacement of ndc tools that use to come along with older versions of BIND.

Ok! To turn on the name server logging, run the below command as root user.

$ rndc querylog

DNS server logging

How to view the DNS query logs?

Type the below command,

tailf /var/log/messages

How to Turn Off DNS server logging?

The below command will toggle server logging.

$ rndc querylog

Checkout other articles related to DNS

What is DNS and the difference between Authoritative and Recursive DNS? – TG Explains

How to benchmark the speed of DNS servers?

How to install and setup DNS server using BIND on Linux?

Was this article helpful?

Related Articles

Leave a Comment