Beating my head against named on Fedora!
By tdh on Aug 26, 2009
I added 3 new subdomains to my home network for testing. I added the records to my chroot'ed named at /var/named/chroot/var/named/named.conf. I just did reverse pointers and I couldn't get it to work:
[root@adept var]# host 192.168.4.120 Host 126.96.36.199.in-addr.arpa. not found: 3(NXDOMAIN)
I did this with a simple Perl script, so I debugged the heck out of it and checked for tabs galore. I finally added forward lookups, which worked:
[root@adept var]# host blast-4-120 blast-4-120.internal.excfb.com has address 192.168.4.120
Heck, I've been burnt by a bad link in /etc before, so I checked it:
[root@adept var]# ls -al /etc/named.conf lrwxrwxrwx 1 root named 21 2008-02-25 16:15 /etc/named.conf -> /var/named/named.conf [root@adept var]# ls -la /var/named/named.conf lrwxrwxrwx 1 root named 38 2008-02-25 16:24 /var/named/named.conf -> /var/named/chroot/var/named/named.conf
I even diff'ed them to be really, really sure. I ran named manually with '-g', fixed the warnings I got and then found out it didn't handle the chroot nicely. I looked at the init file and gave up on understanding it.
I couldn't find a log file for it, so I sent a SIGHUP to look for a database dump. I added logging to the config file and never saw any output. I never found that database dump.
But I did find an option that said where it should be:
I then asked myself, is there another copy of the config file?
[root@adept var]# ps -ef | grep named named 4047 1 0 00:30 ? 00:00:00 /usr/sbin/named -u named -t /var/named/chroot root 4207 2886 0 01:00 pts/3 00:00:00 grep named [root@adept var]# cd /var [root@adept var]# find . -name named.conf ./named/named.conf ./named/chroot/etc/named.conf ./named/chroot/var/named/named.conf [root@adept var]# ls -la ./named/named.conf lrwxrwxrwx 1 root named 38 2008-02-25 16:24 ./named/named.conf -> /var/named/chroot/var/named/named.conf [root@adept var]# ls -la ./named/chroot/etc/named.conf -rw-r--r-- 1 root named 2741 2008-02-25 20:49 ./named/chroot/etc/named.conf
Why yes, yes there is and it doesn't have my new zones!
[root@adept etc]# pwd /var/named/chroot/etc [root@adept etc]# mv named.conf named.conf.fracked [root@adept etc]# ln -s ../var/named/named.conf . [root@adept etc]# ls -la ../var/named/named.conf -rw-r----- 1 root named 4920 2009-08-27 00:13 ../var/named/named.conf [root@adept etc]# service named restart Stopping named: [ OK ] Starting named: [ OK ] [root@adept etc]# [root@adept etc]# host 192.168.4.120 188.8.131.52.in-addr.arpa domain name pointer blast-4-120.internal.excfb.com.
Now what was I doing before I fell down this rat hole?