Skip to content

Instantly share code, notes, and snippets.

@enplotz
Created August 12, 2016 17:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enplotz/1ed77e4bd1b94801966940f12b27ff27 to your computer and use it in GitHub Desktop.
Save enplotz/1ed77e4bd1b94801966940f12b27ff27 to your computer and use it in GitHub Desktop.
VPN Uni Konstanz without Cisco AnyConnect

VPN Uni Konstanz without Cisco AnyConnect

Dependencies:

  • homebrew
  • openconnect
  • tuntap
  • shell access and sudo

Installation

brew update
brew install openconnect
brew cask install Caskroom/cask/tuntap # needs sudo b/c of kernel extension

Usage

sudo openconnect --user=firstname.lastname vpn.uni-konstanz.de

You will be asked interactively for your password.

If you want to connect without sudo, you can edit your sudoers file accordingly. Open the file using

sudo visudo -f /etc/sudoers

and add the line

%admin  ALL=(ALL) NOPASSWD: /usr/local/bin/openconnect

If you want to script the connection, you can supply the password on stdin:

cat passwd.file | sudo openconnect --user=firstname.lastname --passwd-on-stdin vpn.uni-konstanz.de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment