diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-07-27 15:34:28 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-07-27 15:34:28 +0200 |
commit | 1bad0f4520824667e408dfac8575d92aea8148b9 (patch) | |
tree | a4d8c0b260b2af380acdabfde712a6c8f1e0af0a /vpn-connect | |
parent | 11ebc79bad89075267574a032b46eb992a0a6f32 (diff) | |
download | bin-1bad0f4520824667e408dfac8575d92aea8148b9.tar.gz bin-1bad0f4520824667e408dfac8575d92aea8148b9.tar.xz |
misc changes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'vpn-connect')
-rwxr-xr-x | vpn-connect | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/vpn-connect b/vpn-connect index 692310e..cf1a764 100755 --- a/vpn-connect +++ b/vpn-connect @@ -1,10 +1,15 @@ #!/bin/bash -vpnc tu.conf +vpnc --password-helper "$HOME/bin/vpn-getpass" tu.conf ip route delete default dev vpntun0 -ip route add default via 192.168.4.1 dev eth0 +ip route add default via 192.168.4.1 dev eno1 -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 +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 +done + +hostnames=(ieeexplore.ieee.org dl.acm.org) +for ip in $(dig +short "${hostnames[@]}"); do + ip route add dev vpntun0 "$ip" done |