Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Szymon Nowak <szymonn841@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: Fwd: Wireguard Windows version two bugs
Date: Mon, 2 Jan 2023 12:11:20 +0100	[thread overview]
Message-ID: <CA+hy6dvwsERL3igVSZ49zqZbUHZjWo2LS7VBhbNzqOx3iD7LCw@mail.gmail.com> (raw)
In-Reply-To: <CA+hy6dtf2k=JcbU=XL8U2AEze4iFvgN=gjCizE-pT3U+Xqxbcg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

I found two Wireguard problems under Windows and am looking for help

First problem
When you generate a key, its first character is „\”  or  „+”
then the peer configuration does not work properly and you cannot
connect to such configured client

Exampe
C:\Program Files\WireGuard>wg genpsk
+RFmc+cEztZ/XcNquWvUJdNqlVfYWB3fM7bVCDaUOV4=

[Peer]
PublicKey = vruCee8G/DSwxotMHfhYQu8hcDEyi6uX4XEjT4FDxDc=
PresharedKey = +RFmc+cEztZ/XcNquWvUJdNqlVfYWB3fM7bVCDaUOV4=

All the peers below stop working

Second problem

The Wireguard network IP address registers itself in DNS all the time
and ignores the setting that it should not register the connection in
DNS. This is a big problem on a Windows domain controller, because
then clients from the LAN side can't connect because the server is
constantly reporting from Wireguard's IP.

I set RegisterThisConnectionsAddress to false
powershell.exe -command "Get-NetAdapter peer_server  | Set-DnsClient
-RegisterThisConnectionsAddress $false"

I set the metric high so that interfacet is not the main connection
powershell.exe -command "Set-NetIPInterface -InterfaceAlias
peer_server -InterfaceMetric 5000"


peer.conf (on Domian controler )
[Interface]
Address = 10.20.0.1/24
ListenPort = 51820
PrivateKey = WKUBw36Y8f04Ke6dgaXVUJPWYXcF5E2IIDUvQ+omX2Q=
PostUp = powershell.exe -command "Get-NetAdapter peer_server  |
Set-DnsClient -RegisterThisConnectionsAddress $false ;
Set-NetIPInterface -InterfaceAlias peer_server -InterfaceMetric 5000"


Despite these settings, Wireguard still registers its address with the
DNS server

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 45958 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 7988 bytes --]

[-- Attachment #4: image.png --]
[-- Type: image/png, Size: 12175 bytes --]

           reply	other threads:[~2023-01-02 23:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CA+hy6dtf2k=JcbU=XL8U2AEze4iFvgN=gjCizE-pT3U+Xqxbcg@mail.gmail.com>]

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=CA+hy6dvwsERL3igVSZ49zqZbUHZjWo2LS7VBhbNzqOx3iD7LCw@mail.gmail.com \
    --to=szymonn841@gmail.com \
    --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).