Here is the thing. My ISP now intentionally changed the network setting once in a while ( like once a month ). They are not only changing IPs and stuff but they are changing the whole net blocks effectively rendering my box useless once that happen ( except outgoing traffic ). Since I run a mail server and web server for personal use, I can't use it remotely until I got home, manually restart my NIC and change IP in my DNS setting.

So is there any program ( or scripts ) that can do this?

1. Will check my server via ping or host. Then will get IP addy.
2. Will query local NIC interface with ifconfig command. Then extract the IP address info.
3. Will match the two.
4. If it's the same, then it will do nothing.
5. If the IPs are different or if the ping didn't return an IP, then will mail the notification to third party address ( such as to gmail account of mine ) so that I can update DNS info rather than on the remote location and finding out it's not working any longer.
6. Scripts of any language is acceptable since I won't be writing them. ;D
7. The script or program will be run from crontab once every 8 hours.

Can this be accomplished?