Python script to check current host IPs and update them when needed.
You can either run this on your computer or on a docker
-
Clone this repo
-
Create a
config.json
like this{ "credentials": { "user": "", "pass": "" }, "endpoint": "https://api.dynu.com/nic/update?hostname=_HOSTNAME_&myip=_CURRENT_IP_", "hosts": [ "somehost.com", "anotherhost.com" ] }
-
Build the docker
docker build -t dynu-dns .
-
Run it
You need to provide user and password in the config.json. I prefer to use the sh256 password, as dynu accepts it.
You can choose any url from the reference documentation provided, but the one in the endpoint above works fine.
You can choose how often the cron will execute the script editing the cronjob
file and rebuilding the container