Link to home
Start Free TrialLog in
Avatar of auther_bin
auther_bin

asked on

How to make bind(named) to log down all the DNS usages?

 I want my DNS server to log down all the usages of my network, By default, named only log down itself's boot and shutdown messages. I think in the configfile:/etc/named.conf should be some items can make it work, but I can't find it. Please Let me know!

Thanks Please.
Avatar of mrn060900
mrn060900

I'm not sure I fully understand your question, but take a look at http://www.ph.ed.ac.uk/~richards/linuxdocs/lasg-www/logging/ it may answer your question.

Regards Mike
www.unixonline.co.uk
bind 9.x has the -d option
Avatar of auther_bin

ASKER

Oh dear ahoffmann whould you like to see more details about the "-d" option?
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
.. also see the THE LOGGING STATEMENT in  man named.conf
I think you do not clearly know what I means, I am not want to log down debug messges, But to let named to logdown all the usage of DNS service. Just like:
 If user A quest to the server about domain name "yahoo.com" and then server answered "xxx.xxx.xxx.xxx" and, at the same time, process "named" writing to the logfile (/var/log/messages) about this request and answer. Maybe looked like:

Jun 5 12:11:31 user A ask www.yahoo.com.......
I agree that -d is not what want, but see my last comment just a minute later ;-)
The logging should do what you want.
I tried like this in /etc/named.conf file

logging {
        channel default_syslog {
                file "/var/log/messages";
                syslog daemon;        # send to syslog's daemon facility
                severity info;        # only send priority info and higher
        };
        category default { default_syslog; default_debug; };
        category panic { default_syslog; };
};

bue Can't logdown all the request. Am I right? or the require messages not in category: default_syslog?



bind 9.x is very complex. I also get not fully used to it, so can't give more detailed answes, sorry.
It's so easy! I know now the last anwser should be:

add these in the named.conf file
----------------------------------------------------------logging {
        channel my_syslog {
                syslog daemon;
                severity info;
        };
        category queries { my_syslog; };
};
----------------------------------------------------------

Thanks ahoffmann !