How to configure master/slave DNS servers so they do not conflict with Plesk 8.2

When you need to implement a DNS master/slave relationship, you obviously can go ahead and edit named config files, but when you do next change to DNS configuration using Plesk most your changes will be lost. From the other side Plesk doesn’t provide slave server configuration at all! Here is the solution that works for me on Plesk 8.2. Versions 8.3 and above support the master/slave DNS configuration via web interface.

  1. On slave side
    1. You can safely edit /etc/named.conf – plesk doesn’t touch it and makes all its mods to other files that are included into named.conf. So in our case we put the following either into named.conf or your own file that you will include into named.conf:
       		zone “<your_domain>” {
      
       			type slave;
      
       			file “slave/db.<domain_name>”;
      
       			masters { <ip_of_the_master_dns_server>; };
      
       			};
  2. On master side
    1. We need to permit master to give out the database to slave. You should do it using Plesk so it doesn’t rewrite your configuration
    2. Go to Server->DNS Settings->Common ACL
    3. Click on Add new address, enter your slave server IP, Click Ok

  1. On slave side you need to restart named so it retrieves the database
    1. “/etc/named restart”
    2. In your named.conf file find section “options” and parameter “directory”. This is where named stores the database. Let’s assume it is /var/lib/named like on my server.
    3. “cd /var/lib/named/slave”
    4. Check that file db.<domain_name> exists and its size is greater then 0. If it is that means task is accomplished. If it is not may “tail /var/log/messages” help you.

Leave a Reply