Development discussion of WireGuard
 help / color / mirror / Atom feed
* separate allowedips from routing for multipath
@ 2021-12-09 15:36 Arvid Picciani
  2021-12-10 23:29 ` Reid Rankin
  0 siblings, 1 reply; 3+ messages in thread
From: Arvid Picciani @ 2021-12-09 15:36 UTC (permalink / raw)
  To: wireguard

Hey,

i'm considering using wireguard for a system where there can be
multiple routes to an ip.

The nearest solution i can think of is constantly changing the peer
AllowedIps from userspace and load a large list of routes into it. But
the challenge is that this is used for both routing decisions AND
policy decisions.

let's say we have 3 machines A1, A2, B and a machine that moves around V

V is currently connected via layer2 at A1,
B has V in AllowedIps for peer A1, so that any packet for V is routed to A1

now we connect V to A2 instead
we need to move the AllowedIps entry from A1 to A2 so that a packet
for V is routed to A2
old packets still arriving FROM V through A1 are now dropped

This wouldnt be an issue if AllowedIps could be separated from the
routing decision somehow.

I could have a wg interface per peer so i can do the routing using
regular linux tools, but wg doesnt like reusing the same port for
multiple wg endpoints. We'll eventually run out of ports.

I suppose port reuse is intentionally not allowed?

thanks
Arvid

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: separate allowedips from routing for multipath
  2021-12-09 15:36 separate allowedips from routing for multipath Arvid Picciani
@ 2021-12-10 23:29 ` Reid Rankin
  2021-12-11  7:28   ` Arvid Picciani
  0 siblings, 1 reply; 3+ messages in thread
From: Reid Rankin @ 2021-12-10 23:29 UTC (permalink / raw)
  To: Arvid Picciani; +Cc: WireGuard mailing list

WireGuard doesn't care what address V has, because peers are defined
by their public key. If V switches from A1 to A2, upon receiving a
handshake packet from V's key from the address A2, B will start
sending packets for V out to A2. Incoming packets can arrive from any
IP; if they're from a connection with V, V's AllowedIP rules will be
applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: separate allowedips from routing for multipath
  2021-12-10 23:29 ` Reid Rankin
@ 2021-12-11  7:28   ` Arvid Picciani
  0 siblings, 0 replies; 3+ messages in thread
From: Arvid Picciani @ 2021-12-11  7:28 UTC (permalink / raw)
  To: Reid Rankin; +Cc: WireGuard mailing list

Thanks Reid,

i'm aware of how that works, but that's not the question.
V is an IP routed on A1 or A2, not a "road warrior" case.

I can look into if port reuse is possible if a patchset doing that
would be acceptable.

On Sat, Dec 11, 2021 at 12:30 AM Reid Rankin <reidrankin@gmail.com> wrote:
>
> WireGuard doesn't care what address V has, because peers are defined
> by their public key. If V switches from A1 to A2, upon receiving a
> handshake packet from V's key from the address A2, B will start
> sending packets for V out to A2. Incoming packets can arrive from any
> IP; if they're from a connection with V, V's AllowedIP rules will be
> applied.



-- 
+4916093821054

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-11  7:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 15:36 separate allowedips from routing for multipath Arvid Picciani
2021-12-10 23:29 ` Reid Rankin
2021-12-11  7:28   ` Arvid Picciani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).