wg-quick feature request: excluding the server if it is in AllowedIPs

Alexander E. Patrakov patrakov at gmail.com
Thu Jan 16 12:57:25 CET 2020


Hello.

Let me explain the use case: we have two networks, x.y.z.0/24 and
172.31.0.0/16, that the staff is supposed to access via a VPN.
However, the VPN server is x.y.z.5 (i.e. in the first network), so
this doesn't work on the client side because of a routing loop:

Endpoint = x.y.z.5:port
AllowedIPs = x.y.z.0/24, 172.31.0.0/16

We had to resort to this:

AllowedIPs = 172.31.0.0/16, x.y.z.128/25, x.y.z.64/26, x.y.z.32/27,
x.y.z.16/28, x.y.z.8/29, x.y.z.0/30, x.y.z.6/31, x.y.z.4/32

Ideally, we should not do this. I believe this is a bug, caused by a
wrong condition in the wg-quick script. Indeed, the special handling
that involves a separate routing table and a firewall mark is
triggered by an attempt to add a default route, while, in my opinion,
it should be triggered by having the VPN server IP covered by one of
the AllowedIPs entries. Could you please fix this?

-- 
Alexander E. Patrakov


More information about the WireGuard mailing list