Re: hostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2007-11-01 at 10:11 -0700, Rick Stevens wrote:
> On Thu, 2007-11-01 at 17:00 +0000, tony.chamberlain@xxxxxxxxx wrote:
> >  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) 
> 
> I've seen very few systems that implement that server (the one on port
> 101).  The correct thing to do is to use a reverse DNS lookup such as
> "dig -x 192.168.0.1" (assuming that the machine is registered in DNS).
> This is reasonably easy to do in Java.  Look for functions such as
> "gethostbyaddr".
> > 
The host command also does this.
--
=======================================================================
E Pluribus Unix
=======================================================================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@xxxxxxxxxxxxx

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux