LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-02-2006, 10:41 PM   #1
GD_19
LQ Newbie
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 28

Rep: Reputation: 15
BIND doesn't resolve hostnames information for which is stored on other DNS servers


Hello,

I've been trying to solve the following issue for the past week but I've been unable to:

I have set a DNS server on my home network server to resolve hostnames. Internet resolving works fine, as does resolving hostnames for my domain, gdnet.awmn

I also participate in a community wireless metropolitan network (AWMN) which also uses DNS extensively. Thus, I set up BIND to request DNS info from the master servers. I added a slave section in named.conf and zone transfer works fine. However not all info is included in the zone file that end up on my HD. It includes info on which name servers are authoritative for some subdomains, and my server is expected to query them should a request be made. However this doesn't work for some reason:


Code:
irouter bind # dig www.awmn 
;; Truncated, retrying in TCP mode.

; <<>> DiG 9.2.5 <<>> www.awmn
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42324
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 228, ADDITIONAL: 228

;; QUESTION SECTION:
;www.awmn.                      IN      A

;; ANSWER SECTION:
www.awmn.               3600    IN      A       10.19.143.13

;; AUTHORITY SECTION:
awmn.                   3600    IN      NS      ns0.andreas.ns.awmn.
awmn.                   3600    IN      NS      ns0.apoikos.ns.awmn.
[...]
;; ADDITIONAL SECTION:
ns0.ee.ns.awmn.         3600    IN      A       10.31.176.1
ns0.gd.ns.awmn.         3600    IN      A       10.2.24.253
[...]
;; Query time: 32 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jan  3 06:36:42 2006
;; MSG SIZE  rcvd: 9326
This works fine. However:

Code:
irouter bind # dig winner.awmn

; <<>> DiG 9.2.5 <<>> winner.awmn
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58672
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;winner.awmn.                   IN      A

;; AUTHORITY SECTION:
winner.awmn.            3600    IN      NS      ns0.winner.ns.awmn.
winner.awmn.            3600    IN      NS      ns0.bliz.ns.awmn.

;; ADDITIONAL SECTION:
ns0.bliz.ns.awmn.       3600    IN      A       10.2.13.131
ns0.winner.ns.awmn.     3600    IN      A       10.2.12.70

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jan  3 06:39:29 2006
;; MSG SIZE  rcvd: 112
The answer section is void!

I suppose this is what I should get:

Code:
irouter bind # dig winner.awmn @10.2.12.70

; <<>> DiG 9.2.5 <<>> winner.awmn @10.2.12.70
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58108
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;winner.awmn.                   IN      A

;; ANSWER SECTION:
winner.awmn.            3600    IN      A       10.2.12.72

