WireGuard does not work with windows client

Started by johnsen_, March 31, 2023, 01:52:55 PM

Previous topic - Next topic
Hi,

I have set up WireGuard on my OPNsense.
My iOS clients, e.g. my IPad establish a VPN connection without any problems.

I am having trouble setting up my Windows PC.
The Windows client sends data, but does not receive any. The handshake fails. I have also disabled the Windows firewall.
I don't understand why the Windows client can't establish a VPN connection and would be very grateful if you could help me!

(My OPNsense is located behind a FritzBox)
(I tested the VPN on my PC using my phone's hotspot.)

Here is my configuration of WireGuard on the OPNsense and the Windows Client:


FritzBox Port enable:
OPNsense -> Port 55840 (IPv4)

OPNsense
WAN:
Protocol: IPv4/UDP
Source: *
Port: *
Destination: WAN address
Port: 55840
Gatway: *


WireGuard-Interface:
Protocol: IPv4 TCP/UDP
Source: 10.10.10.12
Port: *
Destination: 192.168.220.10
Port: 80
Gatway: *


WireGuard local configuration:
Enabled: yes
Public Key: %KEY1%
Listen Port: 55840
Tunnel Address: 10.10.10.1/24
Peers: Ipad, PC


WireGuard endpoint configuration (PC):
Enabled: yes
Public Key: %KEY2%
Allowed IPs: 10.10.10.12/32


WireGuard PC configuration:
(Public Key == %KEY2%)

[Interface]
PrivateKey = xxxxxxxxxxx
Address = 10.10.10.12/32
//(also attempted)//DNS = 8.8.8.8, 8.8.4.4
//(also attempted)//MTU = 1372

[Peer]
PublicKey = %KEY1%
AllowedIPs = 192.168.220.0/24
Endpoint = domain:51840


Check your ports... Endpoint is other than set in sense.
i am not an expert... just trying to help...

Thanks for the reply and thanks a lot for checking my config. I have done the same thing "1000 times" and compared it with the config of the ios devices, but as it is sometimes, you still miss the error.

Now it also works with my windows client. Thank you!!! :)

To be honest:
Viewing multiple parameters containing multiple numbers can be confusing, often experienced myself, above all in WG configs...
i am not an expert... just trying to help...