LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Setup BIND Slave for two MASTER (https://www.linuxquestions.org/questions/linux-server-73/setup-bind-slave-for-two-master-4175624109/)

betterapp 02-20-2018 12:50 PM

Setup BIND Slave for two MASTER
 
I have 3 servers:

FIRST:
hostname: domain.com
IP: 192.168.0.1 / 192.168.0.2
DNS: ns1.domain.com, ns2.domain.com
with DNS entries:
domain.com. IN NS ns1.domain.com.
domain.com. IN NS ns2.domain.com.
domain.com. IN A 192.168.0.1
ns1 IN A 192.168.0.1
ns2 IN A 192.168.0.2
s1 IN A 192.168.0.100
ns1.s1 IN A 192.168.0.100
ns2.s1 IN A 192.168.0.100
s2 IN A 192.168.0.200
ns1.s2 IN A 192.168.0.200
ns2.s2 IN A 192.168.0.200

SECOND:
hostname: s1.domain.com
IP: 192.168.0.100
DNS: ns1.s1.domain.com, ns2.s1.domain.com

THIRD:
hostname: s2.domain.com
IP: 192.168.0.200
DNS: ns1.s2.domain.com, ns2.s2.domain.com

I am trying to figure how can I setup one BIND as master and slave for two different masters.
SERVER 1
BIND is MASTER for domain.com zone.
BIND is slave for zones from S1 and S2

How should I configure BIND on those 3 servers to make it work ?

MensaWater 02-21-2018 09:43 AM

In your main "options" section section you have to allow query from the slave.
For one of my slave servers I have:
Code:

options {
        directory "/var/named";
        query-source address x.x.x.x;                              <This server's IP address
        allow-query { internaldns; externaldns; };                  <ACLs I created that specify IP addresses
        allow-recursion { internaldns; externaldns; };              <Same ACLs
        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";
        version none;
};

For each domain (zone) you define below main options section you can tell it the type (slave or master) and if a slave the master IP to query:
Code:

zone "ralph.com" {
        type slave;
        file "slaves/ralph.com";
        masters { x.x.x.x; };                      <IP of the master for this zone
        allow-query { any; };
};

zone "billybob.com" {
        type master;
        file "masters/billybob.com";
        allow-query { any; };
};

A good online book for all things DNS:
http://www.zytrax.com/books/dns/


All times are GMT -5. The time now is 05:35 PM.