PiVPN does not resolve with beta version of Pi-hole

Hi y'all,

I know this is not the PiVPN forum but I just wanted to give a headsup what I encountered while I switched to beta. I realized that whatever URL I try to reach while browsing through VPN results in a timeout. If I try to reach whatever device at home using it's IP address everything is reachable super fast. As soon as I switched back to master branch everything get's resolved again flawlessly.
As I'm fairly new to this, please let me know if or how I can help somehow :slight_smile:

I was able to replicate your problem with my PiVPN/WireGuard. IP addresses work, DNS names don't. Reverting to the master branch fixed it.

Anything interesting in /var/log/pihole-FTL.log while trying to resolve DNS names?

unfortunaltely not from what I can see:

[2021-07-07 10:26:37.339 18641M] Shutting down...
[2021-07-07 10:26:37.590 18641M] Finished final database update
[2021-07-07 10:26:37.590 18641M] Waiting for threads to join
[2021-07-07 10:26:37.590 18641M] Thread telnet-IPv4 (0) is idle, terminating it.
[2021-07-07 10:26:37.591 18641M] Thread telnet-IPv6 (1) is idle, terminating it.
[2021-07-07 10:26:37.591 18641M] Thread telnet-socket (2) is idle, terminating it.
[2021-07-07 10:26:37.591 18641M] Thread database (3) is idle, terminating it.
[2021-07-07 10:26:37.591 18641M] Thread housekeeper (4) is idle, terminating it.
[2021-07-07 10:26:37.591 18641M] Thread DNS client (5) is idle, terminating it.
[2021-07-07 10:26:37.591 18641M] All threads joined
[2021-07-07 10:26:37.594 18641M] ########## FTL terminated after 10m 39s  (code 0)! ##########
[2021-07-07 10:26:38.615 19705M] Using log file /var/log/pihole-FTL.log
[2021-07-07 10:26:38.615 19705M] ########## FTL started on Datentonne! ##########
[2021-07-07 10:26:38.615 19705M] FTL branch: release/v5.9
[2021-07-07 10:26:38.615 19705M] FTL version: vDev-00c44c5
[2021-07-07 10:26:38.615 19705M] FTL commit: 00c44c53
[2021-07-07 10:26:38.615 19705M] FTL date: 2021-07-06 21:02:35 +0100
[2021-07-07 10:26:38.615 19705M] FTL user: pihole
[2021-07-07 10:26:38.615 19705M] Compiled for armv7hf (compiled on CI) using arm-linux-gnueabihf-gcc (Debian 6.3.0-18) 6.3.0 20170516
[2021-07-07 10:26:38.616 19705M] Creating mutex
[2021-07-07 10:26:38.616 19705M] Creating mutex
[2021-07-07 10:26:38.618 19705M] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2021-07-07 10:26:38.618 19705M]    SOCKET_LISTENING: only local
[2021-07-07 10:26:38.618 19705M]    AAAA_QUERY_ANALYSIS: Show AAAA queries
[2021-07-07 10:26:38.618 19705M]    MAXDBDAYS: max age for stored queries is 365 days
[2021-07-07 10:26:38.618 19705M]    RESOLVE_IPV6: Resolve IPv6 addresses
[2021-07-07 10:26:38.618 19705M]    RESOLVE_IPV4: Resolve IPv4 addresses
[2021-07-07 10:26:38.618 19705M]    DBINTERVAL: saving to DB file every minute
[2021-07-07 10:26:38.618 19705M]    DBFILE: Using /etc/pihole/pihole-FTL.db
[2021-07-07 10:26:38.618 19705M]    MAXLOGAGE: Importing up to 24.0 hours of log data
[2021-07-07 10:26:38.618 19705M]    PRIVACYLEVEL: Set to 0
[2021-07-07 10:26:38.618 19705M]    IGNORE_LOCALHOST: Show queries from localhost
[2021-07-07 10:26:38.618 19705M]    BLOCKINGMODE: Null IPs for blocked domains
[2021-07-07 10:26:38.618 19705M]    ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2021-07-07 10:26:38.618 19705M]    DBIMPORT: Importing history from database
[2021-07-07 10:26:38.618 19705M]    PIDFILE: Using /run/pihole-FTL.pid
[2021-07-07 10:26:38.618 19705M]    PORTFILE: Using /run/pihole-FTL.port
[2021-07-07 10:26:38.619 19705M]    SOCKETFILE: Using /run/pihole/FTL.sock
[2021-07-07 10:26:38.619 19705M]    SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2021-07-07 10:26:38.619 19705M]    MACVENDORDB: Using /etc/pihole/macvendor.db
[2021-07-07 10:26:38.619 19705M]    GRAVITYDB: Using /etc/pihole/gravity.db
[2021-07-07 10:26:38.619 19705M]    PARSE_ARP_CACHE: Active
[2021-07-07 10:26:38.619 19705M]    CNAME_DEEP_INSPECT: Active
[2021-07-07 10:26:38.619 19705M]    DELAY_STARTUP: No delay requested.
[2021-07-07 10:26:38.619 19705M]    BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
[2021-07-07 10:26:38.619 19705M]    NICE: Set process niceness to -10 (default)
[2021-07-07 10:26:38.619 19705M]    MAXNETAGE: Removing IP addresses and host names from network table after 365 days
[2021-07-07 10:26:38.619 19705M]    NAMES_FROM_NETDB: Enabled, trying to get names from network database
[2021-07-07 10:26:38.619 19705M]    EDNS0_ECS: Overwrite client from ECS information
[2021-07-07 10:26:38.619 19705M]    REFRESH_HOSTNAMES: Periodically refreshing IPv4 names
[2021-07-07 10:26:38.619 19705M]    RATE_LIMIT: Rate-limiting client making more than 1000 queries in 60 seconds
[2021-07-07 10:26:38.619 19705M]    REPLY_ADDR4: Automatic interface-dependent detection of address
[2021-07-07 10:26:38.619 19705M]    REPLY_ADDR6: Automatic interface-dependent detection of address
[2021-07-07 10:26:38.619 19705M]    SHOW_DNSSEC: Enabled, showing automatically generated DNSSEC queries
[2021-07-07 10:26:38.619 19705M]    MOZILLA_CANARY: Enabled
[2021-07-07 10:26:38.620 19705M] Finished config file parsing
[2021-07-07 10:26:38.620 19705M] Database version is 9
[2021-07-07 10:26:38.620 19705M] Resizing "FTL-strings" from 40960 to (81920 * 1) == 81920 (/dev/shm: 1.6MB used, 2.0GB total, FTL uses 1.6MB)
[2021-07-07 10:26:38.621 19705M] Imported 0 alias-clients
[2021-07-07 10:26:38.621 19705M] Database successfully initialized
[2021-07-07 10:26:38.622 19705M] New upstream server: 127.0.0.1:5335 (0/1024)
[2021-07-07 10:26:38.638 19705M] Resizing "FTL-queries" from 180224 to (8192 * 44) == 360448 (/dev/shm: 1.6MB used, 2.0GB total, FTL uses 1.6MB)
[2021-07-07 10:26:38.653 19705M] Resizing "FTL-queries" from 360448 to (12288 * 44) == 540672 (/dev/shm: 1.8MB used, 2.0GB total, FTL uses 1.8MB)
[2021-07-07 10:26:38.663 19705M] Resizing "FTL-domains" from 4096 to (512 * 16) == 8192 (/dev/shm: 2.0MB used, 2.0GB total, FTL uses 2.0MB)
[2021-07-07 10:26:38.675 19705M] Resizing "FTL-queries" from 540672 to (16384 * 44) == 720896 (/dev/shm: 2.0MB used, 2.0GB total, FTL uses 2.0MB)
[2021-07-07 10:26:38.699 19705M] Resizing "FTL-domains" from 8192 to (768 * 16) == 12288 (/dev/shm: 2.2MB used, 2.0GB total, FTL uses 2.2MB)
[2021-07-07 10:26:38.701 19705M] Resizing "FTL-queries" from 720896 to (20480 * 44) == 901120 (/dev/shm: 2.2MB used, 2.0GB total, FTL uses 2.2MB)
[2021-07-07 10:26:38.737 19705M] Resizing "FTL-queries" from 901120 to (24576 * 44) == 1081344 (/dev/shm: 2.4MB used, 2.0GB total, FTL uses 2.3MB)
[2021-07-07 10:26:38.797 19705M] Resizing "FTL-queries" from 1081344 to (28672 * 44) == 1261568 (/dev/shm: 2.5MB used, 2.0GB total, FTL uses 2.5MB)
[2021-07-07 10:26:38.857 19705M] Resizing "FTL-queries" from 1261568 to (32768 * 44) == 1441792 (/dev/shm: 2.7MB used, 2.0GB total, FTL uses 2.7MB)
[2021-07-07 10:26:38.881 19705M] Resizing "FTL-domains" from 12288 to (1024 * 16) == 16384 (/dev/shm: 2.9MB used, 2.0GB total, FTL uses 2.9MB)
[2021-07-07 10:26:38.900 19705M] Resizing "FTL-queries" from 1441792 to (36864 * 44) == 1622016 (/dev/shm: 2.9MB used, 2.0GB total, FTL uses 2.9MB)
[2021-07-07 10:26:38.921 19705M] Resizing "FTL-domains" from 16384 to (1280 * 16) == 20480 (/dev/shm: 3.1MB used, 2.0GB total, FTL uses 3.1MB)
[2021-07-07 10:26:38.937 19705M] Resizing "FTL-queries" from 1622016 to (40960 * 44) == 1802240 (/dev/shm: 3.1MB used, 2.0GB total, FTL uses 3.1MB)
[2021-07-07 10:26:38.961 19705M] Imported 39831 queries from the long-term database
[2021-07-07 10:26:38.962 19705M]  -> Total DNS queries: 39831
[2021-07-07 10:26:38.962 19705M]  -> Cached DNS queries: 27655
[2021-07-07 10:26:38.962 19705M]  -> Forwarded DNS queries: 9497
[2021-07-07 10:26:38.962 19705M]  -> Blocked DNS queries: 1921
[2021-07-07 10:26:38.962 19705M]  -> Unknown DNS queries: 2
[2021-07-07 10:26:38.962 19705M]  -> Unique domains: 1149
[2021-07-07 10:26:38.962 19705M]  -> Unique clients: 12
[2021-07-07 10:26:38.962 19705M]  -> Known forward destinations: 1
[2021-07-07 10:26:38.962 19705M] Successfully accessed setupVars.conf
[2021-07-07 10:26:38.963 19705M] listening on 0.0.0.0 port 53
[2021-07-07 10:26:38.963 19705M] listening on :: port 53
[2021-07-07 10:26:38.967 19707M] PID of FTL process: 19707
[2021-07-07 10:26:38.967 19707/T19708] Listening on port 4711 for incoming IPv4 telnet connections
[2021-07-07 10:26:38.968 19707M] INFO: FTL is running as user pihole (UID 999)
[2021-07-07 10:26:38.968 19707/T19709] Listening on port 4711 for incoming IPv6 telnet connections
[2021-07-07 10:26:38.968 19707M] Reloading DNS cache
[2021-07-07 10:26:38.968 19707/T19710] Listening on Unix socket
[2021-07-07 10:26:38.969 19707M] Blocking status is enabled
[2021-07-07 10:26:40.040 19707/T19711] Compiled 0 whitelist and 8 blacklist regex filters for 12 clients in 51.2 msec

