OpenWRT Dynamic DNS

This page describes how to use our Dynamic DNS service with an OpenWRT router.

Please note that these instructions use our legacy, DNS API v1. We recommend using DNS API v2 for new configurations.

  1. Install the luci-app-ddns package, either through the web interface or by running:

    opkg install luci-app-ddns
    
  2. Go to the LuCI web interface and browse to the Services->Dynamic DNS tab, and use the following settings:

    Event Interface
    Your WAN interface
    Service
    mythic-beasts.com
    If you do not see this listed as an option, please see adding a Mythic Beasts service.
    Hostname
    The full hostname that you wish to use for dynamic DNS, for example myhouse.example.com
    Username
    Your domain name, example.com in this example.
    Password
    Your DNS API password. You can set this using the DNS APIs link on the Settings page for your domain in the My Domains section of the control panel. Please note that the ddns client sends this unencrypted, and so you ensure that this password is not used for other services, and if you use your domain to host other services you should consider using a different approach (see below).
    Source of IP address
    Ideally, use the name of the interface that has your external IP address. This setting is not essential, as our service will detect your IP address automatically. If there is no interface on your router with the external IP available, then select any interface, and reduce the Force update time limit to a low value, like 10 minutes, as the updater will not be able to detect any changes to your IP.
  3. Make sure the service is enabled, hit Save and Apply and then either reboot your router, or force the event interface down and up.

Improving security

By default, the ddns client uses an unencrypted GET request which means that your password is not encrypted and will appear in the web logs on our server. The first part can be fixed easily by installing the wget package (opkg install wget - this replaces the busybox version of wget which does not have SSL support) and changing the URL in step 2 to use https rather than http.

Switching to POST requests requires taking an alternative approach, for example scripting one of the curl examples listed on our Dynamic DNS page.

Adding a Mythic Beasts service

Recent versions of OpenWRT come pre-configured with the necessary configuration to use our DNS API for dynamic DNS. If you do not see Mythic Beasts in the service list the you will need to edit /usr/lib/ddns/services on your router and add the following line at the bottom (this should all be on a single line):

"mythic-beasts.com" "http://dnsapi4.mythic-beasts.com/?domain=[USERNAME]&password=[PASSWORD]&command=REPLACE%20[DOMAIN]%2060%20A%20DYNAMIC_IP&origin=."