VPN Up for OpenConnect
A shell script for openconnect which allows:
- to define multiple VPN connections
- to run openconnect without entering the username and password
- to run in the background
- to authenticate with a certiftcate
BACKGROUND=true # If you don't want to run in background, so make this false
# Company VPN
export COM_NAME="My Company VPN"
export COM_HOST=vpn.mycompany.com
export COM_AUTHGROUP=developers
export COM_USER=sorin.ipate
export COM_PASSWD="MyPassword"
export COM_SERVER_CERTIFICATE="SHA1-OtherCharachters" # If you don't have server certificate so don't fill this
- Download the latest release
- Copy the
vpn-up.command
file to thebin
folder. - Update the
vpn-up.command
file with the appropiate VPN connection information as shown above. - Make an alias
alias vpn-up='~/bin/vpn-up.command'
inbash
orzsh
shell. Follow the instructions here - Run
vpn-up
to start and voilà.