How to setup External Linux-based slave DNS server Print

  • Linux, slave, dns settings, dns server, bind
  • 4

Slave DNS Server

This section describes how to integrate Plesk with an external Linux-based slave DNS server.

The integration can be performed using the Slave DNS Manager extension available in the Extensions Catalog in the Plesk GUI.

The extension works according to the following algorithm:

  1. It registers a slave server in the extension settings.
  2. The slave server’s IP address is automatically added to the list of addresses allowed to transfer domain zones from the Plesk server.
  3. When you create, modify, or delete an active domain zone in Plesk, Plesk creates, modifies, or deletes the domain zone in the local DNS service.
  4. The script starts and receives the domain name and the command to create, modify, or delete a domain zone.
  5. The script initiates the rndc command for each connected slave server.
  6. Slave servers synchronize domain zones with the ones on the Plesk server.

To set up a slave DNS server, do the following:

  1. Install BIND.
  2. apt-get install bind9
  3. Allow creating new zones with rndc. In the /etc/bind/named.conf.optionsfile, in the options {} directive, type allow-new-zones yes;
  4. Specify the IP address from which control instructions should be accepted and set BIND to listen on all accessible network interfaces. In the /etc/bind/named.conf.localfile, type:
  5. controls {
  6. inet * port 953 allow { <plesk_ip>; <another_plesk_ip> 127.0.0.1; };
  7. };
  8. Restart the BIND service by issuing the following command:
  9. invoke-rc.d bind9 restart
  10. Be sure to remember the secret key located in the /etc/bind/rndc.keyfile:
  11. key "rndc-key" {
  12. algorithm hmac-md5;
  13. secret "vwOxonI4n4CVRUhKAOAAIA==";
  14. };

That’s it, the slave name server is set up.

Note: If your Plesk server is behind NAT, the slave DNS server(s) must be outside of it.

After that, install the extension on the Plesk server. In the extension settings, add the slave server and specify its IP address and the secret key. The extension will create a configuration file with the slave server settings for the rndc utility. From now on, Plesk will automatically transfer all created, modified, and deleted zones to the slave server by executing the following commands for each slave server:

Creation

/usr/sbin/rndc -c slave.config addzone example.com '{ type slave; file "/var/lib/bind/example.com"; masters { <plesk_ip>; }; };'

Modification

/usr/sbin/rndc -c slave.config refresh example.com

Deletion

/usr/sbin/rndc -c slave.config delzone example.com

Now, when you add a domain in Plesk, a DNS zone is automatically created on the slave server as well as on the master server


Was this answer helpful?

« Back

<-- removed to be added again -->