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:

A diagram showing desired setup: NordVPN should tunnel all traffic to the internet. But DNS queries should be an exception and go to a local instance of PiHole.
The problem: when NordVPN connection is active, PC has no access to the device hosting PiHole ad blocker


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
    where IP is the address of your PiHole.
  5. Set up OpenVPN GUI to autostart with system and to start new connection when launched
Screenshot showing how to download NordVPN configuration compatible with the OpenVPN client
Step 2: downloading NordVPN configuration for OpenVPN client


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.

NordVPN and PiHole successfully working together
NordVPN and PiHole successfully working together

Good luck!

3 thoughts on “How to use NordVPN + PiHole together”

  1. Would there be an advantage in setting up NordVPN on the Raspberry Pi? i’m guessing the Pi is acting as your DNS server for PiHole.

    • Hi Tom. I didn’t find much use for NordVPN on Raspberry Pi in my setup. But I am ensuring encryption of DNS queries between the Raspberry Pi and the DNS service by using DNS-over-HTTPS protocol instead of the regular, unencrypted DNS.

      So, currently my DNS queries go from PC -> Raspberry Pi (in the same trusted network) -> NextDNS service (using secure DNS-over-HTTPS protocol, I use dnscrypt-proxy). I thinks that’s a pretty solid setup 🙂

  2. Know that your queries are doing to the upstream DNS provider using your own IP. If privacy is a concern then you should also run your pihole through Nord so it connects to the DoH upstream using the Nord server’s IP.


Leave a Comment