PTR using DIG
Kevin Darcy
kcd at daimlerchrysler.com
Wed Mar 30 23:40:38 UTC 2005
BIJU KURIAN wrote:
>How can i see the PTR record for a host..
>
>dig host1.doma.com @ns1.domain.com PTR doesn't show the details..
>
>Is there someother ways to see the PTR recoring working fine or not?
>
If host1.doma.com owns a PTR record, then dig host1.doma.com will show
it. But, normally PTR records exist solely for reverse lookups and are
therefore found under the in-addr.arpa tree; you typically wouldn't see
one under the .com tree unless it is aliased from somewhere under the
in-addr.arpa tree.
You can simulate a reverse lookup in dig by reversing the octets of the
address, appending ".in-addr.arpa" to the result, and then querying
whether that name owns any PTR records, e.g. reverse lookup of 1.2.3.4
-> dig 4.3.2.1.in-addr.arpa ptr. Most versions of dig also have a -x
option that does the grunt work of reversing and appending, e.g. dig -x
1.2.3.4 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 1.2.3.4. Give it a try.
- Kevin
More information about the bind-users
mailing list