]> code.communitydata.science - nu-vpn-proxy.git/commitdiff
Merge branch 'master' of code.communitydata.science:nu-vpn-proxy into cdsc
authorBenjamin Mako Hill <mako@atdot.cc>
Wed, 19 Apr 2023 17:05:30 +0000 (10:05 -0700)
committerBenjamin Mako Hill <mako@atdot.cc>
Wed, 19 Apr 2023 17:05:30 +0000 (10:05 -0700)
README-CDSC
hipreport-modified.sh
openconnect_command-http.sh [new file with mode: 0755]
openconnect_command-ssh.sh
start-http-vpn-proxy [new file with mode: 0755]
stop-http-vpn-proxy [new file with mode: 0755]

index 6f9d436586c52a13a5fec04c7790a13b2746b5a9..ac72f96fd3e4d96134591337cf920dd861fc154f 100644 (file)
@@ -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.
 
index 5f280de83c9c57d9b303061193007cfdec7cff50..2253596f2b7d1e9a3f7f630da68f7a7863cd78c2 100755 (executable)
@@ -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 <<EOF
 
diff --git a/openconnect_command-http.sh b/openconnect_command-http.sh
new file mode 100755 (executable)
index 0000000..0c519c6
--- /dev/null
@@ -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}"
+
+
index 09f21811507a73e2c410fbbaa7a1979164ce4136..daa1bc095612878daa6ed0bfddfc10aee940e2a9 100755 (executable)
@@ -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 (executable)
index 0000000..f947b8e
--- /dev/null
@@ -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 (executable)
index 0000000..ede7b25
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash 
+
+/sbin/start-stop-daemon --stop --pidfile /tmp/nu-vpn-openconnect_http.pid

Community Data Science Collective || Want to submit a patch?