Skip to content

Instantly share code, notes, and snippets.

@xezpeleta
Created January 22, 2019 12:11
Show Gist options
  • Save xezpeleta/cf0a982419581415c29340051c0537d2 to your computer and use it in GitHub Desktop.
Save xezpeleta/cf0a982419581415c29340051c0537d2 to your computer and use it in GitHub Desktop.
Dynamic DNS on the Ubiquiti EdgeRouter X

Ubiquiti EdgeRouter X: custom dynamic DNS

ssh ubnt@<your-ip>
configure

Obtain your public IP address behind a NAT: using ipinfo.io

set service dns dynamic interface eth0 web https://ipinfo.io/json
set service dns dynamic interface eth0 web-skip "ip: "

Dynamic DNS with your custom domain: using Cloudflare

First of all, create the subdomain in the Cloudflare zone.

set service dns dynamic interface eth0 service custom-cloudflare host-name <hostname.yourdomain.org>
set service dns dynamic interface eth0 service custom-cloudflare login <user@domain.com>
set service dns dynamic interface eth0 service custom-cloudflare password <CloudFlare API key>
set service dns dynamic interface eth0 service custom-cloudflare protocol cloudflare
set service dns dynamic interface eth0 service custom-cloudflare options zone=<yourdomain.com>

Commit and save

commit
save

https://help.ubnt.com/hc/en-us/articles/204976324-EdgeRouter-Custom-Dynamic-DNS

@jradwan
Copy link

jradwan commented Jan 26, 2024

Thank you @kule! I was struggling getting dynamic DNS to work on my ER-X running EdgeOS v1.10.11 and your comment helped me figure it out. Had to switch to the Global API key and also use "api.cloudflare.com/client/v4" for the server instead of "www.cloudflare.com" like I had seen on other write-ups.

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