ssh ubnt@<your-ip>
configure
set service dns dynamic interface eth0 web https://ipinfo.io/json
set service dns dynamic interface eth0 web-skip "ip: "
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
save
https://help.ubnt.com/hc/en-us/articles/204976324-EdgeRouter-Custom-Dynamic-DNS
Incase this helps someone with debugging...
Make sure you change the interface above to the correct one e.g. if you are in the UK you could well be on a provider like BT that still uses pppoe - so you'll probably want the pppoe0 interface instead of eth0.
Cloudflare issues: the current version of ddclient is v3.8.3 (for Edge Router 4 with v2.0.9 firmware). This old version of ddclient doesn't work with the new cloudflare api tokens, so you must use the old global api key token instead.
v3.9.x versions of ddclient should work with the newer api tokens so have a check to see what the ddclient version your firmware is using is:
For me I was having unhelpful errors in
tail /var/log/messages
like this:and
show dns dynamic status
was giving noconnect e.g.You can find out which part of the process is failing by calling ddclient directly. To get some debug output use the following (change the conf filename to match the interface you are using e.g. eth0 or pppoe0 etc):
You can edit your ddclient.conf with for example (change the file name to eth0 to pppoe0 or whatever interface you are using):
This'll make it easy to try different settings and fix your issue. If it's not using your new config try removing the cache file e.g.
sudo rm /var/cache/ddclient/ddclient_eth0.cache
(remember to change the filename to match your interface again).Once you've got it working, update your setup with
update dns dynamic interface eth0
.A working setup will give
show dns dynamic status
with: