Solved

Cisco AnyConnect VPN

Posted on 2014-09-24
5
589 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

Surfing Is Meant To Be Done Outdoors

Featuring its rugged IP67 compliant exterior and delivering broad, fast, and reliable Wi-Fi coverage, the AP322 is the ideal solution for the outdoors. Manage this AP with either a Firebox as a gateway controller, or with the Wi-Fi Cloud for an expanded set of management features

Question has a verified solution.

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

Some of you may have heard that SonicWALL has finally released an app for iOS devices giving us long awaited connectivity for our iPhone's, iPod's, and iPad's. This guide is just a quick rundown on how to get up and running quickly using the app. …
For months I had no idea how to 'discover' the IP address of the other end of a link (without asking someone who knows), and it drove me batty. Think about it. You can't use Cisco Discovery Protocol (CDP) because it's not implemented on the ASAs.…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…

749 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