Skip to content
Snippets Groups Projects
Commit 05064513 authored by nam1n15's avatar nam1n15
Browse files

a shell with university vpn, for e.g. inspecting DNS / UDP things

yeah it breaks all the other connections; not ideal
parent b14a543e
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
set -eu
# caveats: breaks existing vpn connection
echo First enter credentials for globalprotect.soton.ac.uk
read -p 'Username: ' username
read -s -p 'Password: ' password
vpn_connection() {
csd_wrapper="--csd-wrapper /usr/libexec/openconnect/hipreport.sh" # fedora
user="--user $username"
pass="--passwd-on-stdin"
echo $password | openconnect --script-tun --script "vpnns --attach" --protocol=gp $csd_wrapper globalprotect.soton.ac.uk $user $pass
}
vpn_connection &
vpnns -- bash
echo Connection OK?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment