How To install BIND on Ubuntu 16

September 10, 2016

How To install BIND on Ubuntu 16

BIND (Berkely Internet Name Domain) is a popular software for translating domain names into IP addresses and usually found on Linux servers. This article will explain the basic concepts of DNS BIND and analyse the associated files required to successfully setup your own DNS BIND server. After reading this article, you will be able to successfully install and setup a Linux BIND DNS server for your network.


Type this command then hit enter:

Once done you’ll see a message saying:


So you have installed BIND9 on your server. It is time to show you a basic configuration how to setup your domain to resolve to your server. Here’s what I did. Type following command then hit Enter on your keyboard:

Nano editor screen will appear. Copy-paste command below into your favorite text editor like Notepad, Notepad2 or Notepad++:

Again, in any command in this page you’ll need to replace “” with your own domain name and corresponding TLD. E.g: Also, you have to replace with IP address of your server.

Once you’ve done editing necessary values, you can paste it to Nano editor screen. You can also simply type command syntax above to Nano editor screen while replacing necessary value during your typing.

Now hit Control+O on your keyboard to save the file then hit Control+X to exit Nano editor.

Then go to bind directory to make things easier. Type this command:

Create new directory called “zones” inside it.. Use this command:

Now go enter that directory as well..

Then create new file called “nano“. Type this command:

of course at this part you’ll also need to replace “” with your own domain name. Example:

That command brings Nano editor screen up once again. Next, you can either copy these syntax to Notepad first then edit it or simply type it in Nano editor directly:

Here’s an example of mine:

If you have two IPs, you can replace “ns2 IN A” with your second IP address. Otherwise simply use the same IP.

Once done editing, hit Control+O to save that file then hit Control+X to exit Nano editor.

Next step, it’s time to define reverse DNS lookup. Sounds not so familiar? Don’t worry simply repeat my steps. Type this command syntax:

That will open Nano editor screen again but this time you will edit another file. Add following lines inside that file..

Replace “” with your own server’s host name. Once done, press Control+O to save followed by Control+X to exit.


That’s not done yet. There is another file you have to edit. Run this command:

Now add following line at very top of any lines you see there:

Once done, press Control+O to save followed by Control+X to exit. That is it. But to make sure that Bind9 can apply all recent changes above, you better restart Bind9 service using this command:



In this case lets install additional tool called “DNS Utility”. Here’s how to install it:

Once the install process finished, type following command:

If everything is set correctly you’ll see something like this one below.