Adding a Static DNS Entry into the Ubiquiti UniFi Dream Machine Pro

JUNE 2023 UPDATE: You can now enter static DNS entries under the “Client” settings in UniFi OS v3.0.20 (or above).

Leaving Original Post Below for Reference:

Something I ran into today on my home network, with the Ubiquiti UniFi Dream Machine Pro, is that you can’t add a static DNS entry into the Dream Machine Pro, which totally stinks.. I had a VM that I setup which I needed to refer to by DNS name, but couldn’t.

It seems many others have been asking for this feature as well:
https://community.ui.com/questions/Feature-requestRepost-UniFi-Dream-Machine-Pro-add-[…]in-DNS-forwarder/e525171f-0aa5-46b6-b2af-6ad2d966e899

Thankfully a user on the above thread posted a possible workaround with a script calling the API: https://github.com/evaneaston/udm-host-records — I have since implemented this script on the Dream Machine Pro and it worked wonderfully!

8 Comments

  • I have been using these scripts, but find all entries are erased with any network change (FW Rules, VLANs, etc). Are you encountering this. I have created another simple script to re-add them all, but it would be nice to add them permanently

    Reply
    • @TheRonniegade – I too have noticed that the entries are wiped out after some time too, I thought it was due to code upgrades or something. I have not investigated a resolution to that, although maybe the script author has posted a fix.

      Reply
      • I have k8s cluster in my lab. I’d imagine using this but running it as a cron job every night would mitigate this issue. I’ll be implementing it later today

        Reply
  • Where exactly did you find the “Client” settings. I’m on the correct version, but can’t find the setting.

    Reply
  • I’m running UniFi OS v3.1.16 and Network app v7.5.187 on a USG 3P. I don’t see this option as described.

    Reply
    • @Dave – i think a Dream Machine is needed for this feature? I could be wrong but have only seen it referred to the Network app running on a Dream Machine (Pro, SE, etc).

      Reply
  • Unfortunately, it’s still limiting in design. Should support pointing many DNS Names to single ip. Should not be a 1:1 relationship.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top