-
-
Save antonengelhardt/c920a42a1fb8ce9e9f301b57da3b8c59 to your computer and use it in GitHub Desktop.
Connect to WWU VPN using openconnect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
# This script is used to connect to the WWU VPN. It is meant to be used with a | |
# keyboard shortcut. Change the Constants before running the script. | |
USER=<put-your-wwu-id-here> | |
PASSWORD=<put-your-wlan-netzzugangspasswort-here> | |
OTP_CODE=$(oathtool --totp <put-your-base-16-keimwert-here-get-it-from-wwu-it-portal> | |
VPN_HOST=vpn.uni-muenster.de | |
# use openconnect to connect to the VPN | |
if pgrep openconnect > /dev/null | |
then | |
echo "Disconnecting from VPN..." | |
sudo killall openconnect | |
else | |
echo "Connecting to VPN..." | |
{ echo ${USER}; echo ${PASSWORD}; echo ${OTP_CODE}; } | sudo openconnect -b -q ${VPN_HOST} | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The script is now being maintained here