database64128 / swgp-go

🐉 Simple WireGuard proxy with minimal overhead for WireGuard traffic.
GNU Affero General Public License v3.0
224 stars 23 forks source link

Question about MTU #26

Closed HirbodBehnam closed 1 year ago

HirbodBehnam commented 1 year ago

Hello Thanks for the project! I do have a small question about MTU. My MTU values are like this:

My server is Ubuntu 22 and my PC is Windows 10. I also use the zero overhead mode.

I'd be glad if you could help me. Thanks

database64128 commented 1 year ago

Are you sure your home Internet's MTU is 1500? Some residential ISPs use PPPoE for authentication, which reduces the effective MTU to 1492.

HirbodBehnam commented 1 year ago

Maybe I tried reducing swgp-go's (client and server) MTU to 1492 and this time there are logs both in my server and client.

2022-11-18T08:59:13.871Z WARN service/server_linux.go:608 Packet from wgConn discarded {"server": "server", "proxyListen": ":Y", "clientAddress": "[X]:20086", "wgAddress": "127.0.0.1:Y", "packetLength": 1430, "error": "the packet is larger than the supplied buffer"}

Should I reduce my server's MTU as well?

database64128 commented 1 year ago

Yes, you also need to lower your wg tunnel's MTU to 1408.

HirbodBehnam commented 1 year ago

Thanks!