---
title: "Eduard van Valkenburg (@eavanvalkenburg) | Hashnode"
description: "Cloud Solution Architect @ Microsoft. Read the latest articles by Eduard van Valkenburg on Hashnode."
url: "https://hashnode.com/@eavanvalkenburg"
---

@eavanvalkenburg

# Eduard van Valkenburg

@eavanvalkenburg · Joined November 2021

Cloud Solution Architect @ Microsoft

## Comments

[I found out the hard way that this same thing doesn't work when using a Unifi Dream Router, I guess it uses a different package for the ddns, but in order to get it working I built a Python version of this Azure Function, with instructions here: https://github.com/eavanvalkenburg/dyndns](https://hashnode.com/posts/dynamic-dns-with-edgerouter-and-azure/6183fb5dfd5d634d01697281/comment/63b6d73af7b8ce96c16c7101)

Comment · Article · Jan 5, 2023 · [Dynamic DNS with Edgerouter and Azure](https://hashnode.com/posts/dynamic-dns-with-edgerouter-and-azure/6183fb5dfd5d634d01697281)

[Great stuff! My setup is slightly different but I managed to get it to work! I'm using a Unifi Security Gateway (USG) and I wanted to set the IP for my root domain, which in DNS speak is @. So to get it to work I changed the strZone regex to: "^(\[a-zA-Z@\]{1,})(.)(\[a-zA-Z.\]{1,})". Then in the Unifi Controller interface I create a dynamic DNS record with @.domain.com as hostname (and the rest the same as Niels above). This fixes the updates between unifi and DNS! The other things I needed to do to get my system working is setup letsencrypt with the azure-dns plugin, the plugin can be found here. Just follow the instructions there, but I did need to create a seperate service principal in my azure AD, so make sure you are able to do that! Finally two minor tips: I use a lot of subdomains and in my old solution for this I just had a list of those that I had some code loop through, so those were all A records with the IP address, in the DNS Zone in Azure you can do it smarter (and with that you only need 1 dynamic DNS record in Unifi) and that is to set the subdomain as A records with the Alias record set set to yes and pointing to the record that gets updates (@ for me). This aliasing is smarter then regular CNAMEs in DNS because it does return the IP address that it points to rather than having to do 2 lookups! you can SSH into your USG and then run these two commands once you have the dynamic DNS setup in the portal, to force the call to your function: update dns dynamic interface <interface, in my case eth0> and then to check the outcome: show dns dynamic status. If you are unsure of the interface run the second one first and then you will see the interface!](https://hashnode.com/posts/dynamic-dns-with-edgerouter-and-azure/6183fb5dfd5d634d01697281/comment/61855554936da605cb9aa982)

Comment · Article · Nov 5, 2021 · [Dynamic DNS with Edgerouter and Azure](https://hashnode.com/posts/dynamic-dns-with-edgerouter-and-azure/6183fb5dfd5d634d01697281)
