Wireguard connection drops during the night

I have a GL-AR300M-Ext set up as a Wireguard server and a GL-AR750S-Ext as a client. It works great in every other way except that the connection drops at night. The server stays online but the client drops its connection to it. The connection is restored after I boot the client and it stays connected just fine until the night. Seems like it only drops after there’s no active data being transferred anymore (after we go to sleep). There’s no problems with the internet connection in either end, so that’s not it.

What to do?

Do you have periodic keep-alive enabled? That might be a short-term solution until you find the root cause (WireGuard generally shouldn’t “drop”.)

The first thing I would look at are the clocks of the two devices. Do you have NTP running on both of them? WireGuard requires “monotonically increasing” time (or it will consider the “back-dated” packet invalid).

1 Like

Are you using repeater?

Thank you very much for the reply! Keep-alive was enabled, but for some reason NTP wasn’t running on the client. Is there any reason why it should turn off by itself or did I somehow forget to turn it on?

The client is connected to a VDSL modem router

NTP is generally started as a service at boot time, if enabled. You should be able to see if it is enabled in LuCI (“Advanced” settings), or by examining /etc/config/system and the symlinks in /etc/rc.d/ Enabling it in LuCI is perhaps the easiest approach.

So just to make sure if I understand completely, here’s what I did today: I checked out the client’s Time Zone. It had a YELLOW light with a warning. I enabled it from the Time Zone setting. Then I checked the Advanced Settings and NTP Client was enabled there. Could it be that me enabling the Time Zone also turned on the NTP Client and it wasn’t on before? Or are those two settings not connected?

It’s possible, and hopefully will resolve the problem.

(I generally edit the “raw” config directly, so I’m not familiar with the GUI and its indications.)