How to use NordVPN + PiHole together

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 problem: when NordVPN connection is active, PC has no access to the device hosting PiHole ad blocker

Workaround

The solution I found to work around this issue was to:

  1. 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.
  2. 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.
  3. Import the downloaded file to OpenVPN GUI.
    I just moved the file to c:\Users\MyUserName\OpenVPN\config\.
  4. 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.
  5. Set up OpenVPN GUI to autostart with system and to start new connection when launched
Step 2: downloading NordVPN configuration for OpenVPN client

Observations

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.

Good luck!

Leave a Comment