IP -> e-mail

Matthias Apitz guru at unixarea.de
Wed Jun 6 12:51:37 UTC 2012


El día Wednesday, June 06, 2012 a las 02:06:48AM -0700, Dánielisz László escribió:

> Hi everybody,
> 
> Let say my computer is connected to the internet with a cable modem and has a dynamic IP address via DHCP. This address is refreshed after every random days.
> I want to know the new address even when I'm not home. Like send an e-mail with the new IP, I already know how to do this, but how can I track the event when my computer receives the new IP?
> Any ideas or same issues?

Hi,

Run this in a cronjob:

lynx -dump myip.nl | fgrep 'WAN IP'

strore the result in a file and when it changes, trigger a mail;

HIH

	matthias
-- 
Matthias Apitz
e <guru at unixarea.de> - w http://www.unixarea.de/
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5


More information about the freebsd-questions mailing list