Skip to main content
How to set up DDNS

Learn how to set up Dynamic DNS in case you don't have static IP or domain

M
Written by Matija Farkaš
Updated over 2 months ago

Why and when to use Dynamic DNS?

For setting up a Spotipo captive portal with UniFi controllers, Dynamic DNS is necessary if you don't already own a Static public IP address or domain. It allows you to create a domain name that automatically updates to reflect your current public IP address, ensuring that the UniFi controller can be accessed externally even when the public IP changes.

How to get DDNS sub domain?

For our application, we recommend using Duck DNS if you don't have experience with other tools, because it is free and easy to use. If you prefer another DDNS provider, that's fine too—just ensure the DDNS settings are correctly configured in your router. We will only provide configuration instructions for Duck DNS, as settings may differ with other providers.

Using Duck DNS

First, you need to sign in to Duck DNS. You can do that with any option available (Google, GitHub, etc.)

Once you sign in, you can enter your sub domain name into the required field. It can be any name you want, as long as it is not taken already.

Duck DNS will provide a token for authentication. This token will be used in the router's DDNS configuration

Configuring Router

Now that you have your sub domain name and token, you can continue with configuring your router.

Graphical User Interface

You need to log in to your router and find DDNS Function there. It is sometimes listed under Dynamic DNS, DNS, Remote Access, Hostname, etc. (varies by router).

From there, you need to configure a couple of settings.

Make sure that the service provider is dyndns.

Most importantly, Duck DNS doesn't use classic User Name/Password combination, rather, it uses Token as authentication.

If your router asks for User Name/Password combination, leave the user name field blank and enter token number in the password field.

If the user name is mandatory as in the picture below, place token information in that field instead.

It is also possible that both fields are mandatory. In that case, place token information in both fields.

Example of configuration is shown below.

NOTE: If you are using a different DDNS provider, your configuration will vary. Make sure to check configuration settings from your DDNS provider's site.

CLI Based Interface (Cisco IOS example)

enable
configure terminal

! Define the DDNS update method
ip ddns update method duckdns
HTTP
host http://domainname.duckdns.org
path /update?domains=<your_domain>&token=<your_token>&ip=
port 443
use-vrf default
add-header "Host: domainname.duckdns.org"
exit

! Configure the DDNS settings under the interface
interface <Your_Interface>
ip address dhcp
ip ddns update hostname domainname.duckdns.org
ip ddns update duckdns

! Save the configuration
end
write memory

NOTE: Replace "domainname" part of address with your own domain name.

Verify the Configuration

Check that the DDNS is active and working.

DDNS not updating? Chek an article here.

Did this answer your question?