I have a home network with most devices running NordVPN.
I have a raspberry pi acting as a mini home server - and have just started using Pi-Hole a DNS program that points various tracking and marketing URLs to nothing.
If I manually set the DNS on my computer to the local address of the Pi then it all works fine. But if I turn on the VPN (on my PC connecting over the wifi to the router and out to the intenet) then the local DNS simply fails.
In summary:- With the VPN off I can ping my mini-server and nslookup specifying it as the server 'nslookup - xxx.xxx.xxx.xxx' all works fine. But if I activate the VPN, while the ping is still fine, the nslookup times out.
I suspect the DNS requests are being sent out through the VPN (which then can't access my local addresses). Is there a way of verifying this? And if it is the problem configuring the PC to use the Pi first even when the VPN is active?
This question (local DNS not working with VPN active) has been asked a few times before, but hasn't had an answer that I could find.
Suggestions made and tried:-
- Manually add a route to the local DNS server - unfortunately NordVPN only lets you give an IP address, not to specify a route.
- Bridge the VPN adaptor and a local adaptor - this just blocked internet access.
- Use a loopback adaptor with high priority so windows tries this first - unfortunately it seems the VPN priority is blank and gets first crack at everything
- Use 'split tunneling' so only remote traffic goes via the VPN - unfortunately the NordVPN client only allows split tunneling on an app by app basis, not based on ip address.
Idea working on...
- YogaDNS (https://www.yogadns.com/) is an app that looks like it can intercept and redirect DNS calls at a very low level -- But I have not found a configuration that works yet (I am speaking to their support people).
hosts
file for the filtering, such as MVPS?