[[+content_image]]
R
R
Roman Kutenko2013-05-25 08:38:23
Domain Name System
Roman Kutenko, 2013-05-25 08:38:23

Help with configuring slave dns server

The task is as follows, there are 2 servers, the primary is raised on the main one, on the second slave dns.

Master

[[email protected] ~]# cat /etc/named.conf 
options {
        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";
        //recursion yes;

        allow-query { any; };
        version "Forbidden";
        listen-on port 53 { 178.89.xxx.ccc; };
        allow-recursion { none; };
        allow-transfer { 178.89.aaa.bbb; };

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        bindkeys-file "/etc/named.iscdlv.key";
        managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

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


zone "xxx.89.178.in-addr.arpa" IN {
  type master;
  file "/var/named/xxx.89.178.in-addr.arpa";
  allow-update { none; };
};
zone "site.ru" {
        type master;
        file "/var/named/site.ru";
        notify yes;
};
zone "another-site.ru" {
        type master;
        file "/var/named/another-site.ru";
};


slave

[[email protected] ~]# cat /etc/named.conf 

options {
        listen-on port 53 { 178.89.aaa.bbb; 127.0.0.1; };
        listen-on-v6 port 53 { none; };
        version "No info";
        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";
        recursion no;
        allow-recursion { any; };
        allow-query { any; };
        allow-query-cache { any; };

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        bindkeys-file "/etc/named.iscdlv.key";
        masterfile-format text;
        managed-keys-directory "/var/named/dynamic";
};

logging {
      category lame-servers { null; };  
      channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "." IN {
        type hint;
        file "named.ca";
};

zone "site.ru" IN {
        type slave;
        file "/var/named/site-slave/site-slave.conf";
        masters { 178.89.xxx.ccc; };
};

key "rndc-key" {
        algorithm hmac-md5;
        secret "fergergergerg";
};

controls {
       inet 127.0.0.1 port 953
       allow { 127.0.0.1; } keys { "rndc-key"; };
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";


Question! How, when adding another-site.ru on the master, to automatically add it to /etc/named.conf of the slave server?
The zone file, as I understand it, should automatically be attracted to the slave?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
A
Anastasia_K, 2013-05-25
@Anastasia_K

no way normally. as an option, you can parse the config on the master with a script, and on its basis generate the slave config. The zone file is pulled to the slave automatically, but the zone must be specified in the config.

A
Andrey Burov, 2013-05-25
@BuriK666

Look towards rndc

J
Jodes, 2013-05-26
@Jodes

Use notify-source and transfer-source.
They allow you to notify slaves about changes to zone files and copy the changes accordingly if memory serves.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question