I have pihole up and running for more than one year and everything worked perfectly until yesterday when i bought a subscription for Mullvad VPN. Now, when i’m connected to Mullvad, pihole doesnt seem to block the ads anymore.
What should i do in order to get pihole running also when i’m connected to the VPN?
Mullvad can block ads just like Pi-hole, or you can tell Mullvad to use a local DNS source. The settings section of their app will show the various options.
Pi Hole won’t work when you’re connected to your third party VPN provider. All traffic is end to end encrypted, including DNS requests. As far as I’m aware, I don’t think you’ll be able to get the two to work in tandem.
I think it depends on your VPN. Pihole acts as a DNS server, so its job is to translate domain names into IP addresses - and then block any that it knows are ads etc from being resolved, so your device won’t know the address to connect to.
When you use a VPN, typically all your traffic is routed through the VPN - therefore it will usually also act as a DNS server and won’t block ads.
I believe you have a few options you could explore.
Is that you configure your router to use the VPN, rather than your client. That means your router (I think) will do DNS locally then use the VPN for the internet traffic.
You see if your VPN can be configured not to assign a new DNS server to your client.
If neither can be done, I think there may be a way to configure your OS to split traffic to DNS and VPN but not sure how sorry!
The point of a VPN is to ensure nobody interferes with your connexion. The point of Pihole is to lie about domains to block nasty content providers.
Unless you are considered a rrusted network admin by the VPN server, those objectives are incompatible. Find a VPN that allows you to use the LAN-provided DNS resolver.
My work’s VPN was still trying to reach their infra domains by asking Pihole. Was hard to find a way to circumvent that…
That is because the Mullvad client is sending all your traffic over the VPN. You can set up what’s called a “split tunnel” so that it makes an exception for pi-hole. This article explains how.
I’ve not looked at this myself, but am interested in doing something similar. It sounds like a second pihole instance is needed which is logged on to the VPN service and then share the internet from that pihole instance locally…
When you are connected to your VPN provider, you are using their DNS servers, not your DNS Servers. Personally, I don’t use VPN on my devices when I am connected to my own network. However, when using cellular, or on another network, it do use VPN, either from a provider, or to get back to my network.
There is nothing you can do about it. Unless you wanna cause a dns leak, one of your only options is PiVPN. (You can do this in the cloud and with pihole too. I recommend making your own personal vpn with linode because most vpn services are trash.) Your second option is just use NextDNS.
Not entirely true. However it really does depend on how the VPN is setup and if the software has the option to set a custom DNS, if it does you can set the Pi-Hole as DNS server for the VPN.
I have a VPN built into my router, and I use dhcp-option=6 in DNSmasq on the router to have the VPN DNS query my Pi-Hole.
Some, but very few vpn services allow you to customise the dns provider (Despite this defeating the purpose of a vpn). Mullvad does provide the ability to use your local DNS configuration.
A potential middle ground could be a service like NextDNS which provides a customisable encrypted global DNS sinkhole for a low price, while maintaining native internet speeds.
NextDNS is basically a “cloud based Pihole” to put it loosely.
You see the Mullvad icon up in the menu bar? Click on it and there will be a small gear icon in the upper right hand corner. Click on it.
You will then see an option for Preferences and Advanced. To use the built in ad blocker, click on preferences then scroll down and enable block ads and any other options you deem wanted. To use your own dns servers, click on advanced, scroll down to the bottom and enabled where it says use custom dns server. You will have to turn off all the built in Mullvad blockers before this becomes enabled.
No, the point is to have a enrcypted connection, even when you are connected to shitty public wifis and you can still access your LAN, including pihole.