Search Topic

Linux DNS (BIND) Configuration on Centos 6.2/RHEL6

How to Install DNS (BIND) on CentOS 6.2

DNS is very important component of network infrastructure, without DNS we can’t browse a website with host-name. DNS translate human readable hostnames such as www.broexperts.com  into machine readable ip addresses such as 128.123.1.73.

This translation also occurs when you are connecting to other system on your local network through their host-names instead of their IP addresses. Most of Internet DNS Server (root DNS Servers) run BIND as their DNS software.

In this article we are going to cover BIND installation.

Server Name = dns.broexperts.com

Server IP       = 192.168.0.211/24

Step 1. Installation of required packages.

We will use yum to install BIND packages.

# yum -y install bind bind-libs bind-utils

Step 2.  Set BIND service start on system boot

# chkconfig –-level 35 named on

Step 3. Start named service for generating some default configuration files.

# service named start


Step 4. Edit main configuration file and add zone entry of www.broexperts.com.

# vi /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};
zone "broexperts.com" {
        type master;
        file "broexperts.com.fwd";
};
zone "0.168.192.in-addr.arpa" {
        type master;
        file "broexperts.com.rev";
};
include "/etc/named.rfc1912.zones";

Step 5. Create Zone files which we mentioned in named.conf file.

# cd /var/named
# vi broexperts.com.fwd
$ORIGIN broexperts.com.

$TTL 3D

@       SOA     dns.broexperts.com.     root.broexperts.com. (12 4h 1h 1w 1h)

@       IN      NS      dns.broexperts.com.

dns.broexperts.com.     IN      A       192.168.0.211

www                                     IN      A       192.168.0.211
# vi broexperts.com.rev
$ORIGIN 0.168.192.in-addr.arpa.

$TTL 3D

@       SOA     dns.broexperts.com.     root.broexperts.com. (12 4h 1h 1w 1h)

@       IN      NS      dns.broexperts.com.

211     IN      PTR     dns.broexperts.com.

Step 6.  Restart BIND Service

# service named restart

Step 7.  Test your DNS server

Note : Before testing , make sure your /etc/resolve.conf file contain DNS server ip that has been set up.

# cat /etc/resolve.conf

search broexperts.com

nameserver 192.168.0.211
# nslookup www.broexperts.com

Server:         192.168.0.211

Address:        192.168.0.211#53

Name:   www.broexperts.com

Address: 192.168.0.211
# nslookup 192.168.0.211

Server:         192.168.0.211

Address:        192.168.0.211#53

211.0.168.192.in-addr.arpa      name = dns.broexperts.com.

Bind Server Installation + configurations
Bind Caching-Only on CentOs 6.4

Watch Video :

[youtube http://www.youtube.com/watch?v=Hcl7_SFMq4g&w=570&h=425]

 

15 Responses to Linux DNS (BIND) Configuration on Centos 6.2/RHEL6

Leave Reply

Follow Us
  • Facebook
    Likes
    3249
  • Twitter
    Followers
    20
  • You tube
    Scribers
    919
Best Sellings OS
CentOS 7 Order Now
Ubuntu Order Now
Linux Mint Order Now
Puppy Order Now
Netrunner Order Now
Debian Order Now
Robolinux Order Now
Zorin OS Order Now
Linux Lite Order Now
Manjaro Order Now
Bodhi Order Now
Kali Order Now
Simplicity Order Now
PCLinuxOS Order Now
Tails Order Now
Rocks Cluster Order Now
openSUSE Order Now
Lubuntu Order Now
Fedora Order Now
online poll by Opinion Stage
UserOnline