IP -> e-mail

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Wed Jun 6 14:21:54 UTC 2012

Dánielisz László <laszlo_danielisz at yahoo.com> 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?
> Any ideas or same issues?

dhclient-script(8) has provision for running scripts on any DHCP event,
and provides both new and old IP addresses in environment variables. If
they're different, fire off an e-mail.

More information about the freebsd-questions mailing list