and pihole.log shows this:

Jul  7 10:26:40 dnsmasq[19707]: config 10.6.0.2 is NXDOMAIN
Jul  7 10:26:40 dnsmasq[19707]: config 10.6.0.2 is NXDOMAIN

Please upload a debug log and post just the token that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

https://tricorder.pi-hole.net/5f5w7jd4jl

Do you have Pi-hole configured to listen on all interfaces?

*** [ DIAGNOSING ]: Networking
[โœ“] IPv4 address(es) bound to the eth0 interface:
   192.168.224.30/27 matches the IP found in /etc/pihole/setupVars.conf

    PIHOLE_INTERFACE=eth0
    IPV4_ADDRESS=192.168.224.30/27

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[โœ“] ad25.checkm8.com is 0.0.0.0 on lo (127.0.0.1)
[โœ“] ad25.checkm8.com is 0.0.0.0 on eth0 (192.168.224.30)
[โœ—] Failed to resolve ad25.checkm8.com on wg0 (10.6.0.1)

The ethernet connectivity seems to work fine, but making the jump to the wg interface is failing.

yes, it's configured to listen on all interfaces

Ok. Then something else is not allowing traffic on the wg interface.

don't know of this is something of interest

 2021-07-07 12:21:41: (mod_fastcgi.c.421) FastCGI-stderr: PHP Notice:  Undefined variable: piHoleInterface in /var/www/html/admin/settings.php on line 861
   2021-07-07 13:22:25: (mod_fastcgi.c.421) FastCGI-stderr: PHP Notice:  Undefined variable: piHoleInterface in /var/www/html/admin/settings.php on line 861
   2021-07-07 13:22:33: (mod_fastcgi.c.421) FastCGI-stderr: PHP Notice:  Undefined variable: piHoleInterface in /var/www/html/admin/settings.php on line 861

