[oclug] How to verify my IP address remotely

Jon Earle je_oclug at kronos.honk.org
Fri Jul 11 10:25:34 EDT 2003


I did that for my home box.  I whacked together a script that ran after
ppp completed its connection.  It ran 'ifconfig ppp0', grepped for the IP
and mailed that to another account (you could use anything that has a
stable (IP-wise) webmail address (hotmail for example).

Something like this works fine:

/sbin/ifconfig eth0 |
	grep "inet addr" |
	cut -d : -f 2 |
	awk '{print $1}' |
	mail -s "My IP" <email address to send to>

There's probably a better way to do it (fewer commands) but this works in
a pinch.

Cheers!
Jon

On Thu, 10 Jul 2003, David G. wrote:

> When I am away for a few days, I want to know what the current IP
> address of my router is, so I can ssh into one of the computers.

-- 
Jon Earle

SAVE FARSCAPE http://www.savefarscape.com/

"Vegetarian - an old Indian word meaning 'lousy hunter."



More information about the OCLUG mailing list