From: Benjamin Mako Hill Date: Wed, 19 Apr 2023 17:05:30 +0000 (-0700) Subject: Merge branch 'master' of code.communitydata.science:nu-vpn-proxy into cdsc X-Git-Url: https://code.communitydata.science/nu-vpn-proxy.git/commitdiff_plain/bd194355a4608d6b74c22e6f06e39827de3be384?hp=4b02c05b544927f4669c6d98fac1124080c93df2 Merge branch 'master' of code.communitydata.science:nu-vpn-proxy into cdsc --- diff --git a/README-CDSC b/README-CDSC index 6f9d436..ac72f96 100644 --- a/README-CDSC +++ b/README-CDSC @@ -6,7 +6,11 @@ Install prerequisites. This will include: -sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-webkit2-4.0 openconnect ocproxy + sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-webkit2-4.0 openconnect ocproxy + +Also, note that you'll need at least version 8 of openconnect. If you're not sure what you've got, run: + + openconnect --version 2. diff --git a/hipreport-modified.sh b/hipreport-modified.sh index 5f280de..2253596 100755 --- a/hipreport-modified.sh +++ b/hipreport-modified.sh @@ -53,7 +53,7 @@ MONTH=$(date +'%m') YEAR=$(date +'%Y') # This value may need to be extracted from the official HIP report, if a made-up value is not accepted. -HOSTID="deadbeef-dead-beef-dead-beefdeadbeef" +HOSTID="D52047CC-33AF-11B2-A85C-89044BD0C4D8" cat < $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}" + + diff --git a/openconnect_command-ssh.sh b/openconnect_command-ssh.sh index 09f2181..daa1bc0 100755 --- a/openconnect_command-ssh.sh +++ b/openconnect_command-ssh.sh @@ -11,5 +11,5 @@ cd ~/bin/nu-vpn-proxy ## do the authentication eval $( ./gp-saml-gui.py -v --clientos=Linux vpn-connect2.northwestern.edu ) -echo "$COOKIE" | 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}" +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}" diff --git a/start-http-vpn-proxy b/start-http-vpn-proxy new file mode 100755 index 0000000..f947b8e --- /dev/null +++ b/start-http-vpn-proxy @@ -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" + + diff --git a/stop-http-vpn-proxy b/stop-http-vpn-proxy new file mode 100755 index 0000000..ede7b25 --- /dev/null +++ b/stop-http-vpn-proxy @@ -0,0 +1,3 @@ +#!/bin/bash + +/sbin/start-stop-daemon --stop --pidfile /tmp/nu-vpn-openconnect_http.pid