micahmo / WgServerforWindows

Wg Server for Windows (WS4W) is a desktop application that allows running and managing a WireGuard server endpoint on Windows
MIT License
943 stars 92 forks source link

Clients can ping server but can't ping each other #134

Closed Rexedead closed 1 year ago

Rexedead commented 1 year ago

Hello! Sorry for new issue, but have no idea, what i m doing wrong. I have a trouble with connection from client to client. No problem with client-server and server-client. Tried to google it, but 90% answers for linux and routing problem.

What i m tried: ✅check NAT on server side: enabled ✅Every client\server network private (checked with Get-NetConnectionProfile -NetworkCategory 'Public') ✅Edited WS4W\clients_data, WS4W\server_wg - as i have no ideas, added /24 to my clients into AllowedIPs ✅Disable firewall on clients ✅My clients has 10.5.0.0/24 as AllowedIPs in wireguard peer options

Little diagramm, how my network looks: wg drawio Sure, i have routers between server and two clients, but in my case, looks it doesnt matter (will update shema if need)

client 1 config:

[Interface] PrivateKey = xxx Address = 10.5.0.2 DNS = 8.8.8.8, 1.1.1.1

[Peer] PublicKey = xxx PresharedKey = xxx AllowedIPs = 10.5.0.0/24 Endpoint = x.x.x.x:51820

client 2 config:

[Interface] Address=10.5.0.7 DNS=8.8.8.8,1.1.1.1 PrivateKey=xxx

[Peer] Endpoint=x.x.x.x:51820 AllowedIPs=10.5.0.0/24 PublicKey=xxx

Do i need edit some configs? or maybe check something else?

micahmo commented 1 year ago

Hi @Rexedead, thanks for the detailed report. I can reproduce this on my end as well. This scenario works fine with WireGuard on a Linux system, so once again, we most likely have to blame the routing on Windows (and specifically the lack of control, in contrast to iptables).

As a test, I used Internet Connection Sharing instead of NAT, and that actually seemed to solve the problem for me. Could you give that a shot?

Rexedead commented 1 year ago

@micahmo Tried Internet Connection Sharing and for me it's also works fine Thanks for reply and support👍