?
Solved

Cisco AnyConnect VPN

Posted on 2014-09-24
5
Medium Priority
?
638 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 70

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 70

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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

OpenVPN is a great open source VPN server that is capable of providing quick and easy VPN access to your network on the cheap.  By default the software is configured to allow open access to your network.  But what if you want to restrict users to on…
There’s a movement in Information Technology (IT), and while it’s hard to define, it is gaining momentum. Some call it “stream-lined IT;” others call it “thin-model IT.”
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…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
Suggested Courses

801 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