Page 1 of 1

Openconnect restarts permanently

Posted: Tue Mar 09, 2021 4:42 pm
by rorus
Hello,
I found a weird issue of the Openconnect block in the app.
On the server Haproxy serves openconnect backends (which are on different locations). When I connect to it via the app everything looks OK. However my device Xiaomi after sleep and awakened restarts the app's Openconnect and I see another IP4 and IP6. The option "Autorestart" has been checked both, in the device "Battery saving options" the "VPN Client Pro" is not restricted at all. I wonder what is wrong? At the same time Openvpn block works properly and does't restart after device's sleep/awaiking.
Thank you/

Re: Openconnect restarts permanently

Posted: Tue Mar 09, 2021 6:08 pm
by admin
Hello,

please, can you post the VPN log?

Here the steps to get the log:
  • tap on VPN profile name
  • tap on LOG tab
  • tap on top right icon with 3 dots
  • tap on "Export log"

Re: Openconnect restarts permanently

Posted: Thu Mar 11, 2021 10:26 am
by admin
From the log you sent me, it appears that the connection is closed on the server side.
Most likely you are using the ocserv server. This server by default closes VPN connections if they are idle for 300 seconds.
If so, the problem can be solved by changing the idle-timeout option in the server configuration

Re: Openconnect restarts permanently

Posted: Wed Mar 17, 2021 9:27 pm
by rorus
Yes, thank you very much.
In the ocserv.conf config it's necessary to add options:
idle-timeout = 86400
mobile-idle-timeout = 86400