hostname

tony.chamberlain at lemko.com tony.chamberlain at lemko.com
Thu Nov 1 17:00:56 UTC 2007


 Someone wants to use java and get a host name from an IP address.
I know how to do it lcoally through /etc/hosts BUT the host file does not
have names for every IP address reachable.

Someone found http://www.faqs.org/rfcs/rfc953.html which looks like you are supposed to be
able to use port 101 of a machine and connect to it and echo a command and it should respond.
It also says HNAME should give the host name so I tried (from 192.168.5.191)
 echo HNAME | nc -e cat 192.168.5.15 101 
which I would guess should return the host name for machine 192.168.5.15, but I got
no response and a return code of 1. There is probably something I am overlooking.
Anyone know how to query this port? (both machines are CentOS 4.5) 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071101/114d639b/attachment-0001.htm>


More information about the fedora-list mailing list