Skip to content

Instantly share code, notes, and snippets.

@BlkPingu
Last active May 14, 2020 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BlkPingu/b52f6ad4a87c8119520bbb24c2585a95 to your computer and use it in GitHub Desktop.
Save BlkPingu/b52f6ad4a87c8119520bbb24c2585a95 to your computer and use it in GitHub Desktop.
Connect to HTW Berlin VPN via cisco CLI
#!/bin/bash
arg1=$1
# 0) HTW-SSL-Split
# 1) HTW-SSL-VPN-Full
# 2) HTW-SSL-VPN-Split
group=2
username=sXXXXXX@htw-berlin.de
password=secret!
#known hosts:
# - SSL-VPNCL-HTW
host=SSL-VPNCL-HTW
if [ "$arg1" == "-c" ]
then printf "$group\n$username\n$password" | /opt/cisco/anyconnect/bin/vpn -s connect $host
elif [ "$arg1" == "-dc" ];
then /opt/cisco/anyconnect/bin/vpn -s disconnect
else
printf "give args pls: \n[c] - connect to htw-vpn \n[dc] - disconnect from htw-vpn"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment