You are here: Home > Linux, Tips&Info > Log all DNS queries to my DNS server

Log all DNS queries to my DNS server

We can log all the  DNS queries , type this single command (as root) on your DNS server (Bind)
————-
rndc querylog
————-
once this done, all DNS queries will be logged in /var/log/messages, the results will be similar to

Oct 24 03:01:43 ns1 named[30660]: client 200.23.242.196#35545: query: parentsascoaches.net IN MX
Oct 24 03:01:43 ns1 named[30660]: client 80.86.96.1#58395: query: mx1.clients.netdns.net IN A
Oct 24 03:01:43 ns1 named[30660]: client 195.175.39.118#60651: query: abs-pos.com IN MX

Tags: , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

One Response to “Log all DNS queries to my DNS server”

  1. Hey there , I am forming a new site like youtube and I think some of your articles would really fit in well. Am I allowed to copy and paste your article?