WHM/Cpanel master slave replication

In order to configure WHM/Cpanel 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 WHM/Cpanel nameserver

1
Navigate to “Server Configuration” → “Basic WebHost Manager® Setup” scroll down to the “Nameservers” section”
2
Change the name servers to “ns1.premiumdns.zone” and “ns2.premiumdns.zone” or your own pre-configured vanity nameservers.

3

In WHM navigate to “Service Configuration” → “Nameserver Selection”

4
Note the nameserver you are running and continue with the steps based on the active Nameserver

5
Login in with SSH on your server
6
Configure your Nameserver for replication
Configure your Name server for replication; BIND
Configure your Name server for replication; Power DNS

Configure your Name server for replication; BIND
6a
Open /etc/named.conf with your preferred editor
6a
In the options section replace
      allow-transfer    { "none"; };

With

allow-transfer {
            83.136.34.50;
            2a02:850:8::50;
      };
      also-notify {
            83.136.34.50;
            2a02:850:8::50;
     };
6a
Check the configuration by executing
      named-checkconf /etc/named.conf

Resolve any errors that might appear, when there are no errors there is no output from the command.


Configure your Name server for replication; Power DNS
6b
Open /etc/pdns/pdns.conf with your preferred editor
6b
Set the disable-axfr option to no
      disable-axfr=no
6b
Uncomment the allow-axfr-ips option and add ,83.136.34.50,2a02:850:8::50
     allow-axfr-ips=127.0.0.0/8,::1,83.136.34.50,2a02:850:8::50
6b
Uncomment the also-notify option and set to 83.136.34.50,2a02:850:8::50
      also-notify=83.136.34.50,2a02:850:8::50

Resolve any errors that might appear, when there are no errors there is no output from the command.


7

Navigate to “Restart Services” → “DNS Server” and restart the service

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. Automation based on hooks, we do not have an example for this available. cPanel has no unified hooks for creation/deletion of zones. At least the following hooks need to be considered
    1. Whostmgr->Accounts::Create
    2. Whostmgr->Accounts::Remove
    3. cPanel->Api2::AddonDomain::addaddondomain
    4. cPanel->Api2::AddonDomain::deladdondomain
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.