bug: wg-quick fails to set up working connection

Christoph Anton Mitterer calestyo at scientia.org
Mon Sep 21 22:29:27 UTC 2026


Hey.


When taking a config provided for example via eduVPN:
[Interface]
PrivateKey = ***
MTU = 1320
Address = 10.153.38.15/24,2001:4ca0:4fff:2:3::f/96
DNS =
10.156.33.53,129.187.5.1,2001:4ca0::53:1,2001:4ca0::53:2,lmu.de,uni-
muenchen.de,mwn.de

[Peer]
PublicKey = ***
PresharedKey = ***
AllowedIPs =
10.0.0.0/8,85.208.24.0/22,129.187.0.0/16,131.159.0.0/16,132.199.106.6/3
1,138.244.0.0/15,138.246.0.0/16,141.39.128.0/18,141.39.240.0/20,141.40.
0.0/16,141.84.0.0/16,172.16.0.0/12,192.54.42.0/24,192.55.197.0/24,192.6
8.211.0/24,192.68.212.0/24,192.168.0.0/16,193.174.96.0/23,194.94.155.22
4/28,2001:4ca0::/29,2a09:80c0::/29
Endpoint = eduvpn-n13.srv.lrz.de:51820



starting it via:
# wg-quick up ./wg.conf
[#] ip link add dev wg type wireguard
[#] wg addconf wg /dev/fd/63
[#] ip -4 address add 10.153.38.15/24 dev wg
[#] ip -6 address add 2001:4ca0:4fff:2:3::f/96 dev wg
[#] ip link set mtu 1320 up dev wg
[#] resolvconf -a tun.wg -m 0 -x
[#] ip -4 route add 132.199.106.6/31 dev wg
[#] ip -6 route add 2a09:80c0::/29 dev wg
[#] ip -6 route add 2001:4ca0::/29 dev wg
[#] ip -4 route add 194.94.155.224/28 dev wg
[#] ip -4 route add 192.68.212.0/24 dev wg
[#] ip -4 route add 192.68.211.0/24 dev wg
[#] ip -4 route add 192.55.197.0/24 dev wg
[#] ip -4 route add 192.54.42.0/24 dev wg
[#] ip -4 route add 193.174.96.0/23 dev wg
[#] ip -4 route add 85.208.24.0/22 dev wg
[#] ip -4 route add 141.39.240.0/20 dev wg
[#] ip -4 route add 141.39.128.0/18 dev wg
[#] ip -4 route add 192.168.0.0/16 dev wg
[#] ip -4 route add 141.84.0.0/16 dev wg
[#] ip -4 route add 141.40.0.0/16 dev wg
[#] ip -4 route add 138.246.0.0/16 dev wg
[#] ip -4 route add 131.159.0.0/16 dev wg
[#] ip -4 route add 129.187.0.0/16 dev wg
[#] ip -4 route add 138.244.0.0/15 dev wg
[#] ip -4 route add 172.16.0.0/12 dev wg
[#] ip -4 route add 10.0.0.0/8 dev wg

leads to a dead connection.

The reason apparently being often the endpoint named in provided WG
configs is part of the AllowedIPs and thus nothing actually goes
through.

eduvpn-n13.srv.lrz.de.	273	IN	A	129.187.7.162
eduvpn-n13.srv.lrz.de.	273	IN	AAAA	2001:4ca0:0:123::81bb:7a2

If I  manually subtract the two endpoint IPs from the AllowedIPs, the
very same config gives a working connection.


Given that the Endpoints are allowed to use hostnames and thus things
like round robin DNS, it doesn't feel as if the configs should be
provided already excluding the (current) endpoint IP, but rather that
it should be wg-quick who does this somehow.


Cheers,
Chris.


More information about the WireGuard mailing list