NordVPN blocks access to PiHole device when connected
I consider the following privacy tools useful, but for a long time, I didn’t see a way to make them work together at the same time:
- PiHole is a DNS-based ad-blocking and malware-blocking software with a friendly web UI.
Typically, it’s installed on a Raspberry Pi device, and it can serve as DNS server for all devices in our network, like PCs, smartphones, or tablets.
- NordVPN is one of the popular VPN services. I consider it cheap, reliable, and fast enough for all my needs.
When I wanted to have both those tools working at the same time, I noticed that starting VPN connection in NordVPN also made Raspberry Pi device in a local network unavailable. PiHole therefore could not be used while VPN was active. I imagine the problem could be represented as follows:
The solution I found to work around this issue was to:
- Replace the official NordVPN client with an OpenVPN GUI software. It’s a popular open-source software.
The downside here is that it forces us to use OpenVPN protocol for VPN connection, so we won’t benefit from improvements coming from NordLynx protocol. But it’s good enough for me.
- Download NordVPN configuration for OpenVPN client from the official NordVPN website.
You’ll have to choose a single, specific server to use with OpenVPN. This is another downside. There won’t be an option to automatically “choose the fastest server” as in the official NordVPN client.
I chose one of the servers located near me, and UDP as a transport protocol.
- Import the downloaded file to OpenVPN GUI.
I just moved the file to
- Set your PiHole device as preferred DNS server when connecting to VPN.
Modify the downloaded configuration file and add a line similar to:
dhcp-option DNS 192.168.0.91
where IP is the address of your PiHole.
- Set up OpenVPN GUI to autostart with system and to start new connection when launched
I’m using this setup for at least a few days now, and it all seems to work smoothly. Ads get blocked as they used to, and the fact that I’m using VPN became invisible to me.