Solved

Cisco AnyConnect VPN

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

Expert Comment

by:Qlemo
Comment Utility
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
Comment Utility
you are right, it is not very secured.
0
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
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
Comment Utility
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
Comment Utility
na
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article will cover setting up redundant ISPs for outbound connectivity on an ASA 5510 (although the same should work on the 5520s and up as well).  It’s important to note that this covers outbound connectivity only.  The ASA does not have built…
Let’s list some of the technologies that enable smooth teleworking. 
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now