summaryrefslogtreecommitdiffstats
path: root/vpn-connect
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-01-22 17:08:33 +0100
committerFlorian Pritz <bluewind@xinu.at>2017-01-22 17:08:33 +0100
commita0fef917fb9d7920a0f2588461b4dd4fe353ca54 (patch)
tree1c6d9cdc6f5f9b3efb9f172bf5fe4f4908331026 /vpn-connect
parent58bed8a88d4a6cd934f6c5579d0895150d725b41 (diff)
downloadbin-a0fef917fb9d7920a0f2588461b4dd4fe353ca54.tar.gz
bin-a0fef917fb9d7920a0f2588461b4dd4fe353ca54.tar.xz
vpn-connect: misc fixes
No idea what I did there. Fixed some time ago... Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'vpn-connect')
-rwxr-xr-xvpn-connect13
1 files changed, 8 insertions, 5 deletions
diff --git a/vpn-connect b/vpn-connect
index 80a31e6..70afefd 100755
--- a/vpn-connect
+++ b/vpn-connect
@@ -2,16 +2,19 @@
#vpnc --password-helper "$HOME/bin/vpn-getpass" tu.conf
-vpn-getpass | openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --passwd-on-stdin -b -i vpntun0 vpn.tuwien.ac.at
+#vpn-getpass | sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --passwd-on-stdin -b -i vpntun0 vpn.tuwien.ac.at
+vpn-getpass | sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --passwd-on-stdin -b -i vpntun0 vpn.tuwien.ac.at
-ip route delete default dev vpntun0
-ip route add default via 192.168.4.1 dev br0
+sleep 1
+
+sudo ip route delete default dev vpntun0
+sudo ip route add default via 192.168.4.1 dev br0
for i in 128.130.0.0/15 192.35.240.0/24 193.170.3.0/24 193.170.72.0/21; do
- ip route add $i dev vpntun0
+ sudo ip route add $i dev vpntun0
done
hostnames=(ieeexplore.ieee.org dl.acm.org)
for ip in $(dig +short "${hostnames[@]}"); do
- ip route add dev vpntun0 "$ip"
+ sudo ip route add dev vpntun0 "$ip"
done