Unifi Devices Offline Due to AdGuard

Share This Article

Yes, another “Unifi Devices Going Offline when it is working !”. This time, my issue is Unifi Devices Offline Due to AdGuard. It is different from the previous issue as per the blog post below

Why Unifi Devices Offline Due to AdGuard

So I decided to add yet another self host application to my ever growing self host applications such as Jellyfin, Calibre and Calibre Web, Audiobookshelf etc.

Of course I did it with the help of Mr Marius Hosting article : Synology: Install AdGuard With Portainer

I got it running in minutes and soon it is protecting the household with Ads Filtering and Tinder Blocking (why !? Just because I am BBFA !).

AdGuard Home dashboard showing DNS queries, blocked filters, and top client iPhone, related to Unifi device issues.
AdGuard Self Host

Anyhow I did that on 24 Dec 2025.. what an EXCITING thing to do during Xmas Eve. Any doubt that I am BBFA now ?

AdGuard stack in Unifi, showing "adguard" name, "Compose" type, "Total" control, and creation date 2025-12-24. Unifi Devices Offline Due to AdGuard.
Xmas Eve Set Up Adguard

A day or two later, I checked my Unifi Controller hosted with Hostifi and noticed the following sad state. As you might be aware, I bought (wrongly) the UniFi UXG Fiber 10G Gateway which does NOT come with a cloud controller.

This is what I see… 3 offline devices… one UXG Fiber up and running.

Unifi Devices Offline Due To AdGuard
Unifi Devices Offline Due To AdGuard

AdGuard was blocking my Unifi devices from reaching HostiFi controller. The HostiFi Controller being hosted at HostiFi needs to be reached from the Unifi Devices to “update” the status etc.

Checking the AdGuard Logs

Unifi Devices Making DNS Queries To No Where
Unifi Devices Making DNS Queries To No Where

If we look at the AdGuard logs, you can see that the devices were trying to talk to making DNS queries for:

  • unifi
  • unifi.localdomain

But NOT for m037714.hostifi.com or any HostiFi domains.

This means the device is trying to find a controller, but it’s looking for the wrong one—probably a local controller or the default Unifi cloud address.

What likely happened:

  1. Dec 24: AdGuard installed, DHCP configured to use it for DNS
  2. Dec 25: Unifi devices renewed their DHCP leases, got AdGuard as DNS server
  3. Devices tried to contact HostiFi but DNS failed or was blocked
  4. Devices went offline and stayed offline till I decided to look at the Controller cause I am boring man (who ever goes and look at the Unifi Controller if they are not bored)

Solving the Issue of Unifi Devices Offline Due To AdGuard

I took a few steps to solve the issue with the help of Claude 🙂

Step 1 : Set up Custom Filtering Rules for the HostiFi

  1. In AdGuard, go to “Filters” in the left sidebar
  2. Look for “Custom filtering rules” (NOT “DNS allowlists”)
  3. Click on it
  4. In the text box, add these lines (one per line):
@@||hostifi.com^$important
@@||ui.com^$important
@@||ubnt.com^$important
AdGuard Custom Filtering Rules
AdGuard Custom Filtering Rules

Step 2 : Make Every Unifi Devices Talk to the HostiFi Controller

  1. In HostiFi controller, go to Settings → System → Advanced
  2. Find “Override Inform Host”
  3. Set it to: http://m037714.hostifi.com:8080/inform
  4. Save
Setting The Unifi Device To Talk To HostiFi
Setting The Unifi Device To Talk To HostiFi

Step 3 : Reboot the Devices

Now force a hard reboot of the devices (by power cycling it or pull out the damn POE injector etc). Once that is done, check the AdGuard Log. You can see that the Unifi Device is now talking to the Hostifi Server !

AdGuard DNS log showing allowed request from client 192.168.0.146 for hostifi.com. Unifi devices offline due to AdGuard.
Unifi Device Is Now Talking To The Hostifi Server

And when I go back to the Unifi Controller, I can see that 2 out of 3 offline devices are working. And in fact, now updating !

Offline Devices Are Up And Running Now
Offline Devices Are Up And Running Now

But hold on.. one of the switch, the USW Flex 2.5 8 Port switch is still offline.

Step 4 : If the above does not work, let’s try a DNS rewrite

From the logs, it looks like the USW Flex 2.5 8 Port Switch is still looking for unifi and not the Hostifi server. Since the switch keeps looking for unifi, let’s redirect it:

  1. In AdGuard, go to Filters → DNS rewrites (or Settings → DNS settings → DNS rewrites)
  2. Click “Add DNS rewrite”
  3. Domain: unifi
  4. Answer: m037714.hostifi.com
  5. Save
Unifi AdGuard DNS rewrite settings with domain m037714.hostifi.com. Unifi Devices Offline Due to AdGuard fix.
Setting Up DNS Rewrites

After that, you can see the AdGuard logs that it is now changing.. it is DIFFERENT from the CUSTOM FILTERING.

Unifi query log showing rewritten DNS requests for IP 192.168.0.57, related to Unifi Devices Offline Due to AdGuard.
DNS Has Been Rewritten

And then the switch is working ! Not sure if this is the right solution but leaving the rewrite in place is fine. It’s a simple, reliable solution that ensures any device looking for unifi will find your HostiFi controller.

FYI that I did removed the DNS Rewrite and immediately the USW Flex 2.5G 8 Port went offline. So it looks there are some issues. The switch clearly has the old unifi inform URL cached or hardcoded somewhere. Even though I set the Inform Host in the controller, the switch didn’t pick it up. The DNS rewrite is acting as a permanent workaround.

If I want to clean this up later, I should:

  1. SSH into the switch (once SSH is enabled)
  2. Run: set-inform http://m037714.hostifi.com:8080/inform
  3. This would hardcode the correct URL into the switch
  4. Then I can remove the DNS rewrite

But I am too lazy 🙂 So I left DNS rewrite as it is…

Step 5 : Check Unifi Controller and a Happy Ending

So here we go.. all 4 devices are now up and running ! No more issues. ALL GOOD.

Unifi network device list showing "USW Flex 2.5G 8 Port," "FlexHD," "U7-Pro-Wall," and "UXG Fiber," relevant to Unifi Devices Offline Due to AdGuard.
All Four Unifi Devices Are Now WORKING

Conclusion

So we have solved yet another issue with Unifi Devices showing up as OFFLINE even though they are actually working. This time it was due to my “exciting” idea of setting up AdGuard at home 🙂

Quick recap for future reference:

  • AdGuard was blocking your Unifi devices from reaching HostiFi (hence the Dec 25 offline date)
  • Fixed with whitelisting + DNS rewrite
  • All devices now online and happy 🙂

Share This Article

Leave a Reply

Your email address will not be published. Required fields are marked *

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