Project

vpn

0.0
No commit activity in last 3 years
No release in over 3 years
Lets you set up one or more vpn configurations, then connect via `vpn up` and `vpn down`.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 10.0
~> 3.3
~> 0.10
 Project Readme

vpn

Gem Version Build Status

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

Usage

$ 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).

Installation

  1. Install openconnect. On OS X you can use homebrew:
$ brew install openconnect
  1. Install the vpn script, 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.

History

  • 0.2.1 - Fix so it runs when installed as a gem
  • 0.2.0 - Add vpn status
  • 0.1.0 - Initial release

Last but not least...

Comments, suggestions, and pull requests are all welcome!