wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: David Anderson <dave@natulte.net>
To: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: FYI: systemd's networkd (v242) incorrectly setting listen-port on wg interface
Date: Mon, 2 Sep 2019 16:25:36 -0700	[thread overview]
Message-ID: <CAMx+r7WotKwERtUbkonxg2VOWLj0Rr_FV42ai5CYaN=iO0tJfw@mail.gmail.com> (raw)
In-Reply-To: <CAMx+r7WOqTnHf0uXixM-8WO2WyyfRX=dZ1WszDnMKgy+Epfaug@mail.gmail.com>

One more correction: this only affects Debian testing and unstable.
Buster was released with systemd v241, which does not have the
regression. I got confused because I got one of my machines into a
borked state that's halfway between stable and testing, and it
included systemd v242.

- Dave

On Mon, Sep 2, 2019 at 12:42 PM David Anderson <dave@natulte.net> wrote:
>
> Seems to be known to Debian:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=936198 . I'm not
> super familiar with Debian's development process, but I _think_, from
> that bug + the systemd debian repo's state, that the fix is now
> submitted and pending upload to unstable, after which it should flow
> backwards over time into Buster.
>
> - Dave
>
> On Mon, Sep 2, 2019 at 12:26 PM David Anderson <dave@natulte.net> wrote:
> >
> > Posting here for posterity, in case someone else encounters this problem.
> >
> > In systemd v242, networkd has a bug
> > (https://github.com/systemd/systemd/issues/12377), in which it ignores
> > the `ListenPort` directive in its config files for wireguard
> > interfaces. The results is that even if you specify ListenPort=51820,
> > when you restart networkd it'll assign a random listening port to the
> > wg interface.
> >
> > This can lead to some frustrating debugging where your VPN
> > mysteriously doesn't come up, and it turns out to be because your
> > wireguard server is listening on entirely the wrong port. You fix it
> > with `wg set wg0 listen-port 51820` after networkd has started.
> >
> > Because of systemd's "no patch releases" release cycle, this seems to
> > have been broken since 11 Apr for any distro using an unmodified v242
> > systemd. I discovered this on Debian Buster (the newest "stable").
> > Looks like the fix was pulled into at least NixOS and Gentoo, not sure
> > about other distros. v243 has the fix, and should be releasing Any
> > Time Now.
> >
> > I'm going to file a Debian bug to request a backport of this patch,
> > since I'm guessing they're not going to be upgrading systemd routinely
> > on the stable track. Hopefully it won't bite too many people though,
> > since networkd isn't the default for network configuration on Buster
> > (I'm just an enthusiastic early adopter).
> >
> > - Dave
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

      parent reply	other threads:[~2019-09-02 23:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 19:26 FYI: systemd's networkd (v242) incorrectly setting listen-port on wg interface David Anderson
2019-09-02 19:42 ` David Anderson
2019-09-02 22:41   ` Georg Faerber
2019-09-02 22:46     ` David Anderson
2019-09-02 22:51       ` Georg Faerber
2019-09-02 23:25   ` David Anderson [this message]

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='CAMx+r7WotKwERtUbkonxg2VOWLj0Rr_FV42ai5CYaN=iO0tJfw@mail.gmail.com' \
    --to=dave@natulte.net \
    --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).