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:
Note: The following instructions are intended for Debian Linux. The sequence of steps on other Linux systems is the same; however, commands, and paths to configuration files might be different.
To set up a slave DNS server, do the following:
apt-get install bind9
rndc. In the /etc/bind/named.conf.options file, in the options {} directive, type allow-new-zones yes;/etc/bind/named.conf.local file, type:controls {
inet * port 953 allow { <plesk_ip>; <another_plesk_ip> 127.0.0.1; };
};
invoke-rc.d bind9 restart
/etc/bind/rndc.key file:key “rndc-key” {
algorithm hmac-md5;
secret "vwOxonI4n4CVRUhKAOAAIA==";
};
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.