Source IP incorrect on multi homed systems

Nico Schottelius nico.schottelius at
Sat Feb 18 22:34:59 UTC 2023

Hello Omkhar,

I tend to disagree. The problem is not the routing, but the selected
source address, which is independent of routing. To be more specific: as
there is BGP routing on all all interfaces, is an
accepted IP address on any interface.

Best regards,


Omkhar Arasaratnam <omkhar at> writes:

> This looks like an asymmetric routing issue from what you’re describing, not a wireguard issue.
> You may want to look into policy based routing to address it.
> On Sat, Feb 18, 2023 at 15:54 Nico Schottelius <nico.schottelius at> wrote:
>  Dear group,
>  I was wondering how wireguard [Linux kernel] or wireguard-go [FreeBSD]
>  are supposed to decide which IP address to use for replying?
>  I have seen both on FreeBSD and Linux that wireguard seems to use the IP
>  address of the outgoing interface, i.e. the one with the route returning
>  to the sender. However in multi homed situations, this can be wrong,
>  let's take this example:
>        19:57:24.607526 net1  In  IP > UDP, length 148
>        19:57:24.608358 net2  Out IP > UDP, length 92
>  The initiator sends from to the receiver
>  Wireguard then replies with the source IP of instead of
>  As the node is multi homed, the packet might leave through any of its
>  uplinks and thus return with a random (unexpected) IP address and will
>  not pass NAT rules on firewalls and finally be dropped. F.i. in above
>  example the firewall drops the packet from, because there
>  is no session entry for that.
>  I have observed this behaviour both on Linux 6.1.11 as well as
>  wireguard-go 0.0.20220316_8,1 on FreeBSD and in both cases the
>  connection will break depending on which active interface is taken as
>  exit.
>  I would argue that wireguard should by default invert the IP
>  addresses, i.e. switch dst=src, src=dst and then reply with that,
>  instead of adapting an interface specific address, or is there a good
>  reason for the current behaviour?
>  Best regards,
>  Nico
>  --
>  Sustainable and modern Infrastructures by

Sustainable and modern Infrastructures by

More information about the WireGuard mailing list