Packages Required :

#  yum  install  bind*

Configuration :

Forward & Reverse files

# cd  /var/named

# cp  named.empty  for.abc

# cp  named.loopback  rev.abc

# chown  root:named  for.abc

# chown  root:named  rev.abc

Editing in for.abc

# vi  for.abc

IN SOA                                abc.com.                              root.abc.com.  (

IN NS                                   abc.com.

abc.com.                             IN A                                     [your ip address]

Editing in rev.abc

# vi  rev.abc

IN SOA                                  abc.com.                              root.abc.com.   (

IN NS                                   abc.com.

X                                         IN PTR                                  abc.com.

(X) – last part of your ip address

Editing in Zone file

# vi /etc/named.rfc1912.zones

Copy the last 11 lines and edit in those lines.

zone     “abc.com”    IN   {

type master;

file “for.abc”;

allow update  { none; }

zone     “[X-X-X].in-addr.arpa”    IN   {

type master ;

file “rev.abc” ;

allow update { none; }

[X-X-X] – First three parts of your ip in reverse order.eg- 192.168.7.1 = 7.168.192

Editing in named.conf

# vi  /etc/named.conf

# chown  root:named  named.conf

listen-on port  53   {127.0.0.1; [your ip/mask ]; };

allow-query  {localhost;[ip series which is to be allowed/mask]; };

# vi  /etc/hosts

Copy the 3rd line and comment the original line.In the copied line edit

[your ip address]                                 abc.com

# vi  /etc/resolv.conf

Search  abc.com

Nameserver  [your ip address]

# vi  /etc/sysconfig/network

HOSTNAME = abc.com

service network restart

# service named start

# host  abc.com

OR

# host  [your ip address]

OR

#  dig  abc.com

Advertisements