05-24-2021 03:50 AM - edited 05-24-2021 03:51 AM
Hello Guys,
So I am looking for a way to terminate all AnyConnect sessions on my Cisco ASA at 7pm everyday. How can I achieve this please?
Patiently awaiting your response.
Thank you!
05-24-2021 04:00 AM
@Jesutofunmi O You can achieve this using an EEM script, here is the syntax:-
The ASA does not have a way to set a hard cut off time for VPN sessions. However you do this with EEM. This example demonstrates how to dicsonnect both VPN Clients and Anyconnect Clients at 5:00 PM
event manager applet VPN-Disconnect
event timer absolute time 17:00:00
action 1 cli command "vpn-sessiondb logoff ra-ikev1-ipsec noconfirm"
action 2 cli command "vpn-sessiondb logoff anyconnect noconfirm"
output none
05-24-2021 04:32 AM
Hello Rob,
Thanks for responding.
I only wish to disconnect AnyConnect clients but have other tunnels up. I guess I'll just exclude the line below:
action 1 cli command "vpn-sessiondb logoff ra-ikev1-ipsec noconfirm"
05-24-2021 04:35 AM
@Jesutofunmi O Yes, just omit that first action. That example guide is old, so it's unlikely you'll have any ra-ikev1-ipsec clients.
05-25-2021 01:20 AM
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: