How To Install BIND9 Master and Slave DNS Server on Ubuntu

juraganet April 20, 2014

Install BIND9 Master and Slave DNS Server on Ubuntu

BIND is a widely used DNS Server. Ideally, DNS server consist of 2 machines that work together simultaneously, one act as master and the other one act as slave. If your domain registrar doesn’t provide you a free DNS server, or if you want to create a custom DNS record, then you might need to host your own DNS server.

In this tutorial, we will cover how to configure BIND9 Master and Slave DNS server. Both server will use Ubuntu OS. We will start configuring the master then the slave.

Install BIND9 Master and Slave DNS Server on Ubuntu

Here are the servers example data:

Server1 (master) IP address: 108.100.100.1
Server2 (slave) IP address: 108.100.100.2
Domain: idroot.net
This domain will be hosted on this server: 192.30.35.67

ON MASTER

Step1. Update ubuntu repository and install Bind using apt-get.

Step2. Configure bind options

Step 3. Store the domain name and zone file setting

Step4. Because in the above config we put zone file in “/etc/bind/zones/idroot.net.db”, then we need to create the folder and file

Install BIND9 Master and Slave DNS Server on Ubuntu

Step 5. (last step on master) Restart bind9 dns service

ON SLAVE

Repeat step 1-2 similar to the master.

Step 3. Configure slave bind options

notice the difference in this config file from the master.

Step 4. Restart bind9 service.

What to do next?

This DNS server will not work until you change your domain’s nameserver. It can be done from your domain’s registrar website. In this scenario, we change nameserver to:

ns1.idroot.net
ns2.idroot.net

Testing BIND

This test could be done either on the DNS server itself or from another server, or from your own PC. In this case, we will do the test from another server running Ubuntu OS.

Step 1. Install dnsutils

Step 2. Do the dig dns test

dig-idroot.net

Step 3. Do the nslookup dns test

 nslookup-idroot.net

BIND DNS Install Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “BIND DNS” installation, starting from $10 (Paypal payment). Please contact us to get a best deal!

Save

Save

Share on Google+3Share on Facebook20Tweet about this on TwitterShare on Tumblr0Share on StumbleUpon12Share on Reddit1Pin on Pinterest2
The Tags:

Leave a Comment