Ask Your Question

Revision history [back]

Yes, there are several scripts available for OpenConnect that can automatically connect or reconnect. Some examples of these scripts are:

  1. openconnect-autoconnect: This is a bash script that runs OpenConnect and automatically reconnects if the VPN connection drops. It uses the ping command to check the VPN connection status and reconnects if the ping fails.

  2. AutoConnect-OpenConnect: This is a Python script that monitors the VPN connection status and automatically reconnects if the connection drops. It can be configured to run as a daemon and has options to set the frequency of checks and the timeout for reconnection.

  3. openconnect-keepalive: This is a bash script that uses the --ping and --ping-timeout options in OpenConnect to keep the VPN connection alive and automatically reconnects if it drops. It can be run as a background process and has options to set the ping interval and timeout.

These scripts can be customized to suit specific needs and can be run as cron jobs or system services to ensure continuous VPN connectivity.