17
0
nu-vpn-proxy/openconnect_command-ssh.sh
Benjamin Mako Hill 2970f2c702 updated to new version fo gp-saml-gui and new api
Apparently new versions of GP hav changed the SAML API some. The
openconnect command now requires --gateway so this has been added.

I haven't tested the general and http scripts but I assume they
work. Someone else should verify.
2023-06-28 12:42:28 -07:00

17 lines
587 B
Bash
Executable File

#!/bin/bash -x
OS="linux"
LOG_FILE=/tmp/nu-globalprotect-saml.log
PID_FILE=/tmp/nu-vpn-openconnect.pid
exec > $LOG_FILE
# change to the vpn file directory
cd ~/bin/nu-vpn-proxy
## do the authentication
eval $( ./gp-saml-gui.py -v --gateway --clientos=Linux vpn-connect2.northwestern.edu )
echo "$COOKIE" | /usr/sbin/openconnect --useragent="PAN GlobalConnect" --version-string='5.1.0-101' --protocol=gp -u "$USER" --os="$OS" --passwd-on-stdin "$HOST" --csd-wrapper="hipreport-modified.sh" --reconnect-timeout 60 --script-tun --script "ocproxy -D 9052" -b --pid-file "${PID_FILE}"