OpenWRT Dynamic DNS

Use Mythic Beasts Dynamic DNS with your OpenWRT router

This page describes how to use our Dynamic DNS service with an OpenWRT router.
  1. Install the luci-app-ddns package, either through the web interface or by running:
    opkg install luci-app-ddns
    
  2. Edit /usr/lib/ddns/services 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=."
    
  3. 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
    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 domain tab in our 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.
  4. 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.