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

L’integrazione può essere effettuata utilizzando l’estensione Gestione DNS secondario disponibile nel Catalogo estensioni della GUI di Plesk.

L’estensione funziona in base all’algoritmo seguente:

  1. It registers a secondary server in the extension settings.
  2. The secondary server’s IP address is automatically added to the list of addresses allowed to transfer domain zones from the Plesk server.
  3. Quando crei, modifichi o elimini una zona di dominio attiva in Plesk, Plesk crea, modifica o elimina la zona di dominio nel servizio DNS locale.
  4. Lo script si avvia e riceve il nome di dominio e il comando per creare, modificare o eliminare una zona di dominio.
  5. The script initiates the rndc command for each connected secondary server.
  6. Secondary servers synchronize domain zones with the ones on the Plesk server.

Nota: le istruzioni seguenti si riferiscono a Debian Linux. La sequenza di passaggi negli altri sistemi Linux è la stessa; tuttavia, i comandi e i percorsi dei file di configurazione potrebbero variare.

Nota: nel server in un determinato momento può essere installata solo una delle seguenti estensioni: Slave DNS Manager, Amazon Route 53 o DigitalOcean DNS. Tutte gestiscono il DNS ed entrano in conflitto, se installate insieme.

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

  1. Installa BIND.

    apt-get install bind9
    
  2. Consenti la creazione di nuove zone mediante rndc. Nel file /etc/bind/named.conf.options, nella direttiva options {}, digita allow-new-zones yes;

  3. Specifica l’indirizzo IP dal quale si dovrebbero accettare le istruzioni di controllo e attiva il rilevamento da parte di BIND in tutte le interfacce di rete disponibili. Nel file /etc/bind/named.conf.local, digita:

    controls {
        inet * port 953 allow { <plesk_ip>; <another_plesk_ip> 127.0.0.1; };
     };
    
  4. Riavvia il servizio BIND tramite il comando seguente:

    invoke-rc.d bind9 restart
    
  5. Assicurati di ricordare la chiave segreta inclusa nel file /etc/bind/rndc.key:

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

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

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

After that, install the extension on the Plesk server. In the extension settings, 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 transfer all created, modified, and deleted zones to the secondary server by executing the following commands for each secondary 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 secondary server as well as on the primary server.