From d6ad2f0c0d3a72ad3fdab6ac2957834ce782f8a4 Mon Sep 17 00:00:00 2001 From: Juno Aliento Date: Fri, 8 Sep 2017 16:58:41 +0800 Subject: [PATCH] Allow auto-reconnect --- openvpn-install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 314d53f..920020d 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -400,13 +400,16 @@ remote $IP $PORT resolv-retry infinite nobind persist-key -persist-tun remote-cert-tls server auth SHA512 cipher AES-256-CBC comp-lzo setenv opt block-outside-dns key-direction 1 +script-security 2 +up /etc/openvpn/update-resolv-conf +down /etc/openvpn/update-resolv-conf +keepalive 30 60 verb 3" > /etc/openvpn/client-common.txt # Generates the custom client.ovpn newclient "$CLIENT" @@ -415,4 +418,4 @@ verb 3" > /etc/openvpn/client-common.txt echo "" echo "Your client configuration is available at" ~/"$CLIENT.ovpn" echo "If you want to add more clients, you simply need to run this script again!" -fi \ No newline at end of file +fi