How to Install and Configure Bind9 DNS on Ubuntu 11.10

BIND, standing for “Berkeley Internet Name Domain”, is the most widely utilized Domain Name System (DNS) software on the internet for providing DNS services.

This tutorial will guide you through the process of installing and configuring BIND 9 DNS service on an Ubuntu server. The steps are designed for Ubuntu 11.10, but they may also be applicable to other versions with minor adjustments.

Step 1: Install BIND 9

To install BIND 9, open your terminal and run the following command:

sudo apt-get install bind9 -y

Step 2: Set Up and Configure a Zone

Next, you’ll need to set up and configure a zone. In this example, we’ll use “webhostinggeeks.local” as the zone name. To do this, open the named.conf.local file with the following command:

sudo vim /etc/bind/named.conf.local

Add a DNS zone to BIND9 by editing the named.conf.local file as shown below:

// Do any local configuration here
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "webhostinggeeks.local" {
 type master;
 file "/etc/bind/db.webhostinggeeks.local";

Step 3: Use an Existing Zone File as a Template

Copy an existing zone file and use it as a template for your new zone file. To do this, run the following command:

sudo cp /etc/bind/db.local /etc/bind/db.webhostinggeeks.local

Next, edit the new zone file db.webhostinggeeks.local:

sudo vim /etc/bind/db.webhostinggeeks.local

Change the configuration as shown below:

; BIND data file for local loopback interface
$TTL 604800
@ IN SOA ns.webhostinggeeks.local. root.webhostinggeeks.local. (
 2 ; Serial
 604800 ; Refresh
 86400 ; Retry
 2419200 ; Expire
 604800 ) ; Negative Cache TTL
@ IN NS ns.webhostinggeeks.local.
ns IN A
box IN A

Step 4: Restart BIND 9

Any changes made to the zone file will require BIND9 to be restarted before they take effect. To restart BIND9, run the following command:

sudo /etc/init.d/bind9 restart

Step 5: Point Your Server to the DNS Server

Ensure that your workstation or server ispointing to the DNS server. In this case, the Ubuntu server should point to itself since it’s running BIND9. To do this, edit the /etc/resolv.conf file:

sudo vim /etc/resolv.conf

Then, add the following line to the file:


Step 6: Test Your BIND 9 Server

Finally, test your BIND9 server to ensure it’s working correctly. To do this, run the following commands:

> set type=ns
> webhostinggeeks.local

The output should look something like this:

webhostinggeeks.local nameserver = ns.webhostinggeeks.local.

Commands Mentioned

  • sudo apt-get install bind9 -y – Installs BIND 9
  • sudo vim /etc/bind/named.conf.local – Opens the named.conf.local file for editing
  • sudo cp /etc/bind/db.local /etc/bind/db.webhostinggeeks.local – Copies an existing zone file to use as a template
  • sudo vim /etc/bind/db.webhostinggeeks.local – Opens the new zone file for editing
  • sudo /etc/init.d/bind9 restart – Restarts BIND 9
  • sudo vim /etc/resolv.conf – Opens the resolv.conf file for editing
  • nslookup – Starts the nslookup command for network troubleshooting
See also  How to Configure Static IP Address and Set Hostname on Fedora 20


In this tutorial, we’ve walked through the process of installing and configuring BIND9 on an Ubuntu 11.10 server. This process involves installing the software, setting up and configuring a DNS zone, using an existing zone file as a template, restarting BIND9 to apply changes, and testing the server to ensure it’s working correctly.

Remember, the steps outlined here are specific to Ubuntu 11.10 and may require adjustments for other versions or distributions. Always ensure to test your configurations to ensure they’re working as expected.

See also  How to Install DiG on Ubuntu

For more information on web hosting and servers, you can visit our pages on dedicated server, VPS server, cloud hosting, and shared hosting.

We hope this guide has been helpful in setting up BIND9 on your Ubuntu server.

If you have any further questions, feel free to ask.

Frequently Asked Questions

  1. What is BIND in DNS?

    BIND, standing for “Berkeley Internet Name Domain”, is a software that implements the DNS protocols for the internet. It is the most widely used DNS software.

  2. Why do I need to restart BIND9 after making changes?

    Restarting BIND9 allows it to load the new configuration and zone files that you’ve edited. Without a restart, BIND9 would continue to use the old configuration.

  3. What is the purpose of the named.conf.local file in BIND9?

    The named.conf.local file is used for localconfiguration in BIND9. It’s where you define your DNS zones.

  4. What is a zone file in BIND9?

    A zone file in BIND9 is a text file that describes a DNS zone. It contains mappings between domain names and IP addresses and other resources, organized in the form of text representations of resource records.

  5. What does the nslookup command do?

    The nslookup command is used to query DNS servers to find DNS details, including IP addresses of a particular computer, the DNS record, and more. It’s a useful tool for network troubleshooting.


1 Comment

Leave a Reply

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