Skip to content

A developer work from home tool for connecting to your company's VPN using Cisco's AnyConnect Tool

Notifications You must be signed in to change notification settings

ableinc/anyconnectvpncli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Cisco's AnyConnect VPN CLI Tool

Developer Work From Home Tool!

AnyConnect is a VPN tool that many organizations use for their work computers. If you're like me and hate the process of waiting for the application to open, grabbing a security code (not required for everyone), waiting for the network to establish and blah blah blah, this tool can do all that from the command line.

How it works

Using a bash script with your credentials pre-filled, it will use AnyConnect's built-in CLI tool to connect to your company's VPN. You can modify this as you please.

Configuration (PLEASE READ FIRST)

If you do not want your password stored on your machine:

  1. Please uncomment lines 4 & 5, then comment line 7 & 8.

If you do not require a security code to login:

  1. Please comment out lines 3 & 9 and uncomment line 10.

Make sure to change "[YOUR-VPN-HOST-NO-BRACKETS]" to your VPN host on line 10.

How To Use

Run in your terminal:

sh vpn.sh

That's it!

Not sure you VPN host?

Run this command in your terminal:

sh vpn.sh

Then type "hosts" when prompted. From there you'll get a list of available hosts. Please refer to the Configuration section above for implementation.

Changelog

v1.0.2

Your password must now be base64 encoded. This is done for security reasons, so that your password isn't sitting on your system in plain text. You can determine your the base64 string for your password by running this on your linux/unix system:

echo 'YOUR-PASSWORD-HERE' | base64

v1.0.1

Issue: Variable strings with "%" character.

Reason: printf is a shell built into Bash, similar to C printf(). printf uses special characters for string formatting. When a string contains a "%", that is not being used for formatting purposes, the printf command does not know how to handle it. Thus, requiring a specific format to instantiate the variable string.

Fix: Use the printf FORMAT [ARGUMENT] structure. i.e print "%s" $variable

v1.0.0

Initial release.

Add script to your PATH?

This Stackoverflow post will guide you step by step: Add bash script to PATH

Want to collaborate?

If you want to collaborate on a code project, please send me an email (click me)

About

A developer work from home tool for connecting to your company's VPN using Cisco's AnyConnect Tool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages