Wireguard-go VS Wireguard-kernel plugin

Started by RamSense, August 02, 2023, 07:00:13 AM

Previous topic - Next topic
I have been running wireguard-go for quite some time with no problems at all. I use it as always on, on our mobile devices like the iPhones (iOs) (everywhere using dns/adguard home).

Now I have been trying to use the wireguard-kernel version. At first it works flawlessly. But after some time (after the mobile device / iphone have not been used for some time / 10 mins, and start using again) the vpn connection is still there, but there is no data, no internet data. Seems like the tunnel stalls..

I found out that when configuring Endpoints - Keepalive Interval set at 25, the wireguard-kernel keeps working (just like the go version).

Now I wonder, why is it I have to add a keepalive in the kernel version? Is this a bug? The go version has, i think, the default setting of Keepalive Interval = 0, but i can not enter 0 in the endpoint config.

If the only solution is using a Keepalive Interval, what is the best interval setting to use? e.g. 25 or other number?

Others having this issue also? Thanks for the help!
Deciso DEC850v2

Using wg kmod for a longer time now, I have no such issues on Android devices, keepalive is not configured.

But I have a similiar issue on Windows. However, I cannot say if this is since kmod and the problem only occurs when connection is established on WAN IPv6, not when established on LTE IPv4. I assume this is a v6 connectivity issue on client side as connection then cannot be re-established for a while, but I will give it a try with setting keepalive.
i am not an expert... just trying to help...

thanks for the reply and testing. I have both ipv4 and ipv6 configured. I have not checked if it is only ipv6.
I think it is both because I notice it back at home (on wifi with wireguard on) also and there I see the device connected to wireguard ipv4. Never saw this with the go version.

Interested to hear about your testing results.

Deciso DEC850v2

Since I have configured PersistentKeepalive = 25 on Windows the problem did not occur again...
But as said, I am not sure if the problem occured since I changed to kmod.

However, I will stay with this setting :)
i am not an expert... just trying to help...

Thank you for testing also. My WireGuard stays up and running with KeepAlive 25. I did some google search and found more mentions of this 25 setting, but maybe other values are possible. I Don't know what the best practice is, but I will keep 25 for now.
Deciso DEC850v2

There is a bug which is causing the connection to timeout and be closed and that is why the keepalive 25 is required.

I'm not sure what the status of it is as I haven't looked into this in quite some time.

CJ thanks for the info and confirmation that the 25 is the way to go for now.
Deciso DEC850v2

I have not had luck with any of the suggestions above to fix the issue on Android.

I did not have this issue while running 23.1 (and prior releases) with Wireguard-go but If I installed Wireguard-kernel I did have the issue. Since upgrading to 23.7, I get the issue whether I use Wireguard-go or Wireguard-Kernel. I will probably start another thread if there isn't one already.