?
Solved

DNS zone data transfer from slave to master

Posted on 2011-03-13
8
Medium Priority
?
857 Views
Last Modified: 2012-05-11
I have configured a test dns server with master and slave for abc.com . For every update in zone file update is working fine from master to slave , But i want slave to have rights to update the zone file so that zone file automatically gets updated.

(Attn : People with "rsync option" kindly abstain from posting soln )

Master (named.conf) :

acl loc { 127.0.0.1; 10.0.0.0/8; };
options {
        listen-on port 53 { 127.0.0.1; 10.1.0.171 ; };
        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     { loc;  };
        allow-query-cache { loc; };
};


server 10.1.0.172 {
keys { ddns-update ; };
};

include "/etc/ddns-update.dnskey";


logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { loc; };
        match-destinations { loc; };
        recursion yes;
//        include "/etc/named.root.hints";
//        include "/etc/named.rfc1912.zones";

zone "abc.com" IN {
        type master;
        file "abc.com.zone";
        notify yes;
        allow-transfer { loc;};
        allow-update {  key "ddns-update" ; };
};

zone "0.1.10.in-addr-arpa" {
      type master;
      file "0.1.10.zone";
      allow-transfer { loc; };
      allow-update { key "ddns-update" ; };
};





};

Slave (named.conf) :

acl loc { 127.0.0.1; 10.0.0.0/8; };
options {
        listen-on port 53 { 127.0.0.1; 10.1.0.172 ; };
        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";

        allow-query     { loc; };
        allow-notify { loc; };
};

include "/etc/ddns-update.dnskey";

server 10.1.0.171 {
    keys {  ddns-update;
    };
};


logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { loc; };
        match-destinations { loc; };
        recursion yes;
//        include "/etc/named.root.hints";
        include "/etc/named.rfc1912.zones";

zone "abc.com" IN {
        type slave;
        file "abc.com.zone";
        notify yes;
        masters { 10.1.0.171; };
        allow-transfer { loc; };
        allow-update { key "ddns-update"; };
};


zone "0.1.10.in-addr-arpa" {
type slave ;
masters { 10.1.0.171; };
file "10.1.0.zone";
};


};





0
Comment
Question by:oppofwar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35125995
You cannot do this. A slave is just that - a slave. It can download zones but only the master can update them.
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35126001
A DHCP server on the Slave system must send DDNS updates to the master, not the local slave DNS
0
 
LVL 3

Author Comment

by:oppofwar
ID: 35126037
Is there any other way to achieve it . Also there are  2 masters how to sync records between them.
0
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35126762
You are breaking the structure by having 2 masters for the same zone (if that is what you're doing). DNS is supposed to be strictly hierarchical
0
 
LVL 3

Author Comment

by:oppofwar
ID: 35127123
duncan we need 2 master for redundancy , this structure is used in many infrastructure.
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35127305
Yes there are lots of duplicates of the root server - I've noticed that before. I would try Google or Wikipedia to find out how they do it. (I had a quick look at Wikipedia and there is a Root nameserver topic, but I didn't see the coordination mechanism in the few seconds I spent looking. As you say, there must be one)
0
 
LVL 3

Accepted Solution

by:
oppofwar earned 0 total points
ID: 35128581
Duncan finally I got the solution . Please find it below

Server 1: Master for abc.com

Create separate view and make it slave of Server 2 with same zone file

Server 2: Slave for abc.com

Create Separate view and make it master of Server 1 with the same zone file.

< -- below goes my named.conf configuration -->

Server 1 :


acl loc { 127.0.0.1; 10.0.0.0/8; };
options {
      listen-on port 53 { 127.0.0.1; 10.1.0.171 ; };
      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     { loc;  };
      allow-query-cache { loc; };
};


server 10.1.0.172 {
keys { ddns-update ; };
};

include "/etc/ddns-update.dnskey";


logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
      match-clients          { loc; };
      match-destinations { loc; };
      recursion yes;
//        include "/etc/named.root.hints";
//        include "/etc/named.rfc1912.zones";
 
zone "abc.com" IN {
      type master;
      file "abc.com.zone";
        notify yes;
        allow-transfer { loc;};
      allow-update {  key "ddns-update" ; };
};



zone "0.1.10.in-addr-arpa" {
      type master;
      file "0.1.10.zone";
      allow-transfer { loc; };
      allow-update { key "ddns-update" ; };
};





};




view abcd {
      match-clients          { loc; };
      match-destinations { loc; };
      recursion yes;
//        include "/etc/named.root.hints";
//        include "/etc/named.rfc1912.zones";
 


zone "abc.com" IN {
      type slave;
      file "abc.com.zone";
        notify yes;
        masters { 10.1.0.172; };
        allow-transfer { loc; };
        allow-update { key "ddns-update"; };



};
};



Server 2:

acl loc { 127.0.0.1; 10.0.0.0/8; };
options {
      listen-on port 53 { 127.0.0.1; 10.1.0.172 ; };
      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";

      allow-query     { loc; };
      allow-notify { loc; };
};

include "/etc/ddns-update.dnskey";

server 10.1.0.171 {
    keys {  ddns-update;
    };
};


logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
      match-clients          { loc; };
      match-destinations { loc; };
      recursion yes;
//        include "/etc/named.root.hints";
        include "/etc/named.rfc1912.zones";
 
zone "abc.com" IN {
      type slave;
      file "abc.com.zone";
        notify yes;
        masters { 10.1.0.171; };
        allow-transfer { loc; };
        allow-update { key "ddns-update"; };
};





zone "0.1.10.in-addr-arpa" {
type slave ;
masters { 10.1.0.171; };
file "10.1.0.zone";
};
};



view abc {
      match-clients          { loc; };
      match-destinations { loc; };
      recursion yes;
//        include "/etc/named.root.hints";
 //       include "/etc/named.rfc1912.zones";
 
zone "abc.com" IN {
      type master;
      file "abc.com.zone";
        notify yes;
        allow-transfer { loc; };
        allow-update { key "ddns-update"; };

};
};





0
 
LVL 3

Author Closing Comment

by:oppofwar
ID: 35170825
Please follow comments
0

Featured Post

Bringing Advanced Authentication to the SMB Market

WatchGuard announces the acquisition of advanced authentication provider, Datablink, with one mission – to bring secure authentication to SMB, mid-market, and distributed enterprises with a cloud-based solution, ideal for resale via their established channel & MSSP community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is intended as an extension of a blog on Aging and Scavenging by the MS Enterprise Networking Team. In brief, Scavenging is used as follows: Each record in a zone which has been dynamically registered with an MS DNS Server will have…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question