How to disconnect from OpenConnect VPN
Mike Gilbert
floppymaster at gmail.com
Tue Aug 22 13:11:01 PDT 2023
On Tue, Aug 22, 2023 at 10:20 AM David Nelson <dave at collaboration.cafe> wrote:
>
> Hello,
>
> First of all, thank you for your work on OpenConnect VPN.
>
> I can successfully connect to my OpenConnect server using the
> openconnect client on Ubuntu 22.04.
>
> But how can I disconnect? I don't see anything in the help obtained via
> openconnect --help
>
> Googling only informed me that I could simply kill the openconnect
> client process.
>
> Is there a more-civilized way of doing it from the command line, please?
openconnect shuts down gracefully when it receives SIGINT or SIGTERM.
This is documented in the openconnect.8 man page.
SIGNALS
In the data phase of the connection, the following signals are handled:
SIGINT / SIGTERM
performs a clean shutdown by logging the session off, discon‐
necting from the gateway, and running the vpnc-script to restore
the network configuration.
SIGHUP disconnects from the gateway and runs the vpnc-script, but does
not log the session off; this allows for reconnection later us‐
ing --cookie.
SIGUSR1
writes progress message with detailed connection information and
statistics.
SIGUSR2
forces an immediate disconnection and reconnection; this can be
used to quickly recover from LAN IP address changes.
More information about the openconnect-devel
mailing list