Solved

Cisco AnyConnect VPN

Posted on 2014-09-24
5
579 Views
Last Modified: 2014-10-18
Is there a way to setup Cisco AnyConnect to connect automatically for laptop users?
0
Comment
Question by:officertango
  • 3
  • 2
5 Comments
 
LVL 69

Expert Comment

by:Qlemo
ID: 40344654
The only way I got Cisco AnyConnect VPN (SSL) to run automated is by using a PowerShell (or VBS) script.
Add-Type -Assembly System.Windows.Forms

Push-Location "$env:ProgramFiles\Cisco\Cisco AnyConnect Secure Mobility Client"
Start-Service vpnagent | Out-Null
Start-Process 'vpncli.exe' -ArgumentList 'connect vpn.YourGatewayi.com'
sleep 3
'YourRealm', 'YourUser','YourPassword', 'y' | % { sleep -m 100;  [Windows.Forms.SendKeys]::SendWait("$_{ENTER}") }
<# Following line are not required, if you want to keep the connection always-on #>
while (.\vpncli.exe status | Select-String 'Connecting') { Write-Host -NoNewline '.' }
Read-Host 'Return to stop VPN ...' | Out-Null
.\vpncli.exe disconnect
Stop-Service vpnagent | Out-Null

Open in new window

Put a link with
  Powershell -File C:\PathToFile\File.ps1
into AutoStart of the user, and that should be it.

Note that most Admins don't like such a file on a laptop moving all around, because you have the connection information in plain text - not much of security here if someone not authorized gets access to the laptop.
0
 

Author Comment

by:officertango
ID: 40344670
you are right, it is not very secured.
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 40344684
If you just use a link like this:
"%ProgramFiles%\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe" connect vpn.YourGatewayi.com

Open in new window

all the login info needs to be typed in by the user - that might be a better idea.
0
 

Accepted Solution

by:
officertango earned 0 total points
ID: 40377544
FYI,
I got it to work by integrating LDAP with Cisco Any Connect. The vpn client will authenticate when it sees itself not on the network.
0
 

Author Closing Comment

by:officertango
ID: 40388578
na
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Server 2012 L2TP VPN Windows client to server 3 28
Review of OCA certificate policy 1 29
Cisco  3750E switches 1 28
Creating a new VRF on Cisco Nexus 5596UP 8 38
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question