Plesk master/slave replication

In order to configure Plesk for master slave replication for use with the Realtime Register Premium DNS-servives, follow the instruction below.

Setup master/slave replication for all zones on your Plesk nameserver

1
In Plesk admin navigate to “Tools & Settings” → “General settings” → “DNS Settings””
2
Change the name servers in the zone records template to “ns1.premiumdns.zone” and “ns2.premiumdns.zone” or your own pre-configured vanity nameservers.
3

Remove the “ns1.<domain>.” and “ns2.<domain>.” records

4
Select “Transfer Restrictions Template” → “Add IP Address”

5
Enter 83.136.34.50 and Save

6
Repeat for step 5 for 2a02:850:8::50 and Save
7

Select “Server-wide Settings”, add the following snippet to “Additional DNS settings” and select Apply

also-notify {
    83.136.34.50;
    2a02:850:8::50;
};<br>

8
This takes care of automatic replication of the content of all zones and the default name servers for newly create zones, before a zone can be replicated it needs to be provisioned in our platform with the IP address of your server as master. To create (and delete) zones you have multiple options:
  1. Create and delete the zones manually trough our portal
  2. Automate the creation and deletion the zones in your backoffice software using our API
  3. Automatically create all zones know on this server and delete zones when removed from the server, see setup instructions for this below

Automatic zone creation & deletion

If you want to automatically create and delete zones for all domains added to or removed from Plesk you can setup the following event listener on your server. For this you need a Realtime Register API key with at least the VIEW_DNS_ZONE, CREATE_DNS_ZONE and DELETE_DNS_ZONE permissions.

The scripts are a basic implementation, you can extend them with any requirements and error handling you require for your specific needs and setup.

As a safety measure the default deletion script will only remove a zone if the master matches the server.

cd /usr/local/psa/admin/plib/registry/EventListener/
wget https://raw.githubusercontent.com/realtimeregister/example-scripts/master/plesk-dns-zones/RealtimeRegisterDNS.php

Configure your API key and server IP address in both scripts.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us