Private Nameservers in WHM/cPanel
To set up private nameservers we need to have 2 IP addresses. Let us set up ns1.domain.com and ns2.domain.com
Here are the steps:
Login to whm: https://YourIP:2087
Find the navigation section on the left called Basic cPanel & WHM Setup, under Server Configuration. This is the first item on the left navigation bar. Find Nameservers section at the bottom. If you see ns1.domain.com and ns2.domain.com you can skip this step. If you don't see those name servers, specify them and press "Assign IP address" You can also do this from command line:
nano /var/cpanel/nameserverips.yaml
Edit the file so that it contain your IP adresses and name servers like below:
--- ns1.domain.com: 89.233.106.224: 1 count: 1 zones: domain.com ns1.domain.com: 46.21.145.131: 1 count: 1 zones: domain.com