PTR using DIG

Kevin Darcy kcd at
Wed Mar 30 23:40:38 UTC 2005


>How can i see the PTR record for a host..
>dig PTR doesn't show the details..
>Is there someother ways to see the PTR recoring working fine or not?
If owns a PTR record, then dig will show 
it. But, normally PTR records exist solely for reverse lookups and are 
therefore found under the tree; you typically wouldn't see 
one under the .com tree unless it is aliased from somewhere under the tree.

You can simulate a reverse lookup in dig by reversing the octets of the 
address,  appending "" to the result, and then querying 
whether that name owns any PTR records, e.g. reverse lookup of 
-> dig ptr. Most versions of dig also have a -x 
option that does the grunt work of reversing and appending, e.g. dig -x ptr, and some versions of dig even default to looking up PTR 
records when the -x option is used, so maybe the command is as simple as 
dig -x Give it a try.

                                                - Kevin

More information about the bind-users mailing list