Introduction
On certain occasions enabling PowerDNS's query logging is necessary to find answers to dns-related issues.
This how-to provides information on how to enable all of the above debug contexts.
Procedure
-
Log in to the server via SSH as root.
-
Open the PowerDNS main configuration file with your favorite text editor, which is located in "/etc/pdns/pdns.conf".
- Enable the following settings by uncommenting the directive and configuring the following:
log-dns-queries=yes
loglevel=5 -
Make sure to save the changes.
- Restart the PowerDNS service by executing the following command:
/scripts/restartsrv_pdns
Once the above steps have been performed, you can see debug entries within the "/var/log/messages" file, for example, DNS query:
Jun 3 05:56:49 10-2-34-54 pdns_server: Remote 123.123.123.123 wants 'example.com|A', do = 0, bufsize = 1232 (4096): packetcache MISS
Please note that this will tell PowerDNS to log all incoming DNS queries, which will lead to a lot of logging. We would recommend doing this only for debugging purposes.
Comments
0 comments
Article is closed for comments.