Here is my problem. When I am working from home I use Wireguard to connect to work. In the configuration file I specified the DNS server (for example 192.168.100.6).
But that routes all DNS queries over that server. So I can’t reach my home lab while I am connected with FQDN.
I was thinking of different solutions:
1, Adding local IPs to my domain as a public DNS entry, but that seems a bad idea.
2, Using something on my computer to route DNS traffic (and set my computer as DNS)
Assign both remote and local DNS servers? That should allow the remote server to fail, computer then checks with the next in line (home) and should resolve for you.
If the tunnel is connected, then it should (maybe) still use your local DNS through the tunnel. But I’m not certain on this one. Tether to phone (wifi off) and give it a try?
Well, this is a half-solution still. If I reverse the order and add the local DNS server first. Works. But I have issues with HA-Proxy. None of those are resolving.
I haven’t tested this but my understanding is that when you list multiple DNS servers it will only move on to the next if it fails to get a response from the first. If you get a ‘not found’ response from the first resolver, it will not go to the second.