summaryrefslogtreecommitdiffstats
path: root/vpn-connect
blob: a569486d4f6f90e9f357788929c7607f99f4da7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

#vpnc --password-helper "$HOME/bin/vpn-getpass" tu.conf

#vpn-getpass | sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --passwd-on-stdin -b -i vpntun0 vpn.tuwien.ac.at
## need to run this in shell: sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --syslog -i vpntun0 vpn.tuwien.ac.at
#vpn-getpass | sudo openconnect -u e1125452@student.tuwien.ac.at --authgroup TU_getunnelt --passwd-on-stdin -b --syslog -i vpntun0 vpn.tuwien.ac.at

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
    sudo ip route add $i dev vpntun0
done

hostnames=(ieeexplore.ieee.org dl.acm.org
proquest.tech.safaribooksonline.de
link.springer.com
)
for ip in $(dig +short "${hostnames[@]}"); do
	sudo ip route add dev vpntun0 "$ip" || true
done