Date: Wed, 6 Jun 2012 08:50:37 -0500 (CDT) From: Robert Bonomi <bonomi@mail.r-bonomi.com> To: freebsd-questions@freebsd.org Subject: Re: IP -> e-mail Message-ID: <201206061350.q56DobvN029750@mail.r-bonomi.com> In-Reply-To: <1338973608.78319.YahooMailNeo@web162906.mail.bf1.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
m > From owner-freebsd-questions@freebsd.org Wed Jun 6 07:37:57 2012 > Date: Wed, 6 Jun 2012 02:06:48 -0700 (PDT) > From: =?iso-8859-1?Q?D=E1nielisz_L=E1szl=F3?= <laszlo_danielisz@yahoo.com> > To: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> > Subject: IP -> e-mail > > Hi everybody, > > Let say my computer is connected to the internet with a cable modem and h > as a dynamic IP address via DHCP. This address is refreshed after every r > andom days. > I want to know the new address even when I'm not home. Like send an e-mai > l 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? Schedule a 'cron' job to run as frequently as you like. Have it: a) do an 'ifconfig -a', or maybe just check the 'interface of interest'. b) 'diff' that output against a 'reference' copy from the previous run c) send an email if diff reports differences d) save the ifconfig output for referene in the next run
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206061350.q56DobvN029750>