EdgeRouter - Custom Dynamic DNS
Overview
Readers will learn how to configure Dynamic DNS on the EdgeRouter using a custom service. See our Built-in Dynamic DNS article for more information on how to use the built-in services.
NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Please see the Related Articles below for more information.
Device used in this article:
Configuring a Custom Dynamic DNS Service
In this example, the Cloudflare Dynamic DNS service is used.
CLI: Access the Command Line Interface.You can do this using the CLI button in the GUI or by using a program such as PuTTY.
1. Enter configuration mode.
configure
2. Configure the dynamic DNS hostname.
set service dns dynamic interface eth0 service custom-cloudflare host-name <subdomain.domain.com>
3. Define the dynamic DNS credentials.
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>
NOTE:The Cloudflare API key is used as the password. This key can be found in your Cloudflare profile.
4. Define the dynamic DNS protocol.
set service dns dynamic interface eth0 service custom-cloudflare protocol cloudflare
5. Specify a domain name for the Cloudflare zone.
set service dns dynamic interface eth0 service custom-cloudflare options zone=domain.com
NOTE:If a subdomain is set, it must also exist in the Cloudflare portal. The command above will only update an existing domain.
6. Commit the changes and save the configuration.
commit ; save
ATTENTION:On older firmware versions (pre v1.10.5), or for some providers (e.g. Google Domains), it is also needed to specify the remote server address using the command below.
7. Specify the remote server.
set service dns dynamic interface eth0 service custom-cloudflare server api.cloudflare.com/client/v4/
You can verify the status and force an update of the Dynamic DNS service using the commands below:
show dns dynamic status
update dns dynamic interface <interface-name>
NOTE: It may take some time for the servers to update and resolve the hostname to the correct address.
Related Articles
EdgeRouter - Built-in Dynamic DNS
Intro to Networking - How to Establish a Connection Using SSH