Solved

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

Posted on 2001-07-04
10
214 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
 
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why VNC doesn't work in Redhat? 11 43
nagios remote hosts 9 46
nagios 4 php error after installation 6 77
wipe a usb using python 5 29
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now