Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2012 14:51:26 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: IP -> e-mail
Message-ID:  <20120606125125.GA2043@tiny>
In-Reply-To: <1338973608.78319.YahooMailNeo@web162906.mail.bf1.yahoo.com>
References:  <1338973608.78319.YahooMailNeo@web162906.mail.bf1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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



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