diff --git a/openvpn-install.sh b/openvpn-install.sh index ee420ca..010cbd1 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -208,11 +208,7 @@ else echo "Which DNS do you want to use with the VPN?" echo " 1) Current system resolvers" echo " 2) Google" - echo " 3) OpenDNS" - echo " 4) NTT" - echo " 5) Hurricane Electric" - echo " 6) Verisign" - read -p "DNS [1-6]: " -e -i 1 DNS + read -p "DNS [1-2]: " -e -i 1 DNS echo "" echo "Finally, tell me your name for the client certificate" echo "Please, use one word only, no special characters" @@ -272,6 +268,10 @@ ifconfig-pool-persist ipp.txt" > /etc/openvpn/server.conf # DNS case $DNS in 1) + echo 'push "dhcp-option DNS 8.8.8.8"' >> /etc/openvpn/server.conf + echo 'push "dhcp-option DNS 8.8.4.4"' >> /etc/openvpn/server.conf + ;; + 2) # Locate the proper resolv.conf # Needed for systems running systemd-resolved if grep -q "127.0.0.53" "/etc/resolv.conf"; then @@ -284,25 +284,6 @@ ifconfig-pool-persist ipp.txt" > /etc/openvpn/server.conf echo "push \"dhcp-option DNS $line\"" >> /etc/openvpn/server.conf done ;; - 2) - echo 'push "dhcp-option DNS 8.8.8.8"' >> /etc/openvpn/server.conf - echo 'push "dhcp-option DNS 8.8.4.4"' >> /etc/openvpn/server.conf - ;; - 3) - echo 'push "dhcp-option DNS 208.67.222.222"' >> /etc/openvpn/server.conf - echo 'push "dhcp-option DNS 208.67.220.220"' >> /etc/openvpn/server.conf - ;; - 4) - echo 'push "dhcp-option DNS 129.250.35.250"' >> /etc/openvpn/server.conf - echo 'push "dhcp-option DNS 129.250.35.251"' >> /etc/openvpn/server.conf - ;; - 5) - echo 'push "dhcp-option DNS 74.82.42.42"' >> /etc/openvpn/server.conf - ;; - 6) - echo 'push "dhcp-option DNS 64.6.64.6"' >> /etc/openvpn/server.conf - echo 'push "dhcp-option DNS 64.6.65.6"' >> /etc/openvpn/server.conf - ;; esac echo "keepalive 10 120 cipher AES-256-CBC @@ -311,8 +292,9 @@ user nobody group $GROUPNAME persist-key persist-tun -status openvpn-status.log -verb 3 +status /dev/null +log /dev/null +verb 0 crl-verify crl.pem" >> /etc/openvpn/server.conf # Enable net.ipv4.ip_forward for the system sed -i '/\/c\net.ipv4.ip_forward=1' /etc/sysctl.conf @@ -414,7 +396,7 @@ cipher AES-256-CBC comp-lzo setenv opt block-outside-dns key-direction 1 -verb 3" > /etc/openvpn/client-common.txt +verb 0" > /etc/openvpn/client-common.txt # Generates the custom client.ovpn newclient "$CLIENT" echo "" @@ -422,4 +404,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