Tag Archive: dns


DNS Configuration – – RHEL 6

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

DNS configuration

Install the packages :

Bind and Caching-nameserver.

Configuration :

Forward & Reverse files :

#  cd  /var/named/chroot/var/named

#  cp  localdomain.zone  for.abc.com

#  cp  named.local  rev.abc.com

#  chown  root:named  for.abc.com

#  chown  root:named  rev.abc.com

Editing in for.abc.com :

#  vi  for.abc.com

IN SOA     abc.com.     root.abc.com. (
IN NS        abc.com.
abc.com.   IN A   [your ip address]

Editing in rev.abc.com

#  vi  rev.abc.com

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.com”;
allow update { [your ip]; }

zone “[X-X-X].in-addr.arpa” IN {
type master ;
file “rev.abc.com” ;
allow update { [your ip]; }

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

Editing in named.conf :

#  cd  /var/named/chroot/etc

#  cp  named.caching-nameserver.conf  named.conf

#  chown  root:named  named.conf

#  vi  named.conf

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

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

match-clients { localhost; [ip series which is to be allowed/mask bits]; };

match-destinations { localhost; [ip series which is to be allowed/mask bits]; };

#  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

#  vi  /etc/sysconfig/network-scripts/ifcfg-eth0

PEERDNS = no

#  service  named  restart

#  host  abc.com
OR
#  host  [your ip address]

OR

#  dig  http://www.abc.com