summary refs log tree commit diff
path: root/fvpn_launch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fvpn_launch.sh')
-rwxr-xr-xfvpn_launch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/fvpn_launch.sh b/fvpn_launch.sh
index 3b158de..d5b84be 100755
--- a/fvpn_launch.sh
+++ b/fvpn_launch.sh
@@ -30,7 +30,7 @@ ip link set $TAP up
 # 2) masquarade
 # 3) firewall forward rules configured/disabled
 if [ "$1" = "all" ]; then
-	srv_ip=$(dig +short $SERVER | head -1)
+	srv_ip=$(dig +short $SERVER | tail -1)
 	gw=$(ip route get $srv_ip | head -1 | awk '{print $3}')
 	ip route add $srv_ip/32 via $gw
 	ip route add   0.0.0.0/1 via $INTERNAL_SRV_IP