I am also able to reproduce this and discovered it the other day, but wasn't really sure how to report it since it's a separate software package. I just happened to notice that stuff wasn't working while I was on the road.

Just to make sure: This topic is related to Pi-hole's beta test.
Are you testing the beta version as well?

Hi Bucking_Horn ,

just to pick you up. YES this topic is about current beta,



    Pi-hole vDev (release/v5.4, v5.3.1-49-ga52a5e7e)
    Web Interface vDev (release/v5.6, v5.5-44-g4e1f7c2)
    FTL vDev (release/v5.9, vDev-00c44c5)


What we spotted thus far is that PiVPN/Wireguard isn't resolving .... while IP addresses work, DNS names don't. Reverting back to the pi-hole master branch is the current fix.

That includes (using current beta) VPN is establishing connection perfectly and is able to query via IP BUT is not able to resolve any DNS. Neither Pihole nor pihole-FTL or debug logs were giving any good advice (up til now) rather then WG0 (wireguard[PiVPN]) is failing and this remedies network, gateway etc. for being badly configured or what somehow.

As the only constant which was subject to a change, was checking out above mentioned beta releases (which not seem to work [proven by different OPS]) and reverting back to pi-hole master branch (which instantly makes it work again) is the issue, we're trying to figure out where this is coming from.

