vpn
A shell command for making vpn connections. It's a convenience wrapper around openconnect, in which you set up a configuration file with connection details, then just "vpn up" to connect.
Usage
$ vpn up [site]
$ vpn down
$ vpn reset # if your lan connection glitches
The script will prompt for your vpn password on the site as well as for the sudo password on your machine (if needed).
Installation
- Install openconnect. On OS X you can use homebrew:
$ brew install openconnect
- Install the
vpnscript, by either:
$ gem install vpn
or
- Download the script from here and put it somewhere in your PATH.
Configuration
Create a config file ~/.vpn, which is a YAML file containing one or more "site" entries of the form:
mycompany:
server: vpn.mycompany.com
usergroup: OTP
user: mylogin
Each entry must specify a server. All other fields get passed as options to openconnect -- see $ man openconnect to find out what they are. Options that don't take values can be specified using the value true.
