This is a wrapper to help you start and stop your macOS VPN connections from the command line.
The easiest method is via homebrew
:
$ brew tap jonhiggs/homebrew-osxvpncli
$ brew install osxvpncli
$ osxvpncli --help
Alternatively you can just clone the git repository to your local system:
$ git clone https://github.com/jonhiggs/homebrew-osxvpncli.git <my_path>
$ <my_path>/osxvpncli --help
Before you can do anything, you must first create the VPN connections that you wish to manipulate though System Preferences -> Network
.
If you would like working tab-completion, you can use the completion script in bash_completion.d/osxvpncli
. If you're not sure how to use bash_completion scripts, take a look at this blog post.
Usage:
osxvpncli [OPTION] [vpn_name]
Options:
connect <vpn_name> Establish a new connection
disconnect [vpn_name] Terminate established connections
status [vpn_name] Show connection status
- Renamed
vpn
toosxvpncli
to avoid being overly rude with namespace. - Document installation with
homebrew
.
- Disconnect all if connection isn't supplied. #issue 5
- Remove support for OS X Yosemite.
- Refactor for simpler code