Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 2002 14:16:17 -0400 (EDT)
From:      Peter Leftwich <Hostmaster@Video2Video.Com>
To:        <fred@timogen.com>
Cc:        FreeBSD LIST <FreeBSD-Questions@FreeBSD.Org>
Subject:   Re: Good script to get the IP address from u logon on freebsd
Message-ID:  <20020731141202.M44895-100000@earl-grey.cloud9.net>
In-Reply-To: <038d01c238c2$1bd526c0$7d05a8c0@fred>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 31 Jul 2002 fred@timogen.com wrote:
> Hi, I have a freebsd box, Can someone execute a scripts to print the IPAddress where she is from when he logon this machine?
> Regards,
> Fred Zhang

Try `arp -a` for your own IP address, or the `w` command to see what IP
address people are logging onto your box from (telnetting or ssh'ing in).

You could also just type `last -5` or however many you want.  The `w -n`
command will stop trying to resolve IP addresses to names, but for some
reason I can't get it to forcibly -only- show IPs; My DHCP hostname is long
and is getting truncated (chopped short).

--
Peter Leftwich
President & Founder
Video2Video Services
Box 13692, La Jolla, CA, 92039 USA
+1-413-403-9555


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020731141202.M44895-100000>