Solved

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

Posted on 2001-07-04
10
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

737 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