All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Lindhorst <s.lindhorst@wut.de>
To: wireguard@lists.zx2c4.com
Subject: odd behaviour for PSK with wg syncconf
Date: Thu, 7 Apr 2022 10:07:27 +0200	[thread overview]
Message-ID: <03fa1a4e-1693-0016-73eb-49bf9bdc7615@wut.de> (raw)

Hi,

I tried a little bit around with PresharedKeys an found an odd behaviour 
when I use /wg syncconf/ instead of /wg setconf./

My config:

    /[Interface]//
    //PrivateKey = yGKbadTuMvT6JWven0yh8tJMFMCnpYoDizueu4K9QF0=//
    //Listenport = 4444//
    //
    //[Peer]//
    //PublicKey = Ts7VwZt8Q2QB5fTydQEfTgqfz1u4WIL6YMQKlMKZ6E8=//
    //AllowedIPs = 10.10.10.2,192.168.10.0/24,192.168.0.0/24//
    //PresharedKey=oipUDdsUPj1lYZMSN2jdx66OSvARhRpso2GD1frE3xo=/

/wg setconf /leads to:

    //root # wg showconf wg0
    [Interface]
    ListenPort = 4444
    PrivateKey = yGKbadTuMvT6JWven0yh8tJMFMCnpYoDizueu4K9QF0=

    [Peer]
    PublicKey = Ts7VwZt8Q2QB5fTydQEfTgqfz1u4WIL6YMQKlMKZ6E8=
    PresharedKey = oipUDdsUPj1lYZMSN2jdx66OSvARhRpso2GD1frE3xo=
    AllowedIPs = 10.10.10.2/32, 192.168.10.0/24, 192.168.0.0/24
    Endpoint = 10.40.28.51:37842/

When I comment out the PresharedKey and do

    //root # wg syncconf wg0 "/etc/vpn/wg0.conf"/

I get

    //root # wg showconf wg0//
    //[Interface]//
    //ListenPort = 4444//
    //PrivateKey = yGKbadTuMvT6JWven0yh8tJMFMCnpYoDizueu4K9QF0=//
    //
    //[Peer]//
    //PublicKey = Ts7VwZt8Q2QB5fTydQEfTgqfz1u4WIL6YMQKlMKZ6E8=//
    //PresharedKey = oipUDdsUPj1lYZMSN2jdx66OSvARhRpso2GD1frE3xo=//
    //AllowedIPs = 10.10.10.2/32, 192.168.10.0/24, 192.168.0.0/24//
    //Endpoint = 10.40.28.51:37842/

The PSK entry is always there. But when I change the PSK in the config 
file the PSK entry is correctly changed in /wg showconf/ output after 
call /wg syncconf/.

Is there a reason for this behaviour?


Kind regards

S.

-- Unsere Aussagen koennen Irrtuemer und Missverstaendnisse enthalten.
Bitte pruefen Sie die Aussagen fuer Ihren Fall, bevor Sie Entscheidungen 
auf Grundlage dieser Aussagen treffen.
Wiesemann & Theis GmbH, Porschestr. 12, D-42279 Wuppertal
Geschaeftsfuehrer: Dipl.-Ing. Ruediger Theis
Registergericht: Amtsgericht Wuppertal, HRB 6377 
Infos zum Datenschutz: https://www.wut.de/datenschutz
Tel. +49-202/2680-0, Fax +49-202/2680-265, https://www.wut.de

                 reply	other threads:[~2022-04-22  0:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=03fa1a4e-1693-0016-73eb-49bf9bdc7615@wut.de \
    --to=s.lindhorst@wut.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.