Now that we’ve seen how to set up DNSONLY on a fresh server, let’s start the process of converting a full-fledged WHM installation and a corresponding DNSONLY server into a cluster. For this, I’m going to assume that you have two separate IP addresses – one for the main WHM server, and the other assigned to the DNSONLY mirror. I’m also going to assume that we have a domain name specifically dedicated for this purpose and that you have access to the registrar information. In this tutorial, my domain name is “ihavetoretire.com” and my registrar is Godaddy, so I’ll be using their screenshots. I’ll be starting from a clean installation, so just follow along.
Changing Registrar Information
By default, domain registrars use their own DNS servers for resolving your domain name. We’re going to change that and plug-in our own domain instead. Log into your Godaddy account and navigate to the “Domains” section and select the domain that you want to set up as your DNS address. In the resulting screen, there are two things that you need to change – the host names, and the nameservers. Scroll down till you see the former and click “Manage”:
Over here, enter the names of two nameservers – usually ns1 and ns2. Assign each of them an IP address corresponding to each of your two servers. Remember which ones you have allocated to each since we need to replicate this information at the server.
In the next step, locate the “Nameservers” field. By default, these will be populated with your registrar’s DNS servers. Again, click “Manage” to change this:
In the Godaddy interface, select the “Custom” option and enter the names of the two DNS servers you created in the previous step – namely ns1 and ns2. You don’t have to enter any IP addresses in this step.
This concludes the configuration at the registrar’s end. Now we have to complete the setup at the server.
Configuring the WHM Server
Login to your full-fledged WHM installation corresponding to one of the IP addresses you used for your DNS. Once you’ve logged in as root, you have to create a new account with the domain name that we just used at the registrar’s. So scroll down to “Account Functions” and select “Create a New Account” and enter the details of your new domain as shown here:
Once this is set up, WHM automatically configures the “A” records. Now we need to edit the DNS zone file and create a few more entries for our DNS server. Under “DNS Functions”, select “Edit DNS Zone”, select the entry for the domain name we just created, and click “Edit”.
Here, will be creating two types of DNS records – “A”, and “NS”. The “A” records will associate ns1 and ns2 with our two IP addresses and the “NS” records will specify them as nameservers. Enter the information using the following screenshot as a guideline. Keep in mind that you should assign the same IP addresses to ns1 and ns2 that you gave when modifying the registrar’s records.
After saving the DNS zone file, we have to make one final change to our WHM configuration to use the nameservers we just created. Under “Server Configuration”, click “Basic cPanel & WHM Setup”. In the resulting screen, scroll all the way down to the bottom and enter the full DNS addresses of the two nameservers in the text boxes as shown here:
This concludes the setting up of one of the two DNS name servers. So far we haven’t touched the DNSONLY installation. In fact, in the next article we’ll see how to use it as a mirror for the first one both to balance the load as well as to act as a backup in case the primary DNS server fails. The setup is ideal because DNSONLY has a very limited set of GUI options for managing records. But we can avoid fiddling around with files by having it mirror the configuration from elsewhere.