Tuesday 16 February 2016

DNS Server Configuration named in RHEL

Pr-requisition install named

Very simple method just two steps to setup dns server for private LAN network.

Step-1:

File :   /etc/named.config

/
// named.conf for caching-nameserver
//

options {
        directory "/var/named";
        listen-on-v6 { any; };

        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        query-source address * port 53;
};


include "/etc/rndc.key";

zone "abc.com" {
        type master;
        notify no;
        file "acb.com.zone";
};




Step-2


vi /var/named/abc.com.zone

$TTL    86400
@               IN SOA  centos6.abc.com. root.abc.com. (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
                IN NS           centos6
centos6         IN AAAA 2001:1::100
centos6         IN A    192.168.1.100


Keep Add your  IPv4 - A Record &  IPV6 AAAA record in the zone file.

Start named daemon

/etc/init.d/named start
root@localhost network-scripts]# /etc/init.d/named status
version: 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6_7.6
CPUs found: 1
worker threads: 1
number of zones: 17
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
named-sdb (pid  5911) is running...


DNS Client : Host
---------------

Configure nameserver to resolve dns request .

/etc/resolve.conf

nameserver 192.168.1.100

ping centos6.abc.com