No-IP.com Dynamic DNS Updater with curl
Posted on November 23, 2016
embedded linux
embedded linux
Forget ddclient
.
curl -X GET 'https://dynupdate.no-ip.com/nic/update' --header "Authorization: Basic $(base64 <<< $username:$password)" -d "hostname=$hostname"
This works for a lot of dynamic dns services btw. For example, for dynu all you have to do is use api.dynu.net
as url. They also have a good description of the DDNS Update Protocol.
Here’s a systemd timer:
[Unit]
Description=Update Dynu
[Timer]
OnCalendar=hourly
[Install]
WantedBy=timers.target
And the corresponding service:
[Unit]
Description=Dynu update
[Service]
Type=oneshot
ExecStart=/usr/bin/curl -X GET 'https://api.dynu.com/nic/update' --header "Authorization: Basic <credentials>" -d 'hostname=<hostname>.dynu.com'
User=nobody
Group=systemd-journal