2

I have Bind9 on Debian for NS1 and NS2 They are two virtual machines.

I create a file /etc/bind/zones/db.domain.com Then I have to add this to the /etc/bind/named.conf.local

zone "domain.com" { type master; file "/etc/bind/zones/db.domain.com"; allow-transfer { THE.IP.OF.NS2; }; allow-update { none; }; };

Then when I do a reload I it works on NS1, but Have to go into NS2 and also change the /etc/bind/named.conf.local

zone "domain.com" { type slave; file "/etc/bind/zones/db.domain.com"; masters { THE.IP.OF.NS1; }; allow-transfer { none; }; };

From now on when I do a reload/restart on NS1 it replicates the /etc/bind/zones/db.domain.com to NS2.

Is there a way to repilcate the content of /etc/bind/named.conf.local to the Slave, so I dont have to add every time the new domains on ns2 by hand?

Thanks!

Tibby
  • 215
  • 1
  • 3
  • 9
  • 2
    You could probably do it with something like puppet or chef (etc) but it's not a simple case of copying a file, or a few stanzas of code, it's different code on each side. – NickW Apr 23 '14 at 09:28
  • I meant is there any functions that I might dont know that would repilcate the named.conf.local to te slave? Like an option that I would have to add to the named.conf.options ?? or something? – Tibby Apr 23 '14 at 09:31
  • 1
    None that I've ever heard of, it would certainly be non trivial to implement. – NickW Apr 23 '14 at 09:37

1 Answers1

1

No, this is not possible with BIND provided tools.
You will need to implement this in you configuration management system yourself.

faker
  • 17,496
  • 2
  • 60
  • 70