Pi-hole silent after VPN connects: an empty query log is the tell
By Daniel Brooks Published 12 min read
Some links on TechInfoTime are affiliate links: if you sign up or buy through them we may earn a commission, at no extra cost to you. We recommend a tool only where it fits the problem, and say who should skip it.
On this page (11 sections)
- The short version
- Read the query log filtered to the affected client
- Pi-hole DNS stops working after VPN connects
- Check the client's current DNS server before you change anything
- Pi-hole's listen interface and permitted origins settings
- Check the firewall on the Pi-hole host
- Test from a second LAN device while the VPN is up
- Split tunneling the Pi-hole address or leaving the tunnel whole
- Mobile platforms and per-app DNS
- Prove the query path before you look at blocklists
- Questions people still ask
In short: When Pi-hole stops working after a VPN connects, check whether queries from the affected client reach Pi-hole at all. An empty query log means the VPN is routing DNS elsewhere before Pi-hole sees it. Queries that arrive but get no reply point to the listen interface, permitted origins, a firewall rule, or blocking.
Part of our guide on quick fixes for update issues
One filter applied to the query log splits this fault in two, and the two halves need opposite fixes.
| First action | Filter query log by client |
|---|---|
| Empty log means | Packet never reached Pi-hole |
| Logged, no reply | Interface, origins, firewall or blocking |
| After interface change | Restart the resolver |
| Typical LAN address | 192.168.x.x range |
| Time to diagnose | About 1 minute |
The short version
- Filter the log to the affected client before you change any setting.
- Empty log: the packet never arrived, so fix the route, not the blocklists.
- Logged with no reply: check the listen interface, then permitted origins, then the host firewall.
- Test from a second LAN device while the VPN is up to split the fault.
Read the query log filtered to the affected client
Say you connect the VPN, the browser hangs on every page, and you start editing blocklists. Stop there. Open the Pi-hole admin page, go to Query Log, and use the client filter to show only the machine that just failed. Leave the VPN up while you do it.
Now watch the log for thirty seconds while you reload a page. Two outcomes matter, and nothing else does.
An empty log means the query never arrived. Your VPN client sent the lookup somewhere else, or the tunnel swallowed the route to the Pi-hole's 192.168.x.x address. Pi-hole cannot answer a question it never hears.
A logged query with no reply means the packet arrived and Pi-hole stayed silent, refused it, or answered from a blocked list. That is a settings problem on the Pi-hole itself, and routing is fine. There is more on how to know if slow internet is router or isp in a separate guide.
Pi-hole DNS stops working after VPN connects
Picture a tunnel that carries everything. A full-tunnel VPN, the default in most clients, routes all traffic including port 53 lookups through the encrypted link. Your device stops asking Pi-hole and asks whatever resolver the VPN provider pushes for the session.
Many VPN clients set their own DNS server for the session, and the operating system accepts it. Pi-hole's address is still configured, but it no longer wins.
The tunnel can also capture the whole 192.168.x.x subnet. If your VPN client routes all traffic, packets to a private LAN address can be sent down the tunnel instead of out to your own router. Pi-hole is then unreachable even though it is sitting on the same network. The other half of this decision is recovering from volume crashes.
Modern browsers add a third layer. Firefox enables DNS-over-HTTPS by default in some regions; Chrome and Edge ship a secure-DNS setting that is usually off but easy to switch on. That app-level resolver skips the operating system setting entirely, so even a working Pi-hole route gets bypassed.
| Cause | What the log shows | First thing to check |
|---|---|---|
| VPN pushes its own resolver | Empty | VPN client DNS settings |
Tunnel captures 192.168.x.x | Empty | Split tunneling for the Pi-hole address |
| Browser DNS-over-HTTPS | Empty or partial | Secure DNS setting in the browser |
Check the client's current DNS server before you change anything
Before you touch Pi-hole, confirm what DNS server your client is actually using. The VPN may have pushed its own resolver without telling you.
On Linux, run resolvectl status or cat /etc/resolv.conf and look for the nameserver line. On macOS, run scutil --dns | grep nameserver. On Windows, open a command prompt and run ipconfig /all, then find the DNS Servers entry under your active adapter. We go through windows license oem or retail step by step elsewhere on the site.
If the output lists anything other than your Pi-hole's address, the VPN client or your operating system switched resolvers when the tunnel came up. You can fix that in the VPN client's DNS setting, or by excluding the Pi-hole address with split tunneling.
Pi-hole's listen interface and permitted origins settings
Suppose the log shows the query but the status reads refused, or the client retries forever. Pi-hole is answering on the wrong interface or rejecting the source address. Both are one-page fixes in Settings, then DNS.
The listen interface controls which network card Pi-hole answers on. The common choices are a specific adapter (often eth0 on a Raspberry Pi, but check ip addr or ifconfig on your own host to find the name), or all. Localhost-only mode explains refused answers from LAN clients. Before you commit to anything, it is worth looking at how to improve email deliverability for campaigns.
Permitted origins decide which source addresses are allowed at all. Set to 'allow only local requests', Pi-hole accepts just its own subnet. A VPN exit address, or a device whose traffic appears from another interface, falls outside that range and gets dropped.
The setting that catches people is the restart requirement. Changing the listen interface does not take effect until the DNS resolver restarts. Use the restart button in Settings or run pihole restartdns in a terminal.
- Open Settings, then DNS, and note your current listen interface value.
- Set it to all, or to the specific LAN adapter (check ip addr or ifconfig for the name), not localhost-only.
- Check permitted origins and widen it if your clients arrive from outside the Pi-hole's own subnet.
- Save, then restart the resolver with pihole restartdns or the restart option in the interface.
- Reload the client page and watch the log for a reply, not just an entry.
Check the firewall on the Pi-hole host
Say the log shows the query arrived but Pi-hole never answered. The listen interface is set to all, permitted origins allows the client, and blocking is off. Check the firewall next. Before you commit to anything, it is worth looking at choose an eSIM for your trip.
A firewall rule on the Pi-hole host can silently drop incoming DNS packets on port 53, or block replies from leaving. The query appears in the log because Pi-hole's logging happens before the kernel firewall runs, but the reply never makes it back to the client.
If you are running ufw, check sudo ufw status and confirm port 53 is allowed. For firewalld, run sudo firewall-cmd --list-all and look for DNS in the services list. For plain iptables, run sudo iptables -L -n and scan for a rule that drops or rejects UDP port 53.
The fix is opening the port. For ufw, run sudo ufw allow 53/udp and sudo ufw allow 53/tcp. For firewalld, run sudo firewall-cmd --add-service=dns --permanent then sudo firewall-cmd --reload. Test again and watch the log for a reply.
Test from a second LAN device while the VPN is up
Say one laptop fails and you blame the Pi-hole. Before you rebuild anything, open a page on a second device on the same network that is not running the VPN. If that device resolves normally, the Pi-hole is healthy and only the first client is broken.
This one-minute test points the fix at the client, its VPN software or its DNS setting. It also protects you from the opposite error, rewriting a working Pi-hole configuration in response to a client problem.
If the second device also fails, the fault is upstream of any client. Check that the Pi-hole machine is powered, that its own internet works, and that your router still hands out its address as DNS. A router reboot can quietly reset the DHCP-assigned DNS server.
Run the test again right after the VPN connects and right after it disconnects. A fault that appears only while the tunnel is up confirms a routing or resolver conflict, not a broken Pi-hole.
Split tunneling the Pi-hole address or leaving the tunnel whole
Picture two ways to keep Pi-hole working with a VPN that has to stay on. Split tunneling sends some traffic outside the tunnel and the rest through it. Leaving the tunnel whole sends everything through, which is simpler but needs a different fix.
Split tunneling wins when you want local filtering to keep working. Add your Pi-hole's private address, 192.168.x.x, to the excluded list so lookups to it bypass the tunnel and stay on your LAN. Everything else still travels encrypted.
Most desktop VPN clients expose this as split tunneling; check your client's documentation for the exact term and menu location. The setting is a few clicks, and it directly targets the empty-log symptom where the tunnel was swallowing the route.
Leaving the tunnel whole is the honest choice when you cannot exclude addresses, or when you are on a locked-down work device. In that case your DNS filtering moves with you only if the VPN provider offers private DNS with custom resolvers, and many do not.
- Keeps Pi-hole filtering active on home networks
- Fixes the empty-log case without touching Pi-hole
- Encrypted traffic still passes through the tunnel
- Not every VPN client offers it
- Excluded subnet is visible outside the tunnel
- Wrong entry can leak more than intended
Mobile platforms and per-app DNS
Say your phone loses DNS on the VPN but your laptop does not. Mobile VPN apps often force their own DNS with no option to change it, and mobile operating systems handle DNS differently than desktops.
Android and iOS both support per-app DNS settings. A VPN app can push a resolver that only applies to traffic routed through the tunnel, while other apps still use the system-wide DNS. That split is invisible to Pi-hole, which only sees queries from apps not captured by the VPN.
System-wide DNS on mobile is harder to override. If you set Pi-hole as your DNS in Wi-Fi settings, a VPN can still replace it for the session. Some Android builds let you set a private DNS hostname that survives the VPN connection, but iOS offers no equivalent outside of a profile.
Mobile browsers add another layer. Safari on iOS respects the system resolver, but Chrome and Firefox on Android may enable secure DNS by default, which sends lookups directly to a public resolver over HTTPS and skips Pi-hole entirely. Check the browser's privacy settings and turn off secure DNS for one test.
Prove the query path before you look at blocklists
Say you disable blocking, the site loads, and you conclude the blocklist was at fault. That test proves nothing. Blocking off changes what Pi-hole does with a query, not whether the query arrives.
The order matters. Confirm the query reaches Pi-hole first. Then confirm Pi-hole replies. Only then look at whether the reply was a block.
A query that never arrives is invisible to every blocklist setting. Disabling blocking during an empty-log fault simply leaves the fault in place, and you have lost the log entries that would have shown you why.
Once the log shows a reply, blocking becomes a fair suspect. Search the domain in the log, find the blocked status, and check which list matched it. Whitelisting one domain is a smaller change than turning blocking off for everything.
- Filter the log to the affected client and reload a page.
- If nothing appears, fix routing or the client's DNS setting first.
- If a query appears without a reply, fix the listen interface and origins, check the host firewall, then restart the resolver.
- If a reply appears with a blocked status, whitelist the specific domain rather than disabling blocking.
- Only after all three stages pass should you change blocklists wholesale.
Read the log first. Almost every Pi-hole-after-VPN fault resolves into either a routing problem or an interface problem, and the log tells you which in under a minute.
Questions people still ask
Why does Pi-hole work again the moment I disconnect the VPN?
Disconnecting tears down the tunnel and the pushed resolver with it. Your device falls back to the DNS server in its own settings, which is Pi-hole. The fault was never in Pi-hole; the tunnel was carrying lookups past it.
The log shows the query but the answer never comes. Is that blocking?
Usually not. Blocked queries still get a reply, just one that points nowhere. A query with no reply at all points to the listen interface, permitted origins, or a firewall on the Pi-hole host.
I changed the listen interface and nothing happened. What did I miss?
The resolver restart. Pi-hole reads the interface setting when the DNS service starts, so a change stays inert until you restart it with pihole restartdns or the interface button.
Can I keep Pi-hole filtering while a VPN is connected?
Yes, if your VPN client supports split tunneling and you exclude the Pi-hole's private address. Lookups to that address then stay on your local network while everything else travels through the tunnel.
My phone loses DNS on the VPN but my laptop does not. Why?
Mobile VPN apps often force their own DNS with no option to change it, and mobile operating systems support per-app DNS that can route some traffic around Pi-hole. Phone browsers may also enable secure DNS by default, which skips the system resolver entirely.
Should I just point the router at a public resolver instead?
That restores browsing but gives up Pi-hole filtering and the query log that makes diagnosis possible. Keep the router pointed at Pi-hole and fix the client or the tunnel instead.
What if Pi-hole is running on the same host as the VPN server?
The firewall or routing table may block traffic between the tunnel interface and the LAN adapter. Check that the host firewall allows DNS on both interfaces, and confirm Pi-hole is set to listen on all interfaces or on the specific LAN adapter, not just localhost.