You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Wall <dw...@myEastside.com> on 2001/07/06 06:02:29 UTC
Re: Reverse DNS lookup
> InetAddress.getByName(<ip address>).getHostName() will do what you
> want, if the info is available.
Where would the info have to be available? Is there anything comparable to
a "dig -x" command under Unix? For most IP addresses, there will not be
anything configured on my computer, but I know that ARPA reverse lookups are
possible.
The method you show above still returns the IP address on my system, yet a
"dig -x" will show the host name resolved.
David
Re[2]: Reverse DNS lookup
Posted by wi...@mailops.com.
Friday, July 06, 2001, 12:02:29 AM, dwall@myEastside.com wrote:
>> InetAddress.getByName(<ip address>).getHostName() will do what you
>> want, if the info is available.
DW> Where would the info have to be available?
in a PTR record on a nameserver
DW> Is there anything comparable to
DW> a "dig -x" command under Unix?
dig just uses the PTR record
DW> For most IP addresses, there will not be
DW> anything configured on my computer, but I know that ARPA reverse lookups are
DW> possible.
DW> The method you show above still returns the IP address on my system, yet a
DW> "dig -x" will show the host name resolved.
maybe the dig command is using a cached value? In other words, if it
did a forward lookup on the hostname, then it might be returning
that name for the IP, even if no pointer record (in-addr-arpa) exists.
What is the IP that you're looking up?
DW> David