1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-24 05:56:08 +03:00

added function to type a own DNS server

This commit is contained in:
Lukas-Heiligenbrunner 2017-12-27 22:13:34 +01:00 committed by GitHub
parent 0397827abe
commit a12cff409c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS # OpenVPN road warrior installer for Debian, Ubuntu and CentOS
# This script will work on Debian, Ubuntu, CentOS and probably other distros # This script will work on Debian, Raspbian, Ubuntu, CentOS and probably other distros
# of the same families, although no support is offered for them. It isn't # of the same families, although no support is offered for them. It isn't
# bulletproof but it will probably work if you simply want to setup a VPN on # bulletproof but it will probably work if you simply want to setup a VPN on
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and # your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and
@ -212,7 +212,14 @@ else
echo " 4) NTT" echo " 4) NTT"
echo " 5) Hurricane Electric" echo " 5) Hurricane Electric"
echo " 6) Verisign" echo " 6) Verisign"
read -p "DNS [1-6]: " -e -i 1 DNS echo " 7) Own"
read -p "DNS [1-7]: " -e -i 1 DNS
if [ $DNS = "7" ]; then
read -p "Type in your DNS: " OWNDNS
fi
echo "" echo ""
echo "Finally, tell me your name for the client certificate" echo "Finally, tell me your name for the client certificate"
echo "Please, use one word only, no special characters" echo "Please, use one word only, no special characters"
@ -299,6 +306,10 @@ ifconfig-pool-persist ipp.txt" > /etc/openvpn/server.conf
echo 'push "dhcp-option DNS 64.6.64.6"' >> /etc/openvpn/server.conf 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 echo 'push "dhcp-option DNS 64.6.65.6"' >> /etc/openvpn/server.conf
;; ;;
7)
echo 'push "dhcp-option DNS '$OWNDNS'"' >> /etc/openvpn/server.conf
;;
esac esac
echo "keepalive 10 120 echo "keepalive 10 120
cipher AES-256-CBC cipher AES-256-CBC