Last active
April 27, 2022 16:54
-
-
Save nealfennimore/0f8b8a1cdfa6c47d968369120d7d64f3 to your computer and use it in GitHub Desktop.
NYU VPN Openconnect
This file contains hidden or 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
#! /usr/bin/env bash | |
if [[ -z $NYU_AUTHGROUP || -z $NYU_NETID || -z $NYU_PASSWORD || -z $NYU_2FA ]]; then | |
cat << EOF | |
One or more env varibles missing | |
\$NYU_AUTHGROUP | |
- "NYU VPN: NYU-NET Traffic Only" | |
- "NYU VPN: All Traffic" | |
\$NYU_NETID = Your given netID | |
\$NYU_PASSWORD = Password for your account | |
\$NYU_2FA | |
- "push": For Duo pushes | |
- "sms": For SMS | |
- "phone1": For phone calls | |
EOF | |
exit 1 | |
fi | |
sudo openconnect \ | |
--protocol=anyconnect \ | |
--authgroup="$NYU_AUTHGROUP" \ | |
--user="$NYU_NETID" \ | |
--form-entry main:password="$NYU_PASSWORD" \ | |
--form-entry main:secondary_password="$NYU_2FA" \ | |
vpn.nyu.edu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool. I'll take a look.