tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re[2]: Reverse DNS lookup
Date Fri, 06 Jul 2001 04:16:21 GMT

Friday, July 06, 2001, 12:02:29 AM, 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

View raw message