LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-23-2010, 10:11 AM   #1
geek.ksa
Member
 
Registered: Jan 2009
Location: Dhahran, Saudi Arabia
Distribution: RHEL 5
Posts: 42

Rep: Reputation: 17
named not responding to queries


Hi all,

My DNS server used to work flawlessly but for some reason it no longer responds to queries. It seems that named always queries internet root serves!!

e.g.:
Code:
[root@nismaster ~]# dig +trace nismaster.desertpenguin.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> +trace nismaster.desertpenguin.com
;; global options:  printcmd
.                       518288  IN      NS      F.ROOT-SERVERS.NET.
.                       518288  IN      NS      G.ROOT-SERVERS.NET.
.                       518288  IN      NS      H.ROOT-SERVERS.NET.
.                       518288  IN      NS      I.ROOT-SERVERS.NET.
.                       518288  IN      NS      J.ROOT-SERVERS.NET.
.                       518288  IN      NS      K.ROOT-SERVERS.NET.
.                       518288  IN      NS      L.ROOT-SERVERS.NET.
.                       518288  IN      NS      M.ROOT-SERVERS.NET.
.                       518288  IN      NS      A.ROOT-SERVERS.NET.
.                       518288  IN      NS      B.ROOT-SERVERS.NET.
.                       518288  IN      NS      C.ROOT-SERVERS.NET.
.                       518288  IN      NS      D.ROOT-SERVERS.NET.
.                       518288  IN      NS      E.ROOT-SERVERS.NET.
;; Received 500 bytes from 127.0.0.1#53(127.0.0.1) in 0 ms

com.                    172800  IN      NS      F.GTLD-SERVERS.NET.
com.                    172800  IN      NS      I.GTLD-SERVERS.NET.
com.                    172800  IN      NS      C.GTLD-SERVERS.NET.
.....

my domain zone file is as follows:
Code:
[root@nismaster ~]# cat /var/named/chroot/var/named/desertpenguin.com.zone
$TTL 4800
@       IN SOA  nismaster.desertpenguin.com. root.desertpenguin.com. (
                                50         ; serial
                                10800      ; refresh (3 hours)
                                900        ; retry (15 minutes)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
                       NS      nismaster
xyz                    A       192.168.1.1
nismaster              A       192.168.1.253
mail                   A       192.168.1.10
my named.conf file has:
Code:
[root@nismaster ~]# cat /var/named/chroot/etc/named.conf
options {
        #listen-on port 53 { 127.0.0.1; };
        listen-on port 53 { localhost; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";

        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;
        // query-source-v6 port 53;

        ##allow-query     { localhost; };
        allow-query     { localnets; };
        #allow-query-cache { localhost; };
        allow-query-cache { localnets; };
        allow-transfer { localnets; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localnets; };
        match-destinations { localhost; };
        recursion yes;
        zone "desertpenguin.com" IN {
        type master;
        file "desertpenguin.com.zone";
        allow-update { localnets; };
        forwarders {};
        };
        include "/etc/named.rfc1912.zones";
};

when I try to resolve one of the A records above:
Code:
[root@nismaster ~]# dig nismaster.desertpenguin.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> nismaster.desertpenguin.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 41237
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;nismaster.desertpenguin.com.   IN      A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Feb 23 19:10:53 2010
;; MSG SIZE  rcvd: 45
Please, any hints?
Thanks in advance!
 
Old 02-23-2010, 05:42 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Quote:
My DNS server used to work flawlessly but for some reason it no longer responds to queries. It seems that named always queries internet root serves!!
Runnig dig +trace, you query the root servers recursively, so this is normal.

You zone file looks good. Remove or comment out from named.conf the:
Quote:
forwarders {};
allow-query-cache { localnets; };
The 1st has no sense and the 2nd is useless for an authoritative name server. You can also do the same at least for
Quote:
match-destinations { localhost; };
There is no need to be so restrictive for an internal dns.
 
Old 02-23-2010, 05:45 PM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
That's odd.

What does /etc/resolv.conf look like?

Dave
 
Old 02-24-2010, 03:00 AM   #4
geek.ksa
Member
 
Registered: Jan 2009
Location: Dhahran, Saudi Arabia
Distribution: RHEL 5
Posts: 42

Original Poster
Rep: Reputation: 17
@Bathory: Thanks for the good hints

@ilikejam: Oh yeah, it sure "was" odd, it drove me nuts!! it had nothing to do with the resolv.conf. In fact, the issue was that the DDNS journal file was out of sync with the zone file!!, deleting DDNS journal file resolved the issue instantly.

Thanks all.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(bind) named: couldn't open pid file '/var/run/named/named.pid' - any help? samengr Linux - Server 6 04-01-2009 06:22 AM
file /var/lib/named/var/named/reverse/named.zero failed: file not found Toadman Linux - Software 15 03-18-2009 07:01 PM
DNS(named) - Fedora 9 - Answers Queries on Local Host Only rpeiffer Linux - Server 8 06-29-2008 04:51 PM
FC4 System Crash bcs chown -R named:named extend joangopan Fedora 1 09-09-2007 02:46 AM
chown -R named:named /var/named crash the system? joangopan Fedora 2 09-09-2007 02:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration