Unifi Local DNS issues

I suspect this issue is most likely just my setup and being a beginner, but I am having trouble with nginx proxy manager and unifi cloud gateway fiber with DNS (I think its DNS at least).

I have a cloud gateway fiber, and I have hosts such as books.myname.com set as c name to nginx.myname.com which resolved to my nginx proxy manager instance. I have nginx proxy manager setup, and most of my items like plex, jellyfin, etc all seem to work fine. I have issues with audiobookshelf however (which does require web sockets) which I have turned on in nginx proxy manager. When I use books.myname.com the interface shows but says no socket connected (but sometime will end up showing connected socket about 10-15 seconds later). When I access audio bookshelf via ip sockets connect instantly, so I assume there is an issue between my DNS and my RP.

When I nslookup books.myname.com I do get my NPM ip, so I “think” unifi is correctly forwarding this. (The only thing that makes me question it is it seems like using unifi for DNS doesn’t always work, some of the other sites will occasionally take a few refreshes. It is no wear near as fast and consistent as adguard with dns rewrites, but I would like to simplify and keep the dns onto unifi gateway if able). My nginx proxy manager logs give me this

2025/10/13 20:35:47 [warn] 3930#3930: *15074 an upstream response is buffered to a temporary file /usr/local/openresty/nginx/proxy_temp/>
<mbolsRounded.dae4c83.woff2", host: “books.myname.com”.

This doesn’t seem to be an all out error just a warning.

Would appreciate help on what the next steps are to troubleshoot as I would like to get this working. The only other self hosted item I can’t get working behind the local DNS is webdav, but this seems to be a more complicated setup and one that is known to be an issue, the web sockets seems like it should work just fine.

These are likely two separate issues.
DNS
On UniFI or otherwise DNS should always answer consistently and fast unless there is either another DNS server in the mix. You can use the dig command from the command line to confirm DNS responds properly. * dig books.myname.com +short to use the system DNS and * dig @TheUniFiIP books.myname.com +short Then check that your system ONLY has the UniFI for DNS and that the browser is not using external DNS which is a very common issue.
Audiobookshelf:
While I have been wanting to test out audiobook shelf, I have not done so. I did take a quick look at their documentation and I don’t see anything special for NPM audiobookshelf I would check the logs in both NPM and Audiobook shelf to see how far the connection is getting.

Thanks for the quick response.

Dig for both shows up with the correct nginx.myname.com reverse proxy address as well as the appropriate ip address. This seems like DNS should be resolving correctly. As for the only unifi DNS I have it set to auto, which I believe should be the unifi DNS only.

I don’t see any errors showing up in nginx or audio bookshelf logs. Is there another way to trace the route? If you have any resources to learn and trouble shoot feel free to point me that direction!

Thanks again for all the help.

Go into the docker container and see where the connections are or are not being made. ChatGPT can be helpful walking you through the commands.

I have found the issue, but am more confused and don’t know how to fix since it seems to be the unifi. After extensive log checking everything seems fine in nginx proxy manager and audio bookshelf, and since my unifi router is really the only “new” item and I previously used adguard DNS for DNS re-writes installed it again and used it for my DNS. Everything works perfectly across the board without hiccups. By process of elimination this seems to mean there is an issue with DNS and unifi, but I’m not sure what else to do?

Is there a possibility of content filtering blocking something? I have tried IPS off and no change. I have the proxmox server, audio bookshelf, and Nginx proxy manager all on the same network to simplify things and zones are allow all within this VLAN.

nslookup and dig resolve appropriately, but there must be something going on where its causing issues. Before I start clicking “all the tabs” on the unifi gateway and mess something appreciate any other ideas to troubleshoot the problem.

Edit:

Done more digging and still can’t pin down the problem, but it’s definitely with unifi. I went ahead and changed my reverse proxy to books.localdomain and then adjusted unifi DNS to have books.localdomain and everything works fine. using books.mydomain.com (setup with lets encrypt with my personal domain on the reverse proxy, but only using locally) is giving me the errors. So am not sure where to go, but seems to be something with the my unifi setup pushing to the reverse proxy when I’m using a FQDM.

In well over my head at this point!

