Raspberry Pi Raspberry Pi

You can create a script in Raspberry Pi and setup a cron job to run every 5 minutes to keep your hostnames updated to the most current IP address.

1. Create a directory to put the files into.

cd ~
mkdir dynudns
cd dynudns


2. Create a dynu.sh script with the command to update the IP address. For security reasons, you should use the MD5 hash of your password. If you use the regular password, please be sure to URL encode any special characters in the password.

vi dynu.sh

echo url="https://api.dynu.com/nic/update?username=USERNAME&password=PASSWORD" | curl -k -o ~/dynudns/dynu.log -K -
3. Make dynu.sh executable.

chmod 700 dynu.sh

4. Use a cron job to make the script run every 5 minutes.

crontab -e

Add the following to the bottom of the crontab:

*/5 * * * * ~/dynudns/dynu.sh >/dev/null 2>&1

Listing Item   Dynu Custom IP Update URL

Update one domain name

  • Non SSL: http://api.dynu.com/nic/update?hostname=example.dynu.com&password=PASSWORD
  • SSL Format: https://api.dynu.com/nic/update?hostname=example.dynu.com&password=PASSWORD

  • Update all domains in your account

  • Non SSL: http://api.dynu.com/nic/update?username=USERNAME&password=PASSWORD
  • SSL Format: https://api.dynu.com/nic/update?username=USERNAME&password=PASSWORD

  • Update an alias

  • Non SSL: http://api.dynu.com/nic/update?hostname=example.dynu.com&alias=Alias&password=PASSWORD
  • SSL Format: https://api.dynu.com/nic/update?hostname=example.dynu.com&alias=Alias&password=PASSWORD

  • If you still have questions on the configuration, you may refer to the IP Update Protocol page or contact support.
    Loading...