;; Query time: 97 msec
;; SERVER: 10.2.12.70#53(10.2.12.70)
;; WHEN: Tue Jan  3 06:40:15 2006
;; MSG SIZE  rcvd: 45
Why doesn't BIND contact winner's DNS server which is authoritative for the winner.awmn domain to get an answer? Any ideas? This is my named.conf (largely based on gentoo-wiki's how-to):

Code:
irouter bind # cat /etc/bind/named.conf
options {
        directory "/var/bind";
        statistics-file "/var/bind/named.stats";
        dump-file "/var/bind/named.dump";
        zone-statistics yes;
        allow-recursion { 10.0.0.0/8; };
        allow-transfer { 10.0.0.0/8; };
        transfer-format many-answers;

        // uncomment the following lines to turn on DNS forwarding,
        // and change the forwarding ip address(es) :
        forward first;
        forwarders {
                194.219.227.2;
                193.92.150.3;
        };

        listen-on-v6 { none; };
        listen-on { 10.2.24.30; 10.2.24.189; 127.0.0.1; };

        // to allow only specific hosts to use the DNS server:
        //allow-query {
        //      127.0.0.1;
        //};

        // if you have problems and are behind a firewall:
        //query-source address * port 53;
        pid-file "/var/run/named/named.pid";
        };

        // Includes
        include "/var/bind/conf/logging.conf";
        include "/var/bind/conf/acls.conf";

zone "." IN { type hint; file "named.ca"; };

zone "localhost" IN { type master; file "pri/localhost.zone"; allow-update { none; }; notify no; };
zone "127.in-addr.arpa" IN { type master; file "pri/127.zone"; allow-update { none; }; notify no; };

zone "gdnet.awmn" IN { type master; file "pri/gdnet.zone"; allow-query { our-networks; }; notify yes; };
zone "24.2.10.in-addr.arpa" IN { type master; file "reverse/24.2.10.zone"; allow-query { our-networks; }; notify yes; };

zone "awmn" IN { type slave; file "sec/awmn.zone"; masters { 10.19.143.12; }; };
zone "10.in-addr.arpa" IN { type slave; file "sec/10.zone"; masters { 10.19.143.12; }; };
Sorry for the long post... And thanks in advance. Any help would be greatly appreciated...
George
 
Old 01-03-2006, 08:25 AM   #2
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
I agree, it looks like you have the proper delegation records
(NS) in the awmn zone. Your "dig winner.awmn" query seems to
verify this.

Is recursion enabled on the DNS server you are querying?

Also, try: dig +trace winner.awmn

This should point out where recursion is broke.
 
Old 01-03-2006, 09:37 AM   #3
kbuk
LQ Newbie
 
Registered: Nov 2005
Location: London
Distribution: Debian
Posts: 17

Rep: Reputation: 0
I know this may seem a little silly, but you have done the following restarted bind, set resolv.conf to use the local nameserver, set any other pc's on the domain to use the nameserver ?
 
Old 01-03-2006, 02:54 PM   #4
GD_19
LQ Newbie
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks for replying...

Recursive queries are enabled on my server. I have both the allow-recursion and recursion options enabled in named.conf...

Yes I have restarted named, resolv.conf is fine and I have even flushed the DNS cache to no avail...

However the output of +trace seems really weird:

For some reason the ROOT servers are involved, which I can provide no explanation for:

Code:
irouter ~ # dig +trace winner.awmn

; <<>> DiG 9.2.5 <<>> +trace winner.awmn
;; global options:  printcmd
.                       458486  IN      NS      C.ROOT-SERVERS.NET.
.                       458486  IN      NS      D.ROOT-SERVERS.NET.
.                       458486  IN      NS      E.ROOT-SERVERS.NET.
.                       458486  IN      NS      F.ROOT-SERVERS.NET.
.                       458486  IN      NS      G.ROOT-SERVERS.NET.
.                       458486  IN      NS      H.ROOT-SERVERS.NET.
.                       458486  IN      NS      I.ROOT-SERVERS.NET.
.                       458486  IN      NS      J.ROOT-SERVERS.NET.
.                       458486  IN      NS      K.ROOT-SERVERS.NET.
.                       458486  IN      NS      L.ROOT-SERVERS.NET.
.                       458486  IN      NS      M.ROOT-SERVERS.NET.
.                       458486  IN      NS      A.ROOT-SERVERS.NET.
.                       458486  IN      NS      B.ROOT-SERVERS.NET.
;; Received 436 bytes from 127.0.0.1#53(127.0.0.1) in 4 ms

.                       86400   IN      SOA     A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006010300 1800 900 604800 86400
;; Received 104 bytes from 192.33.4.12#53(C.ROOT-SERVERS.NET) in 263 ms
Any ideas?
 
Old 01-03-2006, 04:23 PM   #5
kbuk
LQ Newbie
 
Registered: Nov 2005
Location: London
Distribution: Debian
Posts: 17

Rep: Reputation: 0
Sorry, misread your origional message (mostly due to others using the wrong terminoligy.
Not to mention you've not exactly specified what I think you're now meaning.

Domain
awmn

is gdnet.awmn a hostname or sub-domain.
From the above I assumed it was a hostname (fqdn, I didn't scroll down on the named.conf)

From what you've said (and re-reading what you posted) it sounds like you're talking about a subdomain

eg
www.gdnet.awmn
ftp.gdnet.awmn
mail.gdnet.awmn
etc

in that case you need to add something like the following to the zone file for awmn
gdnet IN A 10.2.24.30
IN NS ns0.bliz.ns.awmn.
IN NS gdnet

You don't need the A record (it's there for glue record purposes). I'm not completely sure but it's probably best if you avoid the glue record issues and set the FQDN gdnet.awmn from within the gdnet.awmn zonebut that's a little beyond what we need (and may not be needed at all).

You're really asking about DNS subdomains.
 
Old 01-03-2006, 09:31 PM   #6
GD_19
LQ Newbie
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 28

Original Poster
Rep: Reputation: 15
(kinda) SOLVED!

I had to include 127.0.0.1 in the allow-recursion directive...

However another error has emerged... When forwarding is enabled (through the forwarders directive) my named won't work as a secondary server for the awmn zone... Anyway this is not as urgent as the previous problem since I now can virtually resolve any hostname to its IP, the only problem being I can't take advantage of my ISP's dns cache for faster lookups on the internet... (yes forward first is used, not forward only)

here's my new named.conf:

Code:
options {
        directory "/var/bind";
        statistics-file "/var/bind/named.stats";
        dump-file "/var/bind/named.dump";
        zone-statistics yes;
        allow-recursion { our-networks; };
        allow-transfer { our-networks; };
        transfer-format many-answers;
        recursion 1;

        // uncomment the following lines to turn on DNS forwarding,
        // and change the forwarding ip address(es) :
        //forward first;
        //forwarders {
        //        194.219.227.2;
        //        193.92.150.3;
        //};

        listen-on-v6 { none; };
        listen-on { 10.2.24.30; 10.2.24.189; 127.0.0.1; };

        // to allow only specific hosts to use the DNS server:
        //allow-query {
        //      127.0.0.1;
        //};

        // if you have problems and are behind a firewall:
        //query-source address * port 53;
        pid-file "/var/run/named/named.pid";
};

        // Includes
        include "/var/bind/conf/logging.conf";
        include "/var/bind/conf/acls.conf";

zone "." IN { type hint; file "named.ca"; };

zone "localhost" IN { type master; file "pri/localhost.zone"; allow-update { none; }; notify no; };
zone "127.in-addr.arpa" IN { type master; file "pri/127.zone"; allow-update { none; }; notify no; };

zone "gdnet.awmn" IN { type master; file "pri/gdnet.zone"; allow-query { our-networks; }; notify yes; };
zone "24.2.10.in-addr.arpa" IN { type master; file "reverse/24.2.10.zone"; allow-query { our-networks; }; notify yes; };

zone "awmn" IN { type slave; file "sec/awmn.zone"; masters { 10.19.143.12; }; };
zone "10.in-addr.arpa" IN { type slave; file "sec/10.zone"; masters { 10.19.143.12; }; };
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem with BIND - Can't resolve hostnames unless listen-on is set to the IP range GD_19 Linux - Networking 2 07-07-2005 05:56 PM
BIND/DNS: Some subdomains resolve, some don't natetheros Linux - Networking 0 04-22-2005 07:36 PM
Looking for Split DNS Information using Bind jrbush82 Linux - Networking 2 04-22-2005 09:00 AM
Can bind 9 (DNS) resolve names based on who's asking?? (internal vs. external clients registering Linux - Networking 3 06-16-2004 08:25 AM
Microsoft ISA Firewall Returns Port Scan Warnings From Linux BIND DNS Servers. ramram29 Linux - Security 4 01-26-2004 11:09 PM


All times are GMT -5. The time now is 09:45 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration