Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2012 09:17:47 -0400
From:      Robert Huff <roberthuff@rcn.com>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: IP -> e-mail
Message-ID:  <20431.22651.888125.876852@jerusalem.litteratus.org>
In-Reply-To: <20120606125125.GA2043@tiny>
References:  <1338973608.78319.YahooMailNeo@web162906.mail.bf1.yahoo.com> <20120606125125.GA2043@tiny>

next in thread | previous in thread | raw e-mail | index | archive | help

Matthias Apitz writes:

>  > 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?
>
>  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;

	Or, using only tools in the base system:

ifconfig | head | grep "inet " | awk '{print $2}'


				Robert Huff




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