{"id":3401,"date":"2019-10-25T10:06:39","date_gmt":"2019-10-25T02:06:39","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&p=3401"},"modified":"2022-10-07T08:13:01","modified_gmt":"2022-10-07T00:13:01","slug":"how-to-set-up-private-nameserver-for-linux-server","status":"publish","type":"kb","link":"https:\/\/www.mondoze.com\/guide\/kb\/how-to-set-up-private-nameserver-for-linux-server","title":{"rendered":"How to set up private nameserver for Linux server"},"content":{"rendered":"\t\t
Most users will want to use a domain name they already own, often the same domain name that is being used for the hostname of the server that will be running the private nameservers.\u00a0<\/p>
For this example, we will use a fake domain called yourdomain.com. Our server is called host.yourdomain.com and we will be setting up ns1.yourdomain.com and ns2.yourdomain.com.<\/p>
There are three parts to setting your private nameservers:<\/p>
This article will guide on how to create a private nameserver for a Linux server.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
1. Log in to your WHM with URL: yourserverIPaddress\/whm<\/i>\u00a0and find the navigation section on the left called\u00a0Basic cPanel & WHM Setup<\/b>, at the bottom, you will find the\u00a0Nameservers<\/i>\u00a0section.<\/p>
2. When you load this screen for the first time you may see that is two nameservers, using the same domain name as the server\u2019s hostname are already in place. You may change the hostname and assign the IP address for the nameserver.<\/p>
3. Key in the new nameserver such as ns1.yourdomainname.com and assign the IP address. You need to have at least two nameserver names configured, so repeat this step to create your second nameserver.<\/p>
4. When finished assigning IP addresses, make sure to click\u00a0Save Changes (3)<\/b>.<\/p>
5. If the domain name for example yourdomainname.com is yet to add to WHM, you may need to create a new Cpanel account or add the DNS zone for yourdomainname.com to enable the DNS for the domain name.<\/p>
6. To add the DNS in WHM, go to the DNS function<\/b>\u00a0and click on\u00a0Add a DNS Zone<\/b>.<\/p>
7. Key in yourdomainname.com and add it with your server IP, then click on Add Zone.<\/p>
8. Once the DNS zone successfully added, go to\u00a0Edit DNS Zone<\/b>, select yourdomainname.com from the list, add below A record for your nameserver under Add New Entries<\/b>:<\/p>
ns1: A record: your nameserver IP address<\/i><\/strong><\/p> ns2: A record: your nameserver IP address<\/i><\/strong><\/p> 9. Click on Save to save the setting.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t