Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripting anyconnect

Status
Not open for further replies.

Billz66

Technical User
Feb 21, 2010
2,070
1
38
AU
We provide support for multiple sites and our access is via Cisco anyconnect [version 4.1.02011]and the older cisco vpn client [5.0.07.0440]

on the old client all is great - we create profiles for each site and can easily select the one we want to connect to.
with anyconnect we cant do that and are manually changing the vpn address ( sometimes the vpn group and manually entering the username and password.

I have found some suggestions for scripting , basically a batch file that runs the vpngui and passes in a text file containing the vpn address username and password.

"C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe" -s<site.dat


where site.dat contains
connect 222.222.222.222
username
password​

I am building a very simple visual basic front end that will allow the selection of a site and a connect and disconnect button.

each selection will result in the running of the batch and the passing in of the data.

this is working for most of our connections that use the default vpn group.

One of the sites uses a vpn group that needs to be specified (not the default)

is there a way to pass the vpn group name into the vpncli using the same site.dat file ?

If I never did anything I'd never done before , I'd never do anything.....

 
I found it

if the site has a certificate issue, the dat file needs to be
connect 222.222.222.222
y
username
password


if the site uses a differnt group , you need the group number and then the dat file needs to be
connect 222.222.222.222
2
username
password


If I never did anything I'd never done before , I'd never do anything.....

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top