Skip to content

Instantly share code, notes, and snippets.

@jamietre
Last active July 10, 2023 03:11
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jamietre/5b233567d565fd0322ddd5b9ee7f0c84 to your computer and use it in GitHub Desktop.
Save jamietre/5b233567d565fd0322ddd5b9ee7f0c84 to your computer and use it in GitHub Desktop.
Howto - using duckdns with Synology RT2600AC
[DuckDNS]
modulepath=/sbin/duckddns
queryurl=duckDNS.org
#!/bin/sh
duckdns="$(wget -O - https://www.duckdns.org/update?domains=${3}\&token=${2})"
case $?:$duckdns in
0:OK)
echo good
;;
0:KO)
echo badauth
;;
5:)
echo badagent
;;
8:)
echo badresolve
;;
*)
echo 911
;;
esac
@jamietre
Copy link
Author

jamietre commented Feb 27, 2019

Based on: https://forum.synology.com/enu/viewtopic.php?t=99239

Steps to configure DuckDDNS

  1. Log onto device as root, e.g.

> ssh root@my.router.ip.address

Password is your admin login to the router.

  1. Edit /etc.defaults/ddns_provider.conf using vi (e.g.) and append contents of ddns_provider.conf to the end.
  2. Copy the code from duckddns above into /sbin/duckddns and execute command

> chmod +x /sbin/duckddns

  1. In router web UI go to Network Center -> Internet -> Quick Connect & DDNS -> DDNS and add a new entry. Choose "DuckDNS".

Hostname = your subdomain on duckdns
Username/Email = doesn't matter/not used
Password = your DuckDNS token

You should be done now.

Quick and Dirty Way

This one-liner will modify & create the files as described by grabbing the code from this gist:

wget https://gist.githubusercontent.com/jamietre/5b233567d565fd0322ddd5b9ee7f0c84/raw/6305de66e86f78c1edd45c756a9542ce990a5e30/ddns_provider.conf -O ->> /etc.defaults/ddns_provider.conf && wget -O /sbin/duckddns https://gist.githubusercontent.com/jamietre/5b233567d565fd0322ddd5b9ee7f0c84/raw/abe5a36676e90dadac45b80082c6391b8adcfc9f/duckdns && chmod +x /sbin/duckddns

Now you should just need to change the config per step 4 above.

@TechWizTime
Copy link

The Quick and Dirty Way one-liner is outdated unfortunately and isn't pointing to the latest raw duckddns. Here's the updated one-liner.

wget https://gist.githubusercontent.com/jamietre/5b233567d565fd0322ddd5b9ee7f0c84/raw/6305de66e86f78c1edd45c756a9542ce990a5e30/ddns_provider.conf -O ->> /etc.defaults/ddns_provider.conf && wget -O /sbin/duckddns https://gist.githubusercontent.com/jamietre/5b233567d565fd0322ddd5b9ee7f0c84/raw/5d978ecde4e2acfb5116fc1bf16b36d2730e79a9/duckddns && chmod +x /sbin/duckddns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment