Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7619

Troubleshooting • Wireguard VPN (client) and DNS resolution failing

$
0
0
I've done a fresh installation of Bookworm, installed WireGuard on my Pi3. Initially, it failed to bring up the VPN due to a DNS resolution failure. Fixed by installing another package. Now it works, but I can't resolve DNS.

I also have this same VPN configured in WireGuard on my phone and can connect and resolve addresses fine from there so it's not the VPN at fault.

Any ideas?

Bringing up the VPN initially...

Code:

me@pi:~ $ wg-quick up wg0[#] ip link add wg0 type wireguard[#] wg setconf wg0 /dev/fd/63[#] ip -4 address add 10.13.13.4 dev wg0[#] ip link set mtu 1420 up dev wg0[#] resolvconf -a wg0 -m 0 -x/usr/bin/wg-quick: line 32: resolvconf: command not found[#] ip link delete dev wg0
Fixed this with installing a package

Code:

me@pi:~ $ sudo apt install openresolvReading package lists... DoneBuilding dependency tree... DoneReading state information... DoneThe following NEW packages will be installed:  openresolv0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.Need to get 24.7 kB of archives.After this operation, 104 kB of additional disk space will be used.Get:1 http://deb.debian.org/debian bookworm/main arm64 openresolv all 3.12.0-3 [24.7 kB]Fetched 24.7 kB in 0s (109 kB/s)      Selecting previously unselected package openresolv.(Reading database ... 149630 files and directories currently installed.)Preparing to unpack .../openresolv_3.12.0-3_all.deb ...Unpacking openresolv (3.12.0-3) ...Setting up openresolv (3.12.0-3) ...Processing triggers for man-db (2.11.2-2) ...me@pi:~ $ wg-quick up wg0[#] ip link add wg0 type wireguard[#] wg setconf wg0 /dev/fd/63[#] ip -4 address add 10.13.13.4 dev wg0[#] ip link set mtu 1420 up dev wg0[#] resolvconf -a wg0 -m 0 -x[#] wg set wg0 fwmark 51820[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820[#] ip -4 rule add not fwmark 51820 table 51820[#] ip -4 rule add table main suppress_prefixlength 0[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1[#] nft -f /dev/fd/63
Fails to resolve but works when I disconnect the VPN.

Code:

me@pi:~ $ ping hotmail.comping: hotmail.com: Temporary failure in name resolutionme@pi:~ $ ping tuta.netping: tuta.net: Temporary failure in name resolutionme@pi:~ $ wg-quick down wg0[#] ip -4 rule delete table 51820[#] ip -4 rule delete table main suppress_prefixlength 0[#] ip link delete dev wg0[#] resolvconf -d wg0 -f[#] nft -f /dev/fd/63me@pi:~ $ ping tuta.netPING tuta.net (199.59.243.228) 56(84) bytes of data.64 bytes from 199.59.243.228 (199.59.243.228): icmp_seq=1 ttl=245 time=7.58 ms64 bytes from 199.59.243.228 (199.59.243.228): icmp_seq=2 ttl=245 time=7.10 ms^C--- tuta.net ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 1001msrtt min/avg/max/mdev = 7.101/7.338/7.575/0.237 ms

Statistics: Posted by Swarfega — Fri Mar 14, 2025 12:15 pm



Viewing all articles
Browse latest Browse all 7619

Trending Articles