Simple – Linux BIND / DNS Server Install using Webmin

BIND – Berkeley Internet Name Daemon (BIND) is the reference implementation of the Domain Name System (DNS) protocols. The software consists, most prominently, of the DNS Server component, called named. In addition the suite contains various administration tools, and a DNS resolver interface library. It is the most widely used DNS software.

It is a recommended practice that you have two nameservers. They will act as a primary and a secondary servers in case one fails.

The steps below outlines the installation and configuration of BIND using Webmin on a CentOS 6 server.

Installation and Configuration

Install BIND

  • #yum install bind bind-utils bind-libs bind-chroot caching-nameserver

Set the DNS service to start on boot

  • #chkconfig named on

Start DNS Service

  • #service named start

Setting up the bind server using webmin

  • Please refer to installing webmin at the following link – Installing Webmin
  • Modify the /etc/resolv.conf file
  •       domain  <domain_name_of_choice>
  •       search   <domain_name>
  •       nameserver <ip_address_of_the_chosen_server>
  • Disable Firewall if necessary
  • Change the hostname
  •        hostname <hostname>
  • Change the hosts file to reflect the above changes
  •        vi /etc/hosts
  •         <ip_address>      <hostname>
  •         <ip_address>      <domain_name>
  • Delete any other entry found in this hosts file
  • Check hostname by running the command
  •          #hostname

Access Webmin from any browser. Once you are logged in refresh all the modules so that Webmin can pickup its status.

Configure Webmin to use the bind / dns module

  • After installing the bind-chroot command
  • Click Module Config under – BIND DNS Server
  • Change the chroot directory to run BIND under – /var/named/chroot
  • Select Yes for – Is named.conf under chroot directory

Create bind services using the following

  • Server -> BIND DNS Server -> Create Master Zone
  • Fill the boxes and click create
  •     Domain name / network – <domain_name>
  •     Master Server – <domain_server>
  •     Email Address – Use any email address that you wish to use
  •     Select Yes to – Use zone template
  •     Click Create
  •     Go to – Address

Add Address Record Page

  • Enter the name of the server
  • Enter the IP Address of the server
  • Click Create

Add the reverse address of the server

  • Click reverse address
  • Type the IP Address
  • Type the hostname
  • Click Create

Once both the forward and reverse entries are created test the DNS Server

  • Run the hostname command – #hostname
  • Run the ping command – #ping <hostname>
  • Run the ping command – #ping <domain_name>
  • Run the dig command – #dig <domain_name>
  • Run the nlookup command – #nslookup <ip_address>

This is the end of – Simple – Linux BIND / DNS Server Install using Webmin

We can now add A and PTR records to the zone files.



Setting up Webmin on CentOS 6.4


  • This will show you how to setup Webmin using yum repository in CentOS 6.4.
  • Webmin is an open source system administration and system configuration tool which provide you web-based interface to manage, administer and configure your server.
  • It provides graphical interface remote administration instead of manually editing the configuration using command line from putty or console.


  • Enabling yum repository for Webmin
  • Create the /etc/yum.repos.d/webmin.repo file with the following contents
  •                        $vi /etc/yum.repos.d/webmin.repo
  • Add the following lines to the file

name=Webmin Distribution Neutral

  • Fetch and install the GPG Key
  •                  $wget
  •                  $rpm –import jcameron-key.asc
  • Run “yum install” command to install all required dependencies
  •                  $yum install webmin –y
  • By default Webmin runs on port 10000, therefore port 10000 need to be open in order to allow you to access web base interface remotely
  •                  $sudo iptables –I INPUT –m state –state NEW -m tcp –p tcp –dport 10000 –j ACCEPT
  •                  $sudo service iptables save
  •                  $sudo service iptables restart
  • Access and login to Webmin using URL – http://ip_address_of_server:10000