LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-01-2015, 02:21 AM   #1
gbcbooks
Member
 
Registered: Aug 2014
Posts: 199

Rep: Reputation: Disabled
delegate nameserver to your own domain server doesn't work


hi

i tested this feature on my private dns server

there is some cut of my first dns (2.2.2.2) named.conf :

Code:
options {
        listen-on port 53 { 2.2.2.2;172.16.82.252; };
//      listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        datasize        100M;
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion no;
        empty-zones-enable yes;
        querylog yes;

        dnssec-enable no;
        dnssec-validation no;
        dnssec-lookaside auto;
        transfer-source 2.2.2.2;
        notify-source 2.2.2.2;
        allow-new-zones yes;
#       allow-recursion { any; };

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";
};
......
        zone "china.com" IN {
                type master;
                file "china.com.zone";
                allow-update { none; };
        };

 ...........
china.com.zone
Code:
$TTL 1D
@       IN SOA  @ mail.china.com. (
                                        2015120105      ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@       IN      NS      ns2.china.com.
ns2     IN      A       9.9.9.9 ; this glue record
cut of my second dns (9.9.9.9) named.conf
Code:
options {
        listen-on port 53 { 9.9.9.9;172.16.85.241; };
//      listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        datasize        100M;
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion yes;
        empty-zones-enable yes;
        querylog yes;
        allow-recursion { any; };

        dnssec-enable no;
        dnssec-validation no;
        dnssec-lookaside auto;
        transfer-source 9.9.9.9;
        notify-source 9.9.9.9;
        allow-new-zones yes;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";
};
.....
        zone "china.com" IN {
                type master;
                file "masters/china.com.zone";
                allow-update { none; };
        };

....
china.com.zone in second dns
Code:
$TTL 1D
@       IN SOA  @ mail.china.com. (
                                        2015120102      ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        IN      NS      ns1.china.com.
        IN      NS      ns3.china.com.
@       IN      MX      5       mail.china.com.
@       IN      A       9.9.9.9
ns1     IN      A       2.2.2.2 ; this is glue record
ns2     IN      A       9.9.9.9 ; this is glue record
ns3     IN      A       1.1.1.1 ; this is glue record
mail    IN      A       3.3.3.3
us      IN      A       4.4.4.4
ftp     IN      CNAME   www
named service is working fine, it can resolve other namespace ,
when i dig china.com, the output is as follow:
Code:
; <<>> DiG 9.10.3 <<>> china.com @2.2.2.2
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50733
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;china.com.                     IN      A

;; AUTHORITY SECTION:
china.com.              10800   IN      SOA     china.com. mail.china.com. 2015120105 86400 3600 604800 10800

;; Query time: 178 msec
;; SERVER: 2.2.2.2#53(2.2.2.2)
;; WHEN: Tue Dec 01 16:14:32 CST 2015
;; MSG SIZE  rcvd: 79
in my thinking is DNS1 delegated dns2 as a delegation server for zone china.com. , so, when host query dns1 for ip address of china.com, dns1 will ask dns2 before its recursion was activated .
as the output of dig said,
dns1 did not ask dns2. i seach many articles of delegation of dns, all results are pointing out my zone file is correct, but i dont think so , i must miss something.
 
Old 12-01-2015, 02:46 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Judging from this linkhttp://www.zytrax.com/books/dns/ch9/delegate.html the delegation zone type should be slave and not master
Quote:
options {
listen-on port 53 { 2.2.2.2;172.16.82.252; };
// listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
datasize 100M;
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion no;
empty-zones-enable yes;
querylog yes;

dnssec-enable no;
dnssec-validation no;
dnssec-lookaside auto;
transfer-source 2.2.2.2;
notify-source 2.2.2.2;
allow-new-zones yes;
# allow-recursion { any; };

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};
......
zone "china.com" IN {
type slave;
file "china.com.zone";
allow-update { none; };
};
 
Old 12-01-2015, 03:11 AM   #3
gbcbooks
Member
 
Registered: Aug 2014
Posts: 199

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
Judging from this linkhttp://www.zytrax.com/books/dns/ch9/delegate.html the delegation zone type should be slave and not master
well , i actually have a sub domain of eu.org , i added my dns1 to its NS record and glue record, now my dns2 is the slave of my dns1 of this zone.

so both eu.org and dns1 is master of this sub domain,
 
Old 12-01-2015, 07:38 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Can't do anything with what you saying. Could you give a bigger picture? Did the change from master to slave anything?
 
Old 12-01-2015, 11:36 AM   #5
gbcbooks
Member
 
Registered: Aug 2014
Posts: 199

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
Can't do anything with what you saying. Could you give a bigger picture? Did the change from master to slave anything?
Did the change from master to slave anything?
i can not get what you mean .
 
Old 12-02-2015, 02:51 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Chaning the type of the zone "china.com" to slave instead of master.
 
Old 12-03-2015, 08:38 PM   #7
gbcbooks
Member
 
Registered: Aug 2014
Posts: 199

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
Chaning the type of the zone "china.com" to slave instead of master.
my Dns1 is the master of zone xxx.eu.org, dns server of doamin "ue.org" is master of xxx.eu.org, and my dns2 is the slave of dns1 master of zone xxx.eu.org.
 
  


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
[SOLVED] ssh login doesn't work with domain forward bucovaina78 Linux - Networking 4 01-28-2012 10:04 AM
Delegate a subdomain to a seperate name server brianmcgee Linux - Networking 1 07-30-2009 08:30 PM
Apache2 VirtualHost Syntax OK but domain still doesn't work bg108 Linux - Server 11 04-18-2008 12:54 PM
Nameserver on different domain? greyhammer Linux - Networking 5 01-06-2005 07:31 AM
Domain Name doesn't work GameboyHippo Linux - Networking 9 02-04-2004 08:34 AM

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

All times are GMT -5. The time now is 07:17 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