1 Like

My question was directed at squawkingvfr.
I've added some quotes for context.

Sorry, yes. I was testing the latest beta releases. I have two Pi-Hole servers. I have since rolled the one with PiVPN on it back to the master branch and PiVPN now works.

I don't think this is an issue as there are more lines like these in your debug log:

   Jul  7 00:00:03 dnsmasq[2130]: query[PTR] 1.0.6.10.in-addr.arpa from 127.0.0.1
   Jul  7 00:00:03 dnsmasq[2130]: config 10.6.0.1 is NXDOMAIN

I do run the beta with Wireguard (installed natively not through an external tool) and do not see any issues so we have to find out what is special with the PiVPN configuration.

Reading your posts, it immediately seems to affect your PiVPN-connected devices. Can you give me some lines from /var/log/pihole.log when this happens? I expect to see error messages there. Or is

really anything that showed up in there? If so, we have to find out why your Pi-hole isn't used any more for name resolution. There is no change in this beta that comes to my mind right now when looking at your issue.

@dmile said PiVPN/WireGuard. @bungh0l10 @squawkingvfr do you also use Wireguard or do you use another VPN type?

Hi DL6ER,

after you mentioned there hasn't something changed in regard to such an issue I tried un- and re-install PiVPN(wireguard) moving back and forth beta/master and going with this tut https://docs.pi-hole.net/guides/vpn/wireguard/server/ as well (which is quite nice ;))
I still wasn't able to reach anything DNS through VPN.
As I was trying I read the last point of the tut (Set your Pi-hole to listen on all interfaces) and I verified, yes the setting was definitely there. I switched to listen only on interface, saved and reverted back to listen on all interfaces and saved. Boom everything working fine :slight_smile:
Maybe dmile and squawkingvfr could try this as well and see if that helps.

Thanks!

It would be nice if you could generate and upload a debug log before and after you tried this. Just in case there is any config change really happening in Pi-hole.

Sorry I wasn't able to reply yesterday. Yes, I'm using WireGuard with PiVPN.

Logs as requested...

  1. Updated to beta release, with the behavior described in this thread. Listening on all interfaces is configured just like bungh0l10 had.

  2. After configuring it to only listen on eth0

  3. After switching it back to listen on all interfaces and it starts working again, as bungh0l10 discovered

Hope this helps!

Your third link doesn't work, however, it will be the most important bit here.