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.
Requires ruby version >= 2.1.0
$ vpn up [site]
$ vpn down
$ vpn reset # if your lan connection glitches
$ vpn status # tells you if vpn is up or down
The script will prompt for your vpn password on the site as well as for the sudo password on your machine (if needed).
- Install openconnect. On OS X you can use homebrew:
$ brew install openconnect
- Install the
vpn
script, by either:
$ gem install vpn
or
- Download the script from here and put it somewhere in your PATH.
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
.
- 0.2.1 - Fix so it runs when installed as a gem
- 0.2.0 - Add
vpn status
- 0.1.0 - Initial release
Comments, suggestions, and pull requests are all welcome!