Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using RHEL-5 Linux where I have configured master and slave DNS servers.
To check dns zone transfer and any kind of bind error , we use /var/log/messages file. How can I create seperate DNS log file , say /var/log/bindlog so that all DNS errors and info should be logged in such a file.
Can anybody tell me how to configure named.conf to log all bind events in /var/log/bindlog file ?
Hi again.
You should make some changes in your logging part of named.conf. First of all you should define a log filename. Then some categories do not exist (I guess categorty is just a typo). Anyway you can try this:
In the above example make sure that the directory used for the logfile is writable by the user that runs named.
You can read more about bind logging here
I did mention log file location but forgot to add into forum. I am sorry fot that.
The docs you provided was very helpful.But problem is same.No events are logged in the bindlog file. As per the docs, named users mush have write access to log file, it is already assigned.
Could you just copy/paste the above snippet into your named.conf, just after the options part and before the start of zone definitions (after making a backup first) to see what happens.
Are you sure that the user that runs named can write to /var/log/named.log?
I suggest you to change the location of that file to be inside the /var/named directory, just to be sure that the named-user has write permissions. So change the following:
Thanx for replying,
I did the same as you told me to do . But still ,problem not resolved.I changed the named.log file location and assure that named user has write permission access on that file , restarted the named dameon,But named.log fie has no events.
But when i checked tail /var/log/messages file, there was one error :
localhost named [5444]: isc_log_open '/var/named/named.log' failed ermission denied
Why is it so ?
I think the same as you told permission error.But I had assigned full permission by:
# chmod 777 /var/named/named.log
so why this error??
What should I do next ?
Last edited by sachin1361; 09-16-2007 at 02:21 AM.
This is the output of commands you required. Anyhow I assign the permissions and change the ownership to named user, now there is no such error as permission denied.but still no logging in the named.log file.
What else should I do now ?
NO PERMISSION DENIED ERROR NOW, BUT STILL NO LOGGING
[root@test4 ~]# ls -l /var/named
total 28
drwxr-x--- 6 named named 4096 Sep 10 12:14 chroot
drwxrwx--- 2 named named 4096 Sep 16 14:53 data
-rwxrwxrwx+ 1 named named 0 Sep 16 09:41 named.log
drwxrwx--- 2 named named 4096 Jan 17 2007 slaves
[root@test4 ~]#
[root@test4 ~]# ps -ef |grep named
named 2233 1 0 09:42 ? 00:00:00 /usr/sbin/named -u named -t /var/named/chroot
root 5176 5013 0 10:02 pts/4 00:00:00 grep named
[root@test4 ~]#
I found the log files in this location. But why is this so ? Means when i specify the exact location of log file in named.conf file, then why log files are created in this lcoation ? And what does it means when named is running under chroot environement as you said .OR it means when named services are running chroot jail, log files will only be created in this location as you mentioned?
If i have to created log files in different location as earlier, say /var/log/named.log, then what shall I have to do ?
Many thanks for resolving this query. I was stucked in this problem frm last one week.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.