mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-28 07:56:07 +03:00
Tested on Windows 7 Home Premium and Windows Server 2012 R2. The following distros worked on aws.amazon.com: Ubuntu 14 LTS, Debian 7 32 bit, Debian 7 64 bit, Debian 8 64 bit, centos 6 64 bit. The install didn't work on RHEL 7 and SUSE Linux Enterprise Server 12 SP1 x86_64 (64-bit).
This commit is contained in:
parent
66ae7a1b3c
commit
5b7bc2f957
48
test
48
test
@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "What 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) You specify the DNS server IP-s"
|
||||
read -p "DNS [1-6]: " -e -i 6 DNS
|
||||
if [[ "$DNS" = '6' ]]; then
|
||||
echo "Please leave a space between DNS IP entries"
|
||||
read -e -p "Specify the DNS server IP-s. Space is the separator: " OWNDNS
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# DNS
|
||||
case $DNS in
|
||||
1)
|
||||
# Obtain the resolvers from resolv.conf and use them for OpenVPN
|
||||
grep -v '#' /etc/resolv.conf | grep 'nameserver' | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | while read line; do
|
||||
echo "push \"dhcp-option DNS $line\"" >> ./server.conf
|
||||
done
|
||||
;;
|
||||
2)
|
||||
echo 'push "dhcp-option DNS 8.8.8.8"' >> ./server.conf
|
||||
echo 'push "dhcp-option DNS 8.8.4.4"' >> ./server.conf
|
||||
;;
|
||||
3)
|
||||
echo 'push "dhcp-option DNS 208.67.222.222"' >> ./server.conf
|
||||
echo 'push "dhcp-option DNS 208.67.220.220"' >> ./server.conf
|
||||
;;
|
||||
4)
|
||||
echo 'push "dhcp-option DNS 129.250.35.250"' >> ./server.conf
|
||||
echo 'push "dhcp-option DNS 129.250.35.251"' >> ./server.conf
|
||||
;;
|
||||
5)
|
||||
echo 'push "dhcp-option DNS 74.82.42.42"' >> ./server.conf
|
||||
;;
|
||||
6)
|
||||
for i in `echo $OWNDNS|tr " " "\n"`;
|
||||
do
|
||||
echo 'push "dhcp-option DNS '"$i"'"' >> ./server.conf
|
||||
done
|
||||
;;
|
||||
esac
|
||||
cat ./server.conf
|
||||
rm -f ./server.conf
|
Loading…
Reference in New Issue
Block a user