DNS reverse lookup

James Hall-Kenney James.Hall-Kenney at sytec.co.nz
Tue May 16 23:05:31 UTC 2000


Not to avoid the question but what is wrong with the apache binary
"logresolv"? (except perhaps the firewall issue?)

Cheers

James

> -----Original Message-----
> From: Martin [mailto:marty1110 at yahoo.co.uk]
> Sent: Wednesday, 17 May 2000 05:24
> To: comp-protocols-dns-bind at uunet.uu.net
> Subject: DNS reverse lookup
> 
> 
> 
> Hi,
> I am writing a program to examine a web servers log file. If the 
> web server has the option for resolving the IP address off, as 
> with Apache 1.3 default. Then I am faced with the problem of 
> resolving the IP address into a host name, thus I want to do a 
> reverse DNS lookup. I am writing this program in Java. So
> 1/ Is it possible to do a reverse DNS in Java code.
> 2/ I have tried the following code, and it does not work - 
> 
> InetAddress r; 
>        String s; 
> 
>        try {                // use the address you are concerned 
> with 
>            r = InetAddress.getByName("192.122.98.61"); 
>            s = r.getHostName();     
>            System.out.println(s);
>                      
>            } 
>                
>            catch (UnknownHostException e)
>            {
>                 System.out.println(e);
>            }
> 
> 3/ If it is not possible, how else can I do it?. I have tried to 
> use Windows NT's  - 
> nslookup <ipaddress>.in-addr.arpa
> and this doesn't work either! Has this anything to do with the 
> fact that I am behind a firewall??
> Martin.
> 	
> 
> 
> 
> 
> --Posted from EarthWeb Discussions. http://discussions.earthweb.com
> 
> 
> 



More information about the bind-users mailing list