17
0

Commands to connect / disconnect from NU vpn.

This commit is contained in:
Nathan TeBlunthuis 2022-05-11 20:03:51 -07:00
parent 1bb65fdf5f
commit 94e337f5c2
3 changed files with 25 additions and 0 deletions

17
openconnect_command-http.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
LOG_FILE=/tmp/nu-globalprotect-saml.log
PID_FILE=/tmp/nu-vpn-openconnect_http.pid
exec > $LOG_FILE
# change to the vpn file directory
cd ~/bin/nu-vpn-proxy
## do the authentication
eval $( ./gp-saml-gui.py -v --clientos=Linux vpn-connect2.northwestern.edu )
echo "$COOKIE" | /usr/sbin/openconnect --verbose --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 8181 --keepalive 5 --verbose" -b --pid-file "${PID_FILE}"

5
start-http-vpn-proxy Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
/sbin/start-stop-daemon --pidfile /tmp/nu-vpn-openconnect_http.pid -S --startas "$HOME/bin/nu-vpn-proxy/openconnect_command-http.sh"

3
stop-http-vpn-proxy Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
/sbin/start-stop-daemon --stop --pidfile /tmp/nu-vpn-openconnect_http.pid