[Route all DNS requests through the OpenVPN service(a VPN client) found on the same Pi.]
[Can’t figure out how to configure it to be so.]
[I tried to upload a debug log but I got the error “There was an error uploading your debug log.”]
The closest article I could find to my issue is this (Pi-hole installation on rpi as vpn gateway, ( openvpn client ) fails (spectacular)).
I have followed a guide to get my RPi to act as a router and forward traffic from my LAN through a 3rd party VPN. The Pi does this by using OpenVPN to connect to a remote VPN server. This currently works as intended. The guide I followed is this (https://gist.github.com/superjamie/ac55b6d2c080582a3e64)
I am now looking to install Pi-Hole and have it so that Pi-Hole routes all its traffic through the VPN as well. I want to do this for two reasons. 1. To prevent DNS leaks. 2. To prevent anyone analysing my traffic to determine where I am resolving my DNS requests and the content of those requests.
My Pi currently has a static IP assigned. I have tried to set it up using both eth0 and tun0. I know I can change it to listen to multiple interfaces if need be.
How can I setup Pi-Hole to use my VPN connection to forward its requests if the VPN connection is active.
When establishing the VPN connection my Pi needs to resolve the domain of the VPN server it is connecting to. If Pi-Hole is set to only use the VPN connection (which wouldn’t be active at this point) then how would my Pi be able to resolve this query?
Perhaps there is a way I can set my Pi up so that any DNS requests the Pi makes can go out over eth0 if tun0 is down but any DNS requests a client makes must go out over tun0.