Pi hole and VPN

The issue I am facing:
Using Pi-Hole with vpn causes dns leak.

Details about my system:
Private VPN running on UniFi DreamMachine Pro. DNS Wan left on auto. Network dns forwarded to pi hole ip.

3 Networks (1 ssid for each one). Main network (no vpn on this one). Vlan 1 (vpn enabled). Vlan 2 (guest, no vpn). Pi hole connected to main network.

Ok I’m facing a dns leak(cloudfare servers) when using pi-hole and vpn on vlan 1. Only way round it is to tell UniFi not to use pi hole as dhcp name server and set it to auto. But this bypasses pi hole then.

How do I get round this? would be nice to have pi hole working.

Pic of pi hole dns settings (tried routing it back to my unifi (10.0.0.1) but still causes dns leak)

Sorry if I am misunderstanding but...

I think its expected behavior that your dns (pihole) ip would show up if that's what you have your traffic pointed at. This is why it is usually suggested to use your vpn's dns to prevent this type of leak. Since then when you do a leak test, it should show your vpn's dns unless traffic is being routed outside of the vpn.

You could also enable DoH or DoT using a service like cloudflared to prevent this. Then it should show cloudflare, or whatever provider you choose, as the DNS server.

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