[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Auto-notify remote user of IP address change?



Ken Irving wrote:
So you could do something like (sic)

  $ lynx -dump www.whatismy.cop | mail -s ip you@someisp.com

but $ mail < /dev/null -s ip you@someisp.com
might work as well.  Of course this is far from having your ip listed
on a public dns, but it might be sufficient for getting access to the hosts behind a dynamic address.

Yeah, actually this is all I want. I've got interested in the dyndns stuff mostly for my home office box, but for the client where I'm putting the DB server in - they don't need their IP address listed publicly. Actually from a security perspective it's probably wise that they don't do this - I believe their firewall is just a NAT router and they rely on each workstation - windoze - to be firewalled individually.

Your suggestion re sending a null mail message works fine for what I want. All I need is an IP address so I know where to SSH into when they need some tweaking done to their Databases.

The line from Douglas Wards script below works really nicely:
curl http://checkip.dyndns.org/ 2>/dev/null | grep "Current" | awk '{print $6}' | sed 's/<\/body><\/html>//'

If I set that up as a cron job and pipe the output through mail me@myaddress I've got everything I want.

Anyway a few things to go with here...

--
David Powell
Information Systems Developer
Moondrake Trust
e: moondrake at optusnet dot com dot au



Reply to: