Setup reverse dns on named (bind)

1.Find where the named configuration files are:

cat /etc/sysconfig/named | grep ROOTD

You can see an uncommented line as below.

ROOTDIR=/var/named/chroot

This means the root directory will be  /var/named/chroot. The named configuration file will be stored inside /var/named/chroot/etc/named.conf

Zone files will be stored in the directory /var/named/chroot/var/named

 

If it is commented like below the root directory will be /etc

#ROOTDIR=/var/named/chroot

This means the root directory will be  / . The named configuration file will be stored inside /etc/named.conf

Zone files will be stored in the directory /var/named

 

2.Assume we need to setup RDNS for the IP, say 11.22.33.44,  to the domain server.domain.com.

Create the zone file /var/named/chroot/var/named/33.22.11.in-addr.arp

zone file is named – first 3 octet of the IP in reverse order, the 4th octect will be added in the zone file as below):

$TTL 86400
@ IN SOA ns4.domain.com. root.ns4.domain.com. (
2009091454 ; serial
28800 ; refresh
14400 ; retry
1814400 ; expire
86400 ; default_tt
)
IN NS ns4.domain.com.
IN NS ns1.domain.com.
11       IN PTR ns1.domain.com.

 

3.Now you need to mention this in the named.conf file. For this you can add an include file inside named.conf.

include “/etc/reverse.conf”;

Now add the following isnide the include file

vi /var/named/chroot/etc/reverse.conf

zone “33.22.11.in-addr.arpa” {type master; file “/var/named/33.22.11.in-addr.arpa”; };

 

4.Restart named and have a test.

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: