IP-Monitor: Execute a script after a DynDNS address or the own Internet IP has changed

My router at home has the capability to update a DynDNS compatible DNS provider address once my Internet IP address is changing.

  • Once that happens I want to update a few ACL files and iptables on my personal server, since my home connection should be able to talk to extra ports.
  • I also maintain a NAS somewhere else which is supposed to update a few services once my Internet IP address changes.

After googling for a while I didn't find anything which does exactly what I need and is also highly customizable.

So I decided to write a basic Go daemon for this => ip-monitor

The installation is simple: Download, configure and register as service.

It watches the configured DNS records for IP address changes or alternatively uses an IP ping back provider to return the own outside Internet IP address. Once a change is detected the configured script(s) get executed with the old and new IP address as parameters. This way scripts can do whatever needs to be done, but without the boilerplate code needed in order to e.g. resolve DNS without caches.

Maybe it's useful for one or the other person as well.

Schreibe einen Kommentar