Is NGINX Proxy Manager on the same network as your system you are trying to access from? If so then the data is not passing through the UniFI.

Yes. My nginx proxy manager is running on proxmox within the same Subnet.
I’m a bit confused what you mean it’s not passing through the UniFi? I do get resolution sometimes of some of my local dns requests and the dig shows that it is resolving to correct ip.

Is there an issue with the routing somehow I need to correct with local dns with the reverse proxy?

DNS request go to the UniFI and it responds, but the traffic on the same subnet does not route through the router.

Gotcha. I was not thinking when you answered and thinking about vlan which might be running through firewall which is why I put everything on same subnet to make sure no issues. (Also appreciate how kind you are on your VLOG to beginners! But point taken). I have spent another few hours with this issue and still not sure where to go.

From my trouble shooting unifi DNS seems to be correct when I use dig and nslookup. My understanding is unifi local DNS takes my “books.myname.com” and just points it where it needs to go, in my case the ip address. I have looked extensively in unifi logs and don’t see any issues at all.

Again thinking it might be a reverse proxy issue or audio bookshelf have went through all logs and no issues. I even tried another reverse proxy with zoraxy and ran into same issues.

Since the only thing in my system changes since using this before is the unifi cloud gateway fiber instead of a synology router, I did go back to unifi and instead of using an A-name to my reverse proxy IP (or trying C-name to my reverse proxy domain name as in your video), I did set up adguard and when I use it as DNS everything works.

Adguard has the option for “DNS-rewrite” where I can just put *.myname.com and it will forward to the reverse proxy. I am wondering if this is something significantly different than what I would be doing with unifi? My understanding is this should be essentially the same as using unifi A-name pointing to the RP ip address, it just allows you to use the wildcard variable (which is why I had picked adguard over pi-hole in the beginning for simplicity).

Based on this finding I have went to my unifi and just used “forward domain” and pointed my local DNS self hosted apps only to point to my adguard and everything works. So my process of elimination (and also exhausting everything chat gpt wants) I am down to there being something in my setup within unifi cloud gateway causing an issue (or my understanding of what local DNS is vs adguard DNS re-write is doing something different). Because of the issue only when using the local DNS on unifi I thought maybe there was an issue with security or IP protection settings on unifi intercepting it? But I also tried turning these off and didn’t make a difference.

So kind of back to square one. Not sure where to go since all logs look good, everything seems to be pointing correctly to everything else, have pinned down my reverse proxy and another DNS sever works fine, but having issues within unifi. I’m sure I’m missing something just don’t know what else to look for.

Have you tried to setup a simple web server and setup DNS to point to your NPM and see if it works?

Setting up a reverse proxy is simple.

  1. Setup DNS to your reverse proxy
  2. Make sure your reverse proxy points to the proper IP matching the domain you want to go to. IE books.mysite.com

Here is their documentation too.

Yep. Have done that and it works fine. Honestly the whole idea of a reverse proxy seems pretty straight forward and have used several over the years. So just point to the RP and good to go. When using other dns servers it’s all working, so it’s not an audiobookself or RP issue (and as above, yes logs all fine etc). But when using UniFi dns which is dead simple it only sometimes resolves. This is what’s making me think something is happening with the local dns on UniFi and the RP (thus my thinking it’s something with filtering etc but logs don’t show it). Maybe there is some loop somewhere I’m missing as I’m new to UniFi.

Do you have multiple DNS servers set up in your DHCP config? Do you have only your DNS specified on your PC trying to reach the site? Might be a weird issue with primary and secondary DNS, maybe.

No. Single DNS. I only setup the adguard when I kept banging my head into wall trying to figure out why my setup quit working since UniFi is only new piece.

I did try the adguard as dns (setup in UniFi gateway) as well as the dns on specific device (Mac, iOS, iPad) just to make sure it wasn’t an issue with device.

By process of elimination I’m down to it has to be something with UniFi when I use it as local DNS. I just don’t understand what else it could be. And I’m very confused why it resolves some sites pretty regularly, but won’t connect websocket on Audiobookshelf and won’t work with my WebDAV server. Somewhere in my chain something isn’t being forwarded correctly or something is broken.

This is what lead me to think it was a restriction setting in UniFi but I don’t see anything blocked.