This section describes how to integrate Plesk with an external Linux-based secondary (slave) DNS server. This server will copy the zone data from your primary DNS server, but cannot change that data.

Эту интеграцию можно выполнить с помощью расширения Slave DNS Manager, доступного в Каталоге расширений в интерфейсе Plesk.

Примечание: В один момент времени на сервере может быть установлено только одно из следующих расширений: Slave DNS Manager, Amazon Route 53 или DigitalOcean DNS. Все они управляют DNS и, в случае одновременной установки, будут конфликтовать между собой.

Configure a secondary (slave) DNS server:

Примечание: 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.

  1. Install BIND if it is not already installed. BIND is an open-source DNS management software program. You can check if it is installed in the :doc:`Services Management <59418>` interface in the Tools & Settings > Server Management > Services Management section, where it appears as «DNS Server (BIND)». If BIND is not installed, you can install it with the following command:

    apt-get install bind9
    
  2. In the named.conf file on the secondary DNS server, add the following required information:

    • The enabled allow-new-zones option in the options directive. If this directive does not exist, you can add it.
    • A secret key.
    • The IP address of the primary DNS server and an instruction for BIND to accept connections from it.

    Your named.conf file additions will look like the following example:

    options {
        ...
    allow-new-zones yes;
     };
    key "rndc-key-10.69.43.240" {
    algorithm hmac-sha256;
    secret "YTQ2OGZiY2E4MDliMTY5OThkOGYyYw==";
    };
    controls {
    inet * port 953 allow { 10.69.43.240; 127.0.0.1; } keys { "rndc-key-10.69.43.240"; };
    };
    
  3. Save your named.conf changes, then restart the BIND service by issuing the following command:

    invoke-rc.d bind9 restart
    
  4. To make sure that you have a copy of your secret key available, add it to the /etc/bind/rndc.key file. For example:

    key "rndc-key" {
        algorithm hmac-md5;
        secret "vwOxonI4n4CVRUhKAOAAIA==";
     };
    

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

Примечание: Если ваш сервер Plesk работает под управлением NAT, вторичные серверы DNS должны быть за ее пределами.

Configure Plesk for a secondary (slave) DNS server:

To configure Plesk to recognize your secondary DNS server, add it in the Slave DNS Manager extension.

Add the secondary server and specify its IP address and the secret key. The extension will create a configuration file with the secondary server settings for the rndc utility.

From now on, Plesk will automatically use the following commands to transfer all created, modified, and deleted zones to the secondary server:

Создание

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

Изменение

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

Удаление

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

Теперь при добавлении домена в Plesk для него будет автоматически создаваться DNS-зона на вторичном сервере, так же как и на первичном сервере.

More information about the extension’s algorithm:

The Slave DNS Manager extension works according to the following algorithm:

  1. Оно регистрирует вторичный сервер в настройках расширения.
  2. The secondary server’s IP address is automatically added to the list of addresses that are allowed to transfer domain zones from the Plesk server.
  3. Когда вы создаете, изменяете или удаляете активную доменную зону в Plesk, Plesk создает, изменяет или удаляет доменную зону в локальной службе DNS.
  4. Скрипт запускается и получает доменное имя и команду на создание, изменение или удаление доменной зоны.
  5. The script initiates the rndc command for each connected secondary server.
  6. Вторичные серверы синхронизируют доменные зоны с зонами на сервере Plesk.