Setting up BIND8 [DNS and Nameservers] in Webmin

Setting up nameservers and DNS in general is faily easy to do using BIND8 software which is most widely used to configure such things.


Installing BIND8


Before using BIND8 we have to actually download it.

You can simply go to your VPS’ address: and login and then go to

There you can with only one click install BIND8.

Or you can simply install it using SSH and Putty software.

To dowload BIND8 use this command in CentOS (for other OS like Debian you could use apt-get):


.. after is downloaded use this line of command to install BIND8 if you are using CentOS:

yum install bind


It might ask do you want to download package, just press “y” and hit ENTER.


Registering DNS at some DNS Provider(e.g.


Now, if you didn’t already, register DNS. Just login to your hosting site where is domain you want to use registered and make 2 nameservers ns1 and ns2. If you are using Godaddy as me, login there, go to My Account > Domains > Launch.

Select domain and scroll down to Host Summary and click Add

Here is pic how I did it on

It might take a few hours to get DNS system refreshed.


Setting up DNS and Address Records in Webmin (BIND8)


Now go to BIND8 in your Webmin control panel and
Leave options on default and just press Create Primary Configuration File and Start Nameserver like on picture below:

Under Existing DNS Zones click on Create master zone.

Leave everythins as default except Domain name/Network, there you write your domain name and in Master Server write ns1. Email address is your email address and IP Address for template records is IP Address of your VPS

For better understandings, I made a screenshot:

After Master Zone is created click on Address icon in top left angle.

Now you will see window with 2 boxes:



In Name put your domain name and in Address IP Address. Click Create.

In Name write ns1, and in Address type IP Address of your VPS. Click Create.

Then again, in Name write ns2 and in Address write IP Address.

Now you should get something like this:

Now in right top corner click Apply Zone and Apply Configuration. And that’s it. Now just go and Create Virtual Host


BIND8 Config File


Here is BIND8 configuration file if someone wants to take a look. Notice, I didn’t create MX (email) Address Records. This BIND8 confi file is very simple and basic.

$ttl 38400    IN    SOA    ns1. (
38400 )    IN    NS    ns1.    IN    A    IN    A    IN    A

Leave a comment