Sunday, February 15, 2015

Two scripts for the Cisco VPN Client

I recently wrote a post about using openconnect instead of the Cisco VPN Client on Linux. If you really want to use the Cisco VPN Client but miss the handy vpnc and vpnd commands, this article is just for you.
It uses the expect tool from Don Libes, who wrote it in 1990 when he was working for the U.S. government. Therefore, Expect is in the public domain.

Before executing the commands and modifying the script, you should run /opt/cisco/anyconnect/bin/vpn to understand what is going on. The script tries to mimic a user waiting for the console to print things, and then type on the keyboard.

Here's your vpnc script:



And here is vpnd:

No comments:

Post a Comment