Date: Sun, 14 Jan 2007 15:23:15 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Grant Peel <gpeel@thenetnow.com> Cc: freebsd-questions@freebsd.org Subject: Re: Identifying a Remote Machine. Message-ID: <20070114212314.GF46272@dan.emsphone.com> In-Reply-To: <007e01c737d7$20573170$6501a8c0@GRANT> References: <007e01c737d7$20573170$6501a8c0@GRANT>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jan 14), Grant Peel said: > I have several servers, each with hundreds of IPs on them. > > I am attempting to write a php script that will connect to each ip > and identify the 'hostname' as set in rc.conf. > > I have been looking at icmp, env etc, and can't find a method. I was > also loioking at ping, but it does not show the hostname. > > The only reply I need from the server is the hostname. That will tell > ne that the IP is live and what machine its on. If they're not jailed, just connect to the SMTP port. sendmail's banner has the hostname in it. Another option, if you have a machine on the same subnet as your targets, would be to ping each one, then compare the MAC addresses to determine which ones are on the same host as each other. Or, if you have login access to the servers, just run "ifconfig -a" to list the IPs. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070114212314.GF46272>