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
- 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 tono
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 to83.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:
- Create and delete the zones manually trough our portal
- Automate the creation and deletion the zones in your backoffice software using our API
- 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
Whostmgr
->Accounts::Create
Whostmgr
->Accounts::Remove
cPanel
->Api2::AddonDomain::addaddondomain
cPanel
->Api2::AddonDomain::deladdondomain