6

I've installed openconnect and after establishing a session by the command

openconnect server_address

I just can't disconnect. In the manual, it's said a SIGINT signal would safely terminate the session, but that's not the case with me. Actually, I can't disconnect it even with a SIGKILL signal. Anyone knows what should I do? Is there a way to manually disconnect it?

2 Answers2

6

If you called openconnect in the foreground then Ctrl+C interrupts the process and closes the connection. In case you started VPN in the background under the userx then you can call kill of pkill from the same userx or from the root (use sudo).
If you could not kill the process then either you had insufficient rights to do it or just misprinted the name. To check whether the process still exists use $ ps -A | grep openconnect.

luart
  • 1,020
  • 1
  • 10
  • 8
5

List all of the connections using nmcli con. The active connections will be styled in different color. In active connections, along your original connection name, you should see another connection named tun0 (or maybe something else). Type nmcli con down tun0 or if it's something else, replace tun0 with that name. It will disconnect you.