Unresponsive Internet After a few Time

Hello,

I am using GL.iNet GL-AR300M16 router, installed OpenWRT and I'd like to use it as a travel router with VPN connection. I have installed and configured OpenVPN. I'm activating VPN and it works, after some time (less than 24 hrs) while VPN connection is alive, there is no internet at all. When I disconnect and reconnect VPN connection, internet works back.

How can I fix this problem?

asked your VPN provider if they terminate connections after 24h ?

as for how to fix it, use https://openwrt.org/docs/guide-user/base-system/hotplug to trigger a reconnect.

Yes I have asked, we have reviewed with the customer service, all setup is in accordance with their guidelines. Moreover I was connected via PC for days with no disconnection.

From the log, I see
TCP: connect to [AF_INET]87.xxx.xx.xx.xx:443 failed: Operation timed out

What is interesting, while there is no Internet, the VPN connection is still alive. When I manually disconnect and reconnect to VPN, the Internet is back on. So I'm not sure how to trigger a reconnect.

I assume that's the VPN endpoint ?

run a continuous ping toward the IP, see if it stops to respond when there's a time out.

Yes the VPN endpoint.
But on the web interface I see that still it is connected while there is no internet

web interface of what ? the router ?

Yes the router. It shows connected, but there is no internet activity. The Internet comes back after disconnecting and reconnecting to the VPN manually from the list in OpenVPN.

Did you try to ping the endpoint when the issue occurs? What was the result?

From Diagnostics menu, I have tried, no ping or traceroute. 100% loss.

Some things you can add to the openvpn client config:

keepalive 10 120  	#check if provider does not pushes ping-exit, that takes precedence and you have to use a watchdog
resolv-retry infinite
reneg-sec 0  	#slightly unsafe to use so not recommended

But in the end you might need a watchdog to restart the VPN

WireGuard seems more resilient to these disconnections so I would advise WireGuard also for easier setup and much more (often three times more than OpenVPN) speed

1 Like

In the end I restored the latest stock firmware. So far everything works as expected after 12 hours. I'll be monitoring.