Chapter 3: The Domain Name System
PTR records
PTR is short for Pointer, and that’s what it is: a pointer to a domain name. Let’s create
one by starting with the IP address of centralsoft.org, The named.conf
file has already indicated, through the
zone statement we showed in the previous sec-
tion, that this file defines hosts in the 70.253.158 domain. So all the
PTR record has to
specify is the final host part of the IP address, 42:
42 PTR centralsoft.org.
Create exactly one PTR record for each IP address in your domain. For our example,
the only other IP address we use is (for server2.centralsoft.org), so we
45 PTR server2.centralsoft.org.
That’s all. Our reverse zone file looks now like this:
@ IN SOA server1.centralsoft.org. root.localhost. (
2006012103; serial-no
28800; refresh, seconds
7200; retry, seconds
604800; expiry, seconds
86400 ); minimum-TTL, seconds
NS server1.centralsoft.org.;
NS server2.centralsoft.org.;
42 PTR centralsoft.org.
45 PTR server2.centralsoft.org.
Testing Lookups
Once you’ve edited all the configuration and zone files, you need to let BIND know
about your changes. You can stop and start named as follows:
# /etc/init.d/bind9 stop
# /etc/init.d/bind9 start
If you get any errors or if your BIND service does not act as expected, please see the
upcoming troubleshooting section for details on the most common problems.
In the future, if the only change you perform is to update a zone file with a new DNS
entry for the corresponding domain, it is enough tell BIND to just reload its informa-
tion about this zone (rather than restarting the entire service):
# rndc reload centralsoft.org
The rndc command will be discussed in more detail shortly.
Now we can test our configuration by doing a lookup with the command-line tool
dig. First, we’ll look up the IP address of centralsoft.org:

Get Linux System Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.