Set up rDNS of PTR zone

Step 1

[root@~]# vi /etc/named.conf zone "" { type master; file "/var/named/zones/ptr-202.123.12"; };

Add this lines into the named config file

Step 2

[root@~]# vi /var/named/zones/ptr-202.123.12 $TTL 1801; $ORIGIN 12.123.202.IN-ADDR.ARPA. @ IN SOA ( 2003080800 ; serial number 12h ; refresh 15m ; update retry 3w ; expiry 3h ; minimum ) IN NS IN NS ; 2 below is actually an unqualified name and becomes ; 2 IN PTR ; FDQN 17 IN PTR 74 IN PTR

Because the $ORIGIN reflects the reverse map domain all right-hand names must use an FQDN format (they end with a dot). If the terminating dot on above were omitted in error it would become - not the desired result!.

An IP address in a reverse can be defined only once - unlike a forward-mapped zone. If multiple names are assigned to a host using CNAME RRs, A RRs or AAAA RRs then only one can appear in the reverse map. Which one you select is a matter of operational usage. Thus if a mail server ( and a web server ( both have the same IP address then since mail systems frequently use reverse lookups as a trivial security check it would be sensible to define the reverse map to use

It is not essential, but considered good practise, to define all assigned IPs in the reverse map.

It is sensible to define the reverse map in order of IP addresses or some other fixed order to avoid subsequent errors or to simplify searching for a particular value.

Step 3

[root@~]# /etc/init.d/named restart

Restart named service.

[root@~]# nslookup
set type=ptr

Type the ip to test rDNS PTR record is correct or not by nslookup. If correct the result is: name =

Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.