Our script nxdyn.sh checks your IP every few minutes and only reports to us when it has changed (plus a short sign of life once a day). It only needs bash and curl.
Get the script
- Right after creating a host or after Generate new key: download Linux script (pre-filled). Host, key and secret are already filled in.
- Later: client area → DynDNS → Setup → Linux → nxdyn.sh (template). Then fill in
HOST,KEYandSECRETat the top of the script yourself.
Setup
- Copy the file to the device, e.g. to
/usr/local/bin/nxdyn.sh. - Make it readable and executable for you only (it contains your secret):
````
chmod 700 /usr/local/bin/nxdyn.sh
- Test it once:
````
/usr/local/bin/nxdyn.sh
The answer should be good (new IP saved) or nochg (unchanged).
- Run every 5 minutes: open
crontab -eand add this line:
````
*/5 * * * * /usr/local/bin/nxdyn.sh >/dev/null 2>&1
Done. Shortly after, the host shows active in the client area.
Good to know
- IPv6: the script automatically reports this device's global IPv6, so exactly this device is reachable via IPv6. IPv4 only? Set
IPV6=0at the top of the script. - The script remembers the last reported IP in
~/.local/state/nxdyn/. Delete that file to force a new report. - Instead of our script you can use ddclient or another DynDNS2 client: protocol
dyndns2, serverhttps://nexus-servers.dewithouthttps://, SSL on, login = key, password = secret. - You also need to forward the required ports in your router.