DuckDNS on EdgeRouter

Hey! Listen! This post is part of a series on the Ubiquiti EdgeRouter Lite. Check them all out!

2017-10-03Dyn DDNS on EdgeRouter
  • Setup DynDNS
  • 2017-04-25DuckDNS on EdgeRouter
  • Setup DuckDNS
  • 2017-01-08Ubiquiti EdgeRouter serial console settings
  • Serial console settings
  • 2016-11-29Ubiquiti UniFi controller setup on Raspberry Pi 3
  • Install UniFi Controller
  • 2016-08-30EdgeRouter Lite Dnsmasq setup
  • Setup dnsmasq
  • 2016-06-13EdgeRouter Lite software upgrade
  • Firmware upgrade
  • 2016-05-12EdgeRouter Lite OpenVPN setup
  • OpenVPN server setup
  • 2016-04-29Ubiquiti EdgeRouter Lite setup
  • Initial setup
  • Introduction

    I’ve been using Dyn for my dynamic DNS for years. However, after the 2016 Dyn DDoS, I’ve decided to add a second dynamic DNS service provider, in case Dyn goes down again.

    Choosing a provider

    Some dynamic DNS service providers might offer more update methods or tutorials, but that’s where the differences end. Unless you’re a large client or have a very custom setup, the largest factor between providers is price. Dyn starts at $7/month, but I’m grandfathered into a $40/year plan.

    For my second provider, I’ve chosen DuckDNS. DuckDNS was started by a redditor, they are pretty transparent, and best of all, the service is free. I’d still donate to them because I’d prefer to pay a couple of guys running a good service, rather than a corporation.

    DuckDNS setup

    Web setup

    Head over to the DuckDNS website and setup an account. Interestingly, DuckDNS only offers oAuth logins (e.g., through Google, Facebook, Reddit, etc…). This is so they don’t have to worry about storing usernames/passwords themselves and can leave it to the professionals.

    Next, enter your domain in the box and click Add domain. If the domain is available, it will be registered to your account. While you’re on this same screen, make note of your account token.

    Router setup

    EdgeOS only supports a handful of pre-configured DNS service providers by default (shown below).

    ubnt@erl# set service dns dynamic interface eth0 service
    afraid       dslreports   easydns      noip         zoneedit
    dnspark      dyndns       namecheap    sitelutions

    To use DuckDNS, we need to setup a custom service provider. Substitute your interface, hostname, and password as needed.

    set service dns dynamic interface eth0 service custom-duckdns
    set service dns dynamic interface eth0 service custom-duckdns host-name loganmarchione
    set service dns dynamic interface eth0 service custom-duckdns login nouser
    set service dns dynamic interface eth0 service custom-duckdns password your-token-here
    set service dns dynamic interface eth0 service custom-duckdns protocol dyndns2
    set service dns dynamic interface eth0 service custom-duckdns server

    A couple notes on the options:

    • the hostname is the prefix to your domain (e.g.,
    • the username is nouser (don’t use your account name)
    • the password is your account token (that long string of numbers/letters)

    Verify setup

    Trigger a manual update. EdgeOS will only update the dynamic DNS provider when your IP address actually changes.

    update dns dynamic interface eth0

    You can show the status with the command below.

    show dns dynamic status

    Here, you can see the successful update.

    interface    : eth0
    ip address   : XX.XX.XX.XX
    host-name    : loganmarchione
    last update  : Tue Apr 25 22:13:09 2017
    update-status: good

    SSL settings

    Also, just so you know, EdgeOS uses ddclient for the dynamic DNS updates. The configuration file is located at /etc/ddclient.conf, but there is a directory at /etc/ddclient with a configuration file for each interface. By default, ddclient is setup to use SSL, as shown below.

    root@erl:~# grep ssl /etc/ddclient/ddclient_eth*.conf


    Hope this helps!


    13 thoughts on “DuckDNS on EdgeRouter

    1. Thanks! This worked for me with one tweak. If you are using a DSL (and maybe cable?) modem in bridge mode, the interface you want to use is pppoe0. Other than that it went very smoothly. Thanks for the article.

    2. ER-X can work fine, however if you get “noconnect” instead of “good” when doing the command:
      show dns dynamic status

      then you have a known problem, resolution is to re-apply the current firmware (currently 1.9.7H4)(even if you already have it) which will populate a missing file – google “ER-X noconnect”, there are several posts about it.

    3. Hello! thanks for the guide.

      I’m trying to setup, but when I run:
      “set service dns dynamic interface eth0 service” (or the other similar “set service…”

      The answer is always the same:
      Invalid command

      With the other “set service…” the answer is the same.

      Any idea?

      Thanks in advance.

    Leave a Comment