OpenWRT Dynamic DNS

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

  1. Create an API key for Dynamic DNS using the API keys page in the control panel.

    It is recommended that you create credentials that only have access to the hostname that you want to update. The screenshot below shows how to create an API key with access to A and AAAA records for myhost.example.com.

  2. Install the luci-app-ddns and curl packages on your router, either through the web interface or by running:

    opkg install luci-app-ddns curl
    
  3. Edit /etc/ddns/services and add the following line at the bottom (this should all be on a single line):

    "mythic-beasts.com-v2"     "http://[KEYID]:[SECRET]@ipv4.api.mythic-beasts.com/dns/v2/dynamic/[DOMAIN]"
    

    If you want to set an IPv6 address, create an additional entry as follows:

    "v6.mythic-beasts.com-v2"     "http://[KEYID]:[SECRET]@ipv6.api.mythic-beasts.com/dns/v2/dynamic/[DOMAIN]"
    

    Please note that OpenWRT now includes a mythic-beasts.com entry as standard, but this is for DNS API v1, and will not work with the instructions on this page.

  4. Go to the LuCI web interface and browse to the Services->Dynamic DNS tab, and use the following settings:

    Lookup hostname
    The fully-qualified hostname that you wish to update
    IP address version
    Select the address version (you probably want "IPv4-Address").
    DDNS provider
    mythic-beasts.com-v2 (or v6.mythic-beasts.com-v2 for IPv6)
    Domain
    Set to the same as lookup hostname.
    Username
    The username for your API key
    Password
    The secret for your API key
    Use HTTP Secure
    Check this box if your router has SSL support
  5. Make sure the service is enabled, hit Save and Apply and then either reboot your router, or force the event interface down and up.

Notes

It should be possible to avoid the need to create a separate "v6.mythic-beasts.com" service by using the "force IP version" setting on the advanced tab, and an API hostname of "api.mythic-beasts.com", but this does not appear to work (tested in OpenWRT 19.07).