Skip to content
@magnushammar
GitHubTwitter

Dyn DNS with Synology & DNSimple API

DNSimple

Get Token and Account ID

  • Create User Access Token -> New -> Name dyndns-synology
  • Account -> Automation -> Get Account ID

Get Record ID. There might be an easier way

TOKEN="your-oauth-token"  # The API v2 OAuth token
ACCOUNT_ID="12345"        # Replace with your account ID
ZONE_ID="yourdomain.com"  # The zone ID is the name of the zone (or domain)
RECORD_NAME="hostname"

curl  -H 'Authorization: Bearer '$TOKEN \
      -H 'Accept: application/json' \
      https://api.dnsimple.com/v2/$ACCOUNT_ID/zones/$ZONE_ID/records?name_like=$RECORD_NAME

Modified Shell script from DNSimple Dev. I use api.ipify.org instead as they clearly state that there is no practical rate limit.

TOKEN="your-oauth-token"  # The API v2 OAuth token
ACCOUNT_ID="12345"        # Replace with your account ID
ZONE_ID="yourdomain.com"  # The zone ID is the name of the zone (or domain)
RECORD_ID="1234567"       # Replace with the Record ID
IP=`curl -s https://api.ipify.com/`

curl -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -X "PATCH" \
     -i "https://api.dnsimple.com/v2/$ACCOUNT_ID/zones/$ZONE_ID/records/$RECORD_ID" \
     -d "{\"content\":\"$IP\"}"

dnsimple-dyndns.sh

Synology

Control Panel -> Task Scheduler -> Create Scheduled Task -> User-defined script

  • Task: Update DNSimple DynDNS
  • Schedule: Every 10 minutes
  • Notification: On failure
  • User-defined script: The one above

That’s it!

Some Netgear Orbi stuff

That don’t get a page of its own (at the moment)

For some reason I don’t get the Windows profile to work, but the Smartphone-profile works just fine for the Windows OpenVPN client. To create a second profile that tunnel all traffic through VPN-tunnel just add the line redirect-gateway def1 before the cert.