[oclug] How to verify my IP address remotely
Jack
yaki at sympatico.ca
Fri Jul 11 20:51:55 EDT 2003
On Fri, 2003-07-11 at 20:37, Jack wrote:
> On Fri, 2003-07-11 at 14:14, Joe Burpee wrote:
>
> > Given the previous suggestions, I think you can get the external IP
> > address using:
> >
> > wget -O - http://www.whatismyip.com/ 2>/dev/null |
> > awk '/<TITLE>Your ip is/{print $4}'
> >
>
> Now I'm *really* impressed. That actually works! Sir, you really know
> your Unix/Linux. Kudos.
Just a quick follow up: put it in a file, do a chmod +x filename, and
voila! Here's my version of the file:
--- cut here ---
!/bin/bash
# get the ip address the world seen when behind a router
# -- e.g., a Sympatico account
# posted by Joe Burpee, Ottawa Canada Linux Users Group 2003/07/11
wget -O - http://www.whatismyip.com/ 2>/dev/null |awk '/<TITLE>Your ip
is/{print $4}'
--- cut here ---
Note: the last part beginning with wget is all on *one* line.
Jack
More information about the OCLUG
mailing list