Forum Discussion

Jinks02_309221's avatar
Jinks02_309221
Icon for Nimbostratus rankNimbostratus
Dec 02, 2017

Kill Active VPN Sessions Through TMSH

Software Version 13

 

Hi,

 

As part of our working policies, I need to disconnect any VPN sessions used by a certain client group, at the end of each working day.

 

These clients use a separate access profile, and I'm able to do this by using the GUI, by navigating to Access/Overview/Active Sessions, filtering on profile name, then selecting relevant connections and hitting the "Kill Selected Sessions" button.

 

But I would like to automate this by running a script that will SSH to the F5 BigIP and run a TMSH command at a specific time. but I can't seem to find the TMSH command that will actually kill the session. I have tried the following,

 

delete sys connection cs-server-addr ip-address-of-the-vpn-vs

 

but the client disconnects and reconnects immediately, where as when I use the GUI this does not happen.

 

I have also tried enabling MCP logging to try and capture the command sent but the log just states

 

Session deleted due to admin initiated termination .

 

Does anyone know what command is sent to the F5 BigIP by the GUI when the "Kill Selected Session" button is pressed.

 

Thanks In Anticipation,

 

Jinks