What is PTR and how does it work?

Chris Buxton cbuxton at menandmice.com
Wed Jul 11 15:27:00 UTC 2001


At 4:07 AM +0000 7/11/01, Cejet50 wrote:
>What is PTR and how does it work?

A PTR record is a mapping of IP address to name. It normally works like this:

If the machine at 192.168.0.1 has the name host1.example.com, then 
the PTR record should look like this:

1.0.168.192.in-addr.arpa.  PTR  host1.example.com.

Some notes:

- Notice that the octets of the IP address are in reverse order.

- Normally, this record is likely to be found in a zone named 
"0.168.192.in-addr.arpa.", so the name of the record could be 
abbreviated as "1" (with no trailing dot).

- In the case of a classless subnet delegation, the name of the zone 
is generally changed to something arbitrary.

- In the case of a machine having multiple names, only one should 
appear in a PTR record - the IP address should have exactly one PTR 
record. Anything else will, at best, simply not work as intended.

PTR records are used for a variety of purposes. The most important 
use, unfortunately, is as a security measure: Some servers won't talk 
to machines that don't have proper PTR records. This is a widespread 
(but not universal) practice, especially for mail servers. The idea 
is that many spammers don't have control of their PTR records, but 
they try to forge their hostnames; a PTR record check may discover 
this, allowing the destination mail server to reject the connection.
____________________________________________________________________

Chris Buxton <cbuxton at menandmice.com>

Men & Mice <http://www.menandmice.com/> offers:
  - DNS training, including Active Directory
  - QuickDNS, a DNS management system (now supporting Solaris)
  - DNS Expert, a DNS analysis and troubleshooting utility
____________________________________________________________________


More information about the bind-users mailing list