Private GIT

Skip to content
Snippets Groups Projects
Select Git revision
  • 75bb3db96ca14477fca5edb5623f57da3518da41
  • master default protected
  • gh-pages
  • feature/irc
  • v0.7.237
  • v0.7.235
  • v0.7.232
  • v0.7.228
  • v0.7.219
  • v0.7.217
  • v0.7.211
  • v0.7.200
  • v0.7.197
  • v0.7.195
  • v0.7.184
  • v0.7.181
  • v0.7.177
  • v0.7.174
  • v0.7.172
  • v0.7.168
  • v0.7.164
  • v0.7.146
  • v0.7.142
  • v0.7.138
24 results

Definitions

Python script to update DNS A record of your domain dynamically using gandi.net LiveDNS API:

http://doc.livedns.gandi.net/

The script was developed for those behind a dynamic IP interface (e.g. home server/pi/nas).

The config-template.txt file should be renamed to config.txt, and modified with your gandi.net API key, domain name, and A-record (@, dev, home, pi, etc).

Every time the script runs, it will query an external service to retrieve the external IP of the machine, compare it to the current A record (if any) in the zone at gandi.net, and then add a new record (if no record currently exists), or delete then add a new record (if a record already exists).

Requirements:

  • Python 2.7
  • ipaddress module (pip install ipaddress)

You can then run the script as a cron job :

*/15 * * * * python /home/user/gandi-ddns.py