From: coot@coot.me
To: "wireguard@lists.zx2c4.com" <wireguard@lists.zx2c4.com>
Subject: WireGuard invalid MAC
Date: Sun, 25 Sep 2022 11:20:08 +0000 [thread overview]
Message-ID: <tc_RJxAHLCkuwnH-zzqG_kRpINdKQPkHV2EcHxd9Hvg35zKUqTjSD1enVM8UAEBeURm-4aBHxJEadNfVqn7ZRxyV2BAKrarPa5cL_hKhpB4=@coot.me> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1329 bytes --]
Hello,
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:
```
[Interface]
Address = 10.0.0.3/24
ListenPort = 5000
PrivateKey = <client_private_key>
[Peer]
PublicKey = <server_pubic_key>
AllowedIPs = 10.0.0.1/32
Endpoint = <dynamic domain name>:5000
```
Server config:
```
[Interface]
Address = 10.0.0.1/24
ListenPort = 5000
PrivateKey = <server_private_key>
[Peer]
PublicKey = <client_public_key>
AllowedIPs = 10.0.0.3/32
```
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).
Regards,
Marcin
[-- 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:
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='tc_RJxAHLCkuwnH-zzqG_kRpINdKQPkHV2EcHxd9Hvg35zKUqTjSD1enVM8UAEBeURm-4aBHxJEadNfVqn7ZRxyV2BAKrarPa5cL_hKhpB4=@coot.me' \
--to=coot@coot.me \
--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).