DNS over Wireguard, local DNS resolves once

The issue I am facing:
Hey.

I have a weird problem with Local resolution over Wireguard on iPhone on new installations. I have set Local dns record to proxy.example.com -> 10.100.10.12. I also have few cname records ex. cam.example.com -> proxy.example.com and few more.

All of those are hosted locally and arent open to internet.

My wireguard server is Mikrotik router. No VLANS, everything is on subnet 10.100.10.0/24, except for Wireguard peers, those are on 10.100.12.0/24.

Wireguard DNS were set to Pihole 1 for a long time without problem. Ive installed Piholes 3 to 5 today. On piholes 3 and 4, DNS just works. Resolution is perfect even over Wireguard, except for that moment when I try to go to local DNS in browser on iPhone on Wireguard. I can resolve exactly 1 local domain per container restart.

Pihole 5 actcs weird too, I can resolve everything external. But internaly I can resolve only proxy.example.com, which albeit slowly, loads.

Details about my system:
I have 5 Pihole instances (2 of those are just for testing purposes):
Pihole 1 - Old bare metal installation in Raspi4, migrated from v5 to v6. I need to kill this one soon. Resolutin works flawlesly over Wireguard.

Pihole 2 - Docker container on Synology nas. Fresh instalation. Configuration teleported from Pihole 1. Doesnt work over wireguard at all, doesnt matter, is used only locally.

Pihole 3 - LXC container on Proxmox host, fresh install, Configuration teleported from Pihole 1

Pihole 4 - LXC container on Proxmox host, fresh install. No configuration teleported. Just added Local records and some CNAMES, interface setting set to Permit All.

Pihole 5 - Debian VM on Proxmox host, fresh install. No configuration teleported. Just added Local records and some CNAMES, interface setting set to Permit All.

From logs I can see, that Pihole TRIES to resolve local domain, but in the end I get Timeout.
May 9 21:41:57: query[HTTPS] cam.example.com from 10.100.12.2
May 9 21:41:57: config cam.example.com is
May 9 21:41:57: query[A] cam.example.com from 10.100.12.2
May 9 21:41:57: config cam.randak.it is
May 9 21:41:57: /etc/pihole/hosts/custom.list proxy.example.com is 10.100.10.12
May 9 21:41:57: query[HTTPS] proxy.example.com from 10.100.12.2
May 9 21:41:57: cached proxy.randak.it is

Do you guys have any idea what is going on?

Best, Mondrogar

//edit: For future generations. I just found where problem is... I dont have solution yet, but I think Im on right track.
It wasnt Pihole problem in the first place. I mean Pihole 1 acts weird since upgrade but thats another story.
Things is that local domnain resolution works on EVERY SINGLE DEVICE reliably over Wireguard except for iPhone. It seems that Apple has some weird DNS solution. I also tried to create AdGuard Home LXC container, just to test this and problem persists.
In conclusion, this isnt Pihole problem at all.

Sorry folks.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.