Development discussion of WireGuard
 help / color / mirror / Atom feed
To: "" <>
Subject: WireGuard invalid MAC
Date: Sun, 25 Sep 2022 11:20:08 +0000	[thread overview]
Message-ID: <> (raw)

[-- Attachment #1.1: Type: text/plain, Size: 1329 bytes --]


I configured wireguard so I can access my home server from a laptop.

When the laptop is using its eth0 interface to transport wireguard protocol messages it works fine, but when I switch it off and use wlan0 (which is using a different ISP), on the server side the kernel logs:

Keypair 20 destroyed for peer 2
Keypair 21 created for peer 2
Invalid MAC of handshake, dropping packet from ...

I am using a ddns to setup the endpoint on the laptop.  It's not a connection issue, as packets are reaching the server, but somehow the message authentication code (MAC) is not right after switching the interfaces.  Any clues how could I investigate this further?

Client config:
Address =
ListenPort = 5000
PrivateKey = <client_private_key>

PublicKey = <server_pubic_key>
AllowedIPs =
Endpoint = <dynamic domain name>:5000

Server config:
Address =
ListenPort = 5000
PrivateKey = <server_private_key>

PublicKey = <client_public_key>
AllowedIPs =

When the laptop is using wlan0, the server receives a packet `Handshake Initiation`, which is not replied.  When the laptop is using eth0 it just sends messages of type `Transport Data` (both observed with a tcpdump).


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

                 reply	other threads:[~2022-09-28 10:35 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:

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

  git send-email \
    --in-reply-to='' \ \ \

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