MacOS – Monitor DNS queries by IP

command linednslogsmacosserver.app

I'm running DNS on a Mac Server V2.4. I want to log all DNS queries made – is there a way of doing this? TCPdump only shows me whats happening at a moment in time and is difficult to read, what other options do i have?

Best Answer

If I were running bind on a Unix server, I'd add this to the config file at /etc/named.conf. Not sure how much access Apple gives you to customize the configuration though:

channel query_log {
    file "/var/log/named/query.log" versions 5 size 1m;
    severity dynamic;
    print-time yes;
};
category queries { query_log; };
Related Question