This is a complete step by step instruction:
Get your Slave DNS working (Secondary DNS)
ns1.domain.com as primary DNS
ns2.domain.com as secondary DNS (Slave DNS)
Server 1 which contains your Primary DNS
Server 2 which will contain your Slave DNS after following these Steps
We consider Server 2 as a clean server I mean a server without DNS zones (Customers' domains) also if you have DNS zones already on the server 2 additional settings and commands are necessary which should be done by an expert IT engineer and is beyond the size of this post due to its various cases.
But if you can delete server2 domains & users you can go ahead, don’t forget to use this command at next :
On server 2 In WHM -> DNS Functions -> Perform a DNS Cleanup
B) Before you Begin:
1. Make sure your /etc/hosts & /etc/resolv.conf are correct on all servers
# Do not remove the following line, or various programs
# That requires network functionality will fail.
127.0.0.1 localhost.localdomain localhost
Server2-IP domain.com Server2
# you can have additional nameserver here
2. Using server2 IP address as ns2.domain.com is recommended however you can move the current ns2.domain.com IP to the Server 2 or reserve a new IP on the Server 2, if you want to move IP address first you can delete from server 1, and add to server 2 then reserve it, make sure to “rebuild the IP address pool” on both servers
3. Attention: if you change ns2.domain.com IP, it is required to update
I- /etc/resolv.conf on all servers
II- ns2 “DNS A” record on the primary server (Server1 WHM->DNS Functions->Edit a DNS Zone->domain.com.db )
III- NS2 record within your Domain Registrar
4. Connect to server 2 by SSH and type:
dig axfr domain.com @ip-of-ns1.domain.com
dig axfr domain.com @10.20.30.40
You should see your domain.com DNS records, it ensures that you have domain transfer right
Notice: If you want to know more read about AXFR and IXFR protocols or refer to BIND documents
5. You should have SSH on both servers set-up and working correctly.
6. Initial Name Server (BIND) on Server 2
C) Setting up Slave DNS on Server 2
* Go to server2 WHM and follow these steps
1. Server Setup -> Edit Setup -> in “Master Name Server” field add the IP address of ns1.domain.com
* all other fields should have valid information like BIND version, name servers and etc.
2. DNS Functions -> “Establish A Trust Relationship With a Primary Nameserver”
What you will need to enter during the process is the Master NameServer (server 1) root password
*This Step uses SSH to connect to the Master Server then processing the right commands; SSH connection could be established by various ciphering algorithms -SSH(1) & RSA keys, SSH(2) DSS/DSA keys-, I mean SSH is required on both servers working properly to pass this step. If you experienced any problem about SSH just Post a reply I’ll write another Instruction about How to make SSH key pairs.
3. DNS Functions -> “Synchronize DNS Records With Primary Nameserver”
4. DNS Functions -> Edit a DNS Zone
All of the Zones on Server 1 should be appeared
Congratulations! OK that’s it. Now you have the Slave DNS (Secondary) Online.
Don’t use above instructions if you don’t understand the steps.