Wildcard hostname with Synology DDNS #93
Closed
leesherwood
started this conversation in
Ideas
Replies: 1 comment
-
Thanks for sharing this with the community! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Due to ISP restrictions, I have to use a double NAT setup whereby my ISP router has as much disabled as possible (firewall, wifi, etc) and my UDM is placed in it's DMZ so all incoming requests get forwarded on to it, where the UDM's firewall & routing can deal with what to do with it. This means my UDM doesn't see the true WAN IP, it see's it's IP assigned from the ISP router. As there's no option to have the UDM discover the WAN IP from an external source, I can't use it.
I have a Synology NAS with DDNS support, which does discover the true WAN IP, but it doesn't support multiple hostnames or wildcards. So I modified the script slightly to support a
wildcard
param to get around that. I figured I'd share it here in case anyone else find's it useful.wildcard
parameter, when detected it will append a*.hostname
entry to the list of hostnames to be updated.Deploy this to CloudFlare via
npx wrangler deploy
just like the original. Alternatively, you can edit the code directly in Cloudflare if you originally used the deploy button.Create a new custom provider in Synology DDNS
Service Provider:
CloudflareWorker
(use whatever you like, it's just a reference name)Query URL:
https://yourWorkerUrl.workers.dev/update?ip=__MYIP__&hostname=__HOSTNAME__&wildcard=1
Service Provider:
USER_CloudflareWorker
Hostname:
mydomain.com
Username:
mydomain.com
Password:
yourApiToken
Beta Was this translation helpful? Give feedback.
All reactions