wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Reid Rankin <reidrankin@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Derrick Lyndon Pallas <derrick@pallas.us>,
	WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Interest in adding multicast support to Wireguard?
Date: Mon, 21 Sep 2020 11:04:26 -0400	[thread overview]
Message-ID: <CAMaqUZ2B3H1Fa3=TFh6_PoV_Thz4javkKFHyeGPpdsma_GC0QQ@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9rU3AhppjN+6OM8vYHHbpK1Fxj2chVCCyHQBL-XvKk2uA@mail.gmail.com>

I looked at this a while back. As far as I could tell, there's nothing
fundamental about the protocol or the security model that prevents it
from happening; conceptually, it's as simple as overlapping AllowedIP
ranges. This is easy for incoming traffic, but outgoing traffic is
more difficult; each outgoing packet would need to be duplicated and
encrypted separately for each target peer. What's more, each of these
duplicate unicast packets would have to be queued separately because
each peer may be in a different handshake state.

None of this makes multicast over WireGuard impossible, however, just
difficult to fit into the existing implementation. I've toyed with the
idea of a one-interface-per-peer setup with bridging or some fancy
netfilter stuff to handle duplication and dispatch between them, but
it seems like it would be a PITA so I've never taken it farther.

As far as "special" multicast ranges, heck no. One of the fundamental
assurances of WG is that you'll only ever receive packets from a peer
which have a source address listed in that peer's AllowedIPs. If you
want to put ff00::/8 and 224.0.0.0/4 in a peer's AllowedIPs, by all
means, but I'm strongly against WG itself having any special notion of
what a "multicast address" is or any special handling -- or sneaky
emergent properties -- for them. DHCPv6, for example, requires only
ff02::1:2; if that's what you want, I probably wouldn't whitelist a
whole /8 to get it. YMMV, of course, but that should be the user's
choice and responsibility.

Another reason not to treat certain address ranges specially is that
there's more use cases for what would effectively be a "link-layer"
multicast than there are for IP multicast. You could have something
like port mirroring going on; say you've got a gateway with ::/0 as
well as an IDS with the same range. Both could receive the same
traffic, which could be useful in some applications. Obviously, you'd
need to realize the security implications -- both client-side (sending
copies of all your traffic) and IDS-side (trusting that you'll really
be sent copies of all the traffic) -- but flexibility is good, and I
can imagine some usecases (especially embedded systems) where that
would be a desirable property. (Sure beats sending the traffic in the
clear and having the IDS -- and whoever's hacked your switch -- get it
that way.)

--Reid

On Mon, Sep 21, 2020 at 7:27 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> We've discussed this extensively and repeatedly. I made a few
> proposals a few years ago that we discussed. It doesn't fit into
> WireGuard's strong binding model.
>
> Jason

  reply	other threads:[~2020-09-21 15:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21  7:13 Interest in adding multicast support to Wireguard? Derrick Lyndon Pallas
2020-09-21  9:57 ` Toke Høiland-Jørgensen
2020-09-21 15:16   ` Derrick Lyndon Pallas
2020-09-21 11:17 ` AW: " Florian Werner
2020-09-21 15:16   ` Derrick Lyndon Pallas
2020-09-21 11:24 ` Jason A. Donenfeld
2020-09-21 15:04   ` Reid Rankin [this message]
2020-09-21 15:16     ` Derrick Lyndon Pallas
2020-09-22 18:54       ` Derrick Lyndon Pallas
2020-09-22 19:38         ` Reid Rankin
2020-09-22 20:26           ` Derrick Lyndon Pallas
2020-09-21 15:17   ` Derrick Lyndon Pallas
2020-09-27 17:50 ` Derek Fawcus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMaqUZ2B3H1Fa3=TFh6_PoV_Thz4javkKFHyeGPpdsma_GC0QQ@mail.gmail.com' \
    --to=reidrankin@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=derrick@pallas.us \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).