Easy DNS Clustering in WebCP

One of the questions we get asked about often is how to achieve DNS clustering in WebCP’s web hosting control panel. It turns out its actually really simple. Most blogs on this topic start off telling you what DNS clustering is. I assume that if you’re reading this you already know what it is, you just want to know how to implement it. Lets dive right in.

Use a regular WebCP install for your DNS Clustering

WebCP’s Web Hosting Control Panel has a completely free license if you host three or fewer sites on it. This means that these licenses can be used in your DNS clustering setup. Simply install WebCP on your DNS servers and get a free WebCP license key for each of them. WebCP is also getting smarter all the time. In a near future version WebCP will auto detect that you do not have any other services running on the server (eg, mail, database, hosting) and will simply keep them disabled, thereby saving resources.

Setting up your DNS clusters

Setting up your DNS clusters in WebCP is fairly simple. You need a minimum of two servers in the cluster with one master and one or more slave DNS servers.

Setting up the master DNS Server

Log into your master DNS server (in our example, ns1.demoserver.co.za). Click on DNS->Settings. You should see a message that this server is not used in DNS.

 

dns settings

  1. Change “This Server” section change the drop down to “This server is: A master”.
  2. In the Authentication section enter a password. This password will also be set in the slaves to authenticate slaves with the master (you’ll also need to copy the public key to the slaves later on).

Now click on the “Save Settings” button. Once the server type (Master) has been set you’ll see new options below the Authentication box to set up your basic SOA record for each domain. Ensure that these values are all set (the defaults should be fairly logical), then press the “Save Settings” button again.

 

dns soa settings

 

You will now notice an additional sub menu item called “Slaves” in the left navigation menu. This is where we set the slaves. We’ll get back to this shortly, lets first set up our slave.

Setting up a slave DNS Server

Now log into the slave DNS server (in our example, ns2.demoserver.co.za). Go the DNS->Settings.

  1. In the “This Server” section select “A slave” from the drop down.
  2. Enter the same password as your master in the Authentication section.

Save the settings.

Once you’ve saved the settings you’ll see an additional section called “Master Settings”. This is where you enter the master DNS server’s hostname, password and public key. Enter those then click on the save settings button.

 

dns slave

 

Once you’ve save those you can click on the “Test Connection” Button to see if the slave can communicate with the master.

 

dns master connection

Creating the DNS Cluster

So far we’ve created a master DNS server and one slave DNS server. We’ve also linked the master to the slave but we still have to add slaves to the master so that it knows where to push zone info.

Go back to your master DNS server (ns1.demoserver.co.za) and click on “DNS->Slaves” to get to the slaves page.

In the “New Slave” section add the slave’s details, host name, password and public key, then click on save.

 

add dns slave

When the page reloads you should see your slave(s) listed and at the bottom the “New Slave” box to add more slaves.

In the same way we tested the connection from the slave to the master we can now test the connection from the master to the slave. Click on the “Test Connection” button and if all works you should get a connection successful confirmation.

 

Adding Zones

Zones can be added / edited manually or added automatically by WebCP. When you create a new domain for a hosting client it will automatically add the zone for that domain into the DNS zones. Of course you can still edit that zone manually.

To add DNS zones manually (ie, they’re not hosted on this server) go to the master DNS server and click on “DNS->DNS” to get to the DNS form.

You will see a listing of your current zones. These can be edited or deleted. Below the listing you’ll see a button to “Add new Zone”.

 

add new dns zone

Enter the domain name and IP address (IPv6 supported) and click on save. You’ll now be able to edit your zone by clicking on the green “Edit Zone” button.

 

I don’t want to use my web server for DNS

Many hosts want to keep DNS off their web servers for performance reasons. What I recommend is setting up your two name servers as per the above. Then, on your hosting servers set them up as DNS slaves. This way your hosting servers will still push zones to the master which will, in turn, push those zones to the slaves. At the present moment, each zone will be listed in the zone file as a valid name server. We’re busy with an option now to not include a slave in the list of name servers (ns rrs) so that in this way the slave server can still push records to the master, but not be listed as a name server and thus won’t be used for DNS.

Leave a Reply

Your email address will not be published. Required fields are marked *