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.



Linux Networking – Interface Bonding / Teaming

Linux bonding driver provides a method to aggregate multiple network interface cards into a single logical / teamed / bonded interface. The behaviour depends on the mode of the bonding that we choose, but generally speaking the modes provide either hot standby or load balancing.

Bond Interfaces can be very useful if you want to divide the entire network using VLANs and allow per VLAN traffic with the view to have reliable and redundant network connectivity. Here, I am trying to provide a procedure to create a bonded interface under CentOS 6.4. This is not a new concept but it provides a tested procedure that I have used to create my setup which is named as “The Matrix” – The Matrix


  • In order for us to have a reliable network and have the ability to use VLAN’s a bonded interface is created so that the load can be split on both the interfaces with the flexibility of using more than one network
  • To separate the traffic the use VLANs and bridge interfaces is common. For the separation, we used VLANs and the bridge interfaces that would be connecting to the virtual hosts would not be connected to the physical interfaces, but instead would be connected to the virtual interfaces that we would be configuring as part of the Linux VLAN configuration
  • Based on the article at the following location, I decided to put together the following configuration which will be used for the Controller and the Compute Nodes
  • Setting up the /etc/sysconfig/network configuration file
    • #vi  /etc/sysconfig/network
    • Add / Change the following information
      • HOSTNAME=<hostname_of_the_controller>
      • NETWORKING=yes
      • #IPV4
      • NOZEROCONFIG=yes
      • #IPV6
      • NETWORKING_IPV6=yes
      • IPV6INIT=yes
  • Go to /etc/sysconfig/network-scripts
  • Create interface – bond0
      • DEVICE=bond0
      • IPV6INIT=no
      • NM_CONTROLLED=no
      • USERCTL=no
      • BOOTPROTO=none
      • ONBOOT=yes
      • NOZEROCONF=yes
      • TYPE=unknown
  • Change interface – eth0
      • DEVICE=eth0
      • HWADDR=00:25:90:1A:E9:76
      • TYPE=Ethernet
      • UUID=f48b72fb-ae8f-4202-b707-23c88b79ef31
      • ONBOOT=yes
      • NM_CONTROLLED=yes
      • BOOTPROTO=none
      • MASTER=bond0
      • SLAVE=yes
      • NOZEROCONF=yes
  • Change Interface – eth1
      • DEVICE=eth1
      • HWADDR=00:25:90:1A:E9:77
      • TYPE=Ethernet
      • UUID=13c7c9ec-0bdc-432f-a898-f4e5cd3c0358
      • ONBOOT=yes
      • BOOTPROTO=none
      • USERCTL=no
      • MASTER=bond0
      • SLAVE=yes
      • NOZEROCONF=yes
  • Modify the file – /etc/modprobe.d/bonding.conf
      • alias bond0 bonding
      • options bond0 mode=5 miimon=100 arp_interval=100
      • #modprobe  bonding
  • Since I was using VLANs, I will now create the VLAN interface on top of bond0, bond0.140 and bond0.180 pointing to the appropriate bridge interfaces
    • #vi  /etc/sysconfig/network-scripts/ifcfg-bond0.140
      • DEVICE=bond0.140
      • VLAN=yes
      • BOOTPROTO=static
      • ONBOOT=yes
      • TYPE=Ethernet
      • IPADDR=<ipaddress>
      • NETMASK=
      • GATEWAY=<gateway_ipaddress>
  • #vi  /etc/sysconfig/network-scripts/ifcfg-bond0.180
      • DEVICE=bond0.180
      • VLAN=yes
      • BOOTPROTO=static
      • ONBOOT=yes
      • TYPE=Ethernet
      • IPADDR=<ipaddress>
      • NETMASK=
      • GATEWAY=<gateway_ipaddress>
  • Once the networking was configured, applied static routes to the interfaces did not work and I was unable to ping both the bonded interfaces. The interface that I was able to ping was the one that came up first. Following was the output of the routing table
    • router_output
  • After doing some research, I concluded that I can use the Linux kernel as routers and as many routers do they can route packets from one network to the other.
  • In my network I am using two VLAN <vlan_id> and <vlan_id>, so the following changes were made in order to ping both the networks
      • #cd /etc/
      • #vi sysctl.conf
      • Look for – net.ipv4.conf.default.rp_filter
      • Change the value from 1 to 2. And if this value is not available then add the value.
      • Reload sysctl
      • #sysctl  -p
  • Finally I got this working and all the tests for redundancy is finally completed.