Development discussion of WireGuard
 help / color / mirror / Atom feed
* odd behaviour for PSK with wg syncconf
@ 2022-04-07  8:07 Simon Lindhorst
  0 siblings, 0 replies; only message in thread
From: Simon Lindhorst @ 2022-04-07  8:07 UTC (permalink / raw)
  To: wireguard

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-22  0:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  8:07 odd behaviour for PSK with wg syncconf Simon Lindhorst

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).