Solved

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

Posted on 2001-07-04
10
221 Views
Last Modified: 2013-12-15
 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.
0
Comment
Question by:auther_bin
  • 5
  • 4
10 Comments
 
LVL 3

Expert Comment

by:mrn060900
ID: 6254771
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
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6255409
bind 9.x has the -d option
0
 
LVL 1

Author Comment

by:auther_bin
ID: 6255441
Oh dear ahoffmann whould you like to see more details about the "-d" option?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 6255519
what's the problem with:  man named  ?
...

     -d      set the daemon's debug level to debuglevel. Debugging traces from
             named become more verbose as the debug level increases.
...
?-)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6255529
.. also see the THE LOGGING STATEMENT in  man named.conf
0
 
LVL 1

Author Comment

by:auther_bin
ID: 6255785
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.......
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6256606
I agree that -d is not what want, but see my last comment just a minute later ;-)
The logging should do what you want.
0
 
LVL 1

Author Comment

by:auther_bin
ID: 6261456
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?



0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6261475
bind 9.x is very complex. I also get not fully used to it, so can't give more detailed answes, sorry.
0
 
LVL 1

Author Comment

by:auther_bin
ID: 6262377
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 !
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question