GL-AX1800 after reboot VPN-wireguard does not work

Hi community, I'm facing a silly issue, I set a cronjob for rebooting the router each early morning, as I have the VPN client (wireguard) always on, managed by "policy on the client device" (by MAC); all devices selected to use the VPN don't get the VPN network until I reset (switch on/off) the VPN.

I tried by the following command:

/usr/sbin/dnsmasq -C /etc/dnsmasq.conf.vpn -x /var/run/dnsmasq/dnsmasq.v

But as you know from the GUI it does not get the notification that the service is up and it does not show it. So by the command above it's not a good solution.

I got the latest upgrade version on my GL-AX1800.

Hello,

  1. What is your VPN provider (or VPN server)?

  2. Please confirm whether the VPN Profile is invalid and needs to be reconnected manually to reconnect to the VPN server? Since probably the server IP has changed per day.

  3. Try to load this VPN profile on the PC "WireGuard" APP and connected to the VPN server to observe if it works over 1 day.

Hello,

  1. SurfShark
  2. VPN profile is valid no need any manual re-connection. But the only thing I remember now it's my Public IP provided by my ISP change by each restart....ummm but it may not related.
  3. Yes the profile provided Surfshark works as expected.

There is any option to set a kind of crontab restart for the Wireguard VPN ?

If setting a crontab to restart the WireGuard client, it seems to be a workaround method to avoid the issue, but we would rather understand the reason why it disconnects to solve this issue.

add on crontab: 0 */5 * * * /sbin/ifup wgclient, restart the "wgclient" interface every 5 hours.

When reconnection occurs, please export and share syslog to us.

In addition, is the ISP modem network normal when the VPN connection is abnormal?
For example ping www.google.com or ping VPN server IP/domain name on router SSH to check it out