Sunday, August 8, 2021

Dynamic DNS using ChangeIP on Ubiquity Security Gateway (USG)

ChangeIP has been my favorite dynamic DNS provider now for many years, because they allow FREE NON-EXPIRING domains with what seems like unlimited subdomains! This seems to be quite unique in the marked, as many other popular vendors are either paid only or require the user to click some link from email every month or so to not expire the domains.

Navingating to the UniFi interface, you can configure dynamic DNS like shown in the screen below.

The USG use ddclient to make the actual update, but unfortunately changeip.com is not listed as a supported solution. However, since the server option of ddclient is exposed directly in the UI - we can input the ChangeIP API URL! ChangeIP supports Basic Auth and username/password as query parameters. By specifying the dyndns service, the USG (through ddclient) will leverage basic auth with the inserted username and password - and the query parameters are kept as is.

Example configuration

Service: dyndns
Hostname: your-hostname-with.changeip.com
Username: YourChangeIpUsername
Password: YourChangeIpPassword
Server: nic.changeip.com/nic/update?hostname=your-hostname-with.changeip.com