Q. How do I turn on DNS server logging so that I can see all the queries on my Fedora 14 server?
A. You can use the rndc command which controls the operation of a name server. It supersedes the ndc utility that was provided in old BIND releases. If rndc is invoked with no command line options or arguments, it prints a short summary of the supported commands and the available options and their arguments.
rndc communicates with the name server over a TCP connection, sending commands authenticated with digital signatures.
Task: Turn no logging
Type the following command as root to toggle query logging:
# rndc querylog
Task: View bind server query log
Once this is done, you can view all logged queries using /var/log/messages file. To view those queries, type:
# tail -f /var/log/messages
Task: Turn off logging
Type the following command as root to toggle query logging:
# rndc querylog
Tags: Linux by Bert Zefat
No Comments »