Is there a way to count the number of queries?

Alan Clegg alan at
Wed Nov 7 13:43:50 UTC 2012

On Nov 7, 2012, at 3:51 AM, Feng He <fenghe at> wrote:

> 于 2012-11-7 17:39, Tony Xue 写道:
>> Would please someone tell me a way to count the queries that my DNS server received? I also want to count the number of queries from a specific IP address.
> BIND has a zone-statistics option which can be set to on.
> For the statistics by IP I think you may want to enable the query Log and get the access stat from it.

I would recommend something more along the lines of tcpdump running on the same server logging port 53 traffic.  Much easier (and less strain on your nameserver) than playing with query logging.

Additionally, it logs both the query and response...

Alan Clegg | +1-919-355-8851 | alan at

More information about the bind-users mailing list