gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.4k stars 547 forks source link

Windows Netclient v16.1 not working after upgrade from v16.0 Linuxs clients working fine[Bug]: #1695

Closed MatthewReed303 closed 1 year ago

MatthewReed303 commented 1 year ago

Contact Details

No response

What happened?

I have just upgraded my server to v16.1 and I can no longer get any windows clients to work. All my Linux clients work fine after the upgrade. I have fully uninstalled the old clients and install the new v16.1 msi I think the error is setting the wireguard mtu and metric and then wireguard just shuts down.

[netclient.exe] 2022-10-28 11:25:49 netclient.exe is in proper location, C:\Program Files (x86)\Netclient\netclient.exe 
2022/10/28 11:25:49 Gravitl Netclient on Windows started
[netclient.exe] 2022-10-28 11:26:50 joining mr at api.netmaker.iot.mydomain.com:443
[netclient.exe] 2022-10-28 11:26:50 network: mr node DESKTOP-WW is using port 51821
[netclient.exe] 2022-10-28 11:26:50 starting wireguard
file does not exist
2022-10-28 11:26:57.784: [TUN] [nm-mr] Starting WireGuard/0.5.3 (Windows 10.0.19044; amd64)
2022-10-28 11:26:57.784: [TUN] [nm-mr] Watching network interfaces
2022-10-28 11:26:57.806: [TUN] [nm-mr] Resolving DNS names
2022-10-28 11:26:57.806: [TUN] [nm-mr] Creating network adapter
2022-10-28 11:26:58.067: [TUN] [nm-mr] Using existing driver 0.10
2022-10-28 11:26:58.073: [TUN] [nm-mr] Creating adapter
2022-10-28 11:26:58.235: [TUN] [nm-mr] Using WireGuardNT/0.10
2022-10-28 11:26:58.235: [TUN] [nm-mr] Enabling firewall rules
2022-10-28 11:26:58.194: [TUN] [nm-mr] Interface created
2022-10-28 11:26:58.242: [TUN] [nm-mr] Dropping privileges
2022-10-28 11:26:58.242: [TUN] [nm-mr] Setting interface configuration
2022-10-28 11:26:58.243: [TUN] [nm-mr] Peer 1 created
2022-10-28 11:26:58.243: [TUN] [nm-mr] Peer 2 created
2022-10-28 11:26:58.243: [TUN] [nm-mr] Peer 3 created
2022-10-28 11:26:58.245: [TUN] [nm-mr] Setting device v4 addresses
2022-10-28 11:26:58.244: [TUN] [nm-mr] Sending keepalive packet to peer 1 (IPADDRESS:51821)
2022-10-28 11:26:58.244: [TUN] [nm-mr] Sending handshake initiation to peer 1 (IPADDRESS:51821)
2022-10-28 11:26:58.244: [TUN] [nm-mr] Sending keepalive packet to peer 2 (IPADDRESS:51821)
2022-10-28 11:26:58.244: [TUN] [nm-mr] Sending keepalive packet to peer 3 (IPADDRESS:51821)
2022-10-28 11:26:58.244: [TUN] [nm-mr] Sending handshake initiation to peer 2 (IPADDRESS:51821)
2022-10-28 11:26:58.244: [TUN] [nm-mr] Sending handshake initiation to peer 3 (IPADDRESS:51821)
2022-10-28 11:26:58.245: [TUN] [nm-mr] Interface up
2022-10-28 11:26:58.287: [TUN] [nm-mr] Setting device v6 addresses
2022-10-28 11:26:58.288: [TUN] [nm-mr] Unable to configure adapter network settings: unable to set metric and MTU: The parameter is incorrect.
2022-10-28 11:26:58.306: [TUN] [nm-mr] Receiving handshake response from peer 1 (IPADDRESS:51821)
2022-10-28 11:26:58.306: [TUN] [nm-mr] Keypair 1 created for peer 1
2022-10-28 11:26:58.306: [TUN] [nm-mr] Invalid handshake response from IPADDRESS:51821
2022-10-28 11:26:58.428: [TUN] [nm-mr] Shutting down

Note I have changed/blanked the network names and IP address

I have also done a fresh reinstall of wireguard. I'm having same issue on 3x windows machines

UPDATE: After creating some test networks and adjusting MTU below 1280 the windows netclients fail. I don't know if this is a bug or intended.

I have adjusted all my existing networks back to 1280 MTU and now my windows netclients can connect.

Version

v0.16.1

What OS are you using?

Windows

Relevant log output

No response

Contributing guidelines

afeiszli commented 1 year ago

@theguy951357 please test

theguy951357 commented 1 year ago

Will do

theguy951357 commented 1 year ago

I was unable to recreate the issue when upgrading windows from 0.16.0->0.16.1. It looks like though from the update posted that the MTU was the culprit. Windows can get picky about MTUs