Adding a Secondary Zone Transfer

To add a secondary zone transfer to your SAMBA / BIND DNS you must do two things:

  • Enable Zone transfers
  • Create the specific Zone Transfer for the zone you desire

In both of these cases you’ll need to edit the same file.

Enabling Zone Transfers

  1. Edit the file /etc/bind/named.conf.options with a text editor
 nano /etc/bind/named.conf.options
  1. Add the following text block inside the options{} array.
# Disable zone transfers
allow-transfer {
    192.168.1.4;
    192.168.1.5;
};

Beware of changing/adding the IP to the DNS you wish to transfer/query the zone to.

Creating a Zone Specific Transfer

To add a Zone Transfer make sure you’ve completed the previous step and enabled zone transfers. Then, in the same file you can, in the end, add the following text block.

nano /etc/bind/named.conf.options

Single-Label Domain

zone "singlelabeldomain." {
    type slave;
    file "db.singlelabeldomain";
    masters { 192.168.1.4; };
};

Standard Top-Level Domain

zone "top.level.domain" {
    type slave;
    file "db.top.level.domain";
    masters { 192.168.1.5; };
};