mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Remove Google DNS
Remove Google DNS for privacy purposes, replace with Quad9
This commit is contained in:
parent
05b189486d
commit
e01089945e
1 changed files with 9 additions and 7 deletions
|
@ -57,8 +57,8 @@ r=$(( r < 20 ? 20 : r ))
|
||||||
c=$(( c < 70 ? 70 : c ))
|
c=$(( c < 70 ? 70 : c ))
|
||||||
|
|
||||||
# Find IP used to route to outside world
|
# Find IP used to route to outside world
|
||||||
IPv4addr=$(ip route get 8.8.8.8| awk '{print $7}')
|
IPv4addr=$(ip route get 9.9.9.9 | awk '{print $7}')
|
||||||
IPv4gw=$(ip route get 8.8.8.8 | awk '{print $3}')
|
IPv4gw=$(ip route get 9.9.9.9 | awk '{print $3}')
|
||||||
|
|
||||||
availableInterfaces=$(ip -o link | grep "state UP" | awk '{print $2}' | cut -d':' -f1 | cut -d'@' -f1)
|
availableInterfaces=$(ip -o link | grep "state UP" | awk '{print $2}' | cut -d':' -f1 | cut -d'@' -f1)
|
||||||
dhcpcdFile=/etc/dhcpcd.conf
|
dhcpcdFile=/etc/dhcpcd.conf
|
||||||
|
@ -947,8 +947,8 @@ askClientDNS(){
|
||||||
pivpnDNS1="$pivpnDNS2"
|
pivpnDNS1="$pivpnDNS2"
|
||||||
unset pivpnDNS2
|
unset pivpnDNS2
|
||||||
elif [ -z "$pivpnDNS1" ] && [ -z "$pivpnDNS2" ]; then
|
elif [ -z "$pivpnDNS1" ] && [ -z "$pivpnDNS2" ]; then
|
||||||
pivpnDNS1="8.8.8.8"
|
pivpnDNS1="9.9.9.9"
|
||||||
pivpnDNS2="8.8.4.4"
|
pivpnDNS2="149.112.112.112"
|
||||||
echo "::: No DNS provider specified, using Google DNS ($pivpnDNS1 $pivpnDNS2)"
|
echo "::: No DNS provider specified, using Google DNS ($pivpnDNS1 $pivpnDNS2)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -992,13 +992,14 @@ askClientDNS(){
|
||||||
Custom.\\n\\nIn case you have a local resolver running, i.e. unbound, select
|
Custom.\\n\\nIn case you have a local resolver running, i.e. unbound, select
|
||||||
\"PiVPN-is-local-DNS\" and make sure your resolver is listening on
|
\"PiVPN-is-local-DNS\" and make sure your resolver is listening on
|
||||||
\"$vpnGw\", allowing requests from \"${pivpnNET}/${subnetClass}\"." ${r} ${c} 6)
|
\"$vpnGw\", allowing requests from \"${pivpnNET}/${subnetClass}\"." ${r} ${c} 6)
|
||||||
DNSChooseOptions=(Google "" on
|
DNSChooseOptions=(Quad9 "" on
|
||||||
OpenDNS "" off
|
OpenDNS "" off
|
||||||
Level3 "" off
|
Level3 "" off
|
||||||
DNS.WATCH "" off
|
DNS.WATCH "" off
|
||||||
Norton "" off
|
Norton "" off
|
||||||
FamilyShield "" off
|
FamilyShield "" off
|
||||||
CloudFlare "" off
|
CloudFlare "" off
|
||||||
|
Google "" off
|
||||||
PiVPN-is-local-DNS "" off
|
PiVPN-is-local-DNS "" off
|
||||||
Custom "" off)
|
Custom "" off)
|
||||||
|
|
||||||
|
@ -1008,13 +1009,14 @@ askClientDNS(){
|
||||||
if [[ ${DNSchoices} != "Custom" ]]; then
|
if [[ ${DNSchoices} != "Custom" ]]; then
|
||||||
|
|
||||||
echo "::: Using ${DNSchoices} servers."
|
echo "::: Using ${DNSchoices} servers."
|
||||||
declare -A DNS_MAP=(["Google"]="8.8.8.8 8.8.4.4"
|
declare -A DNS_MAP=(["Quad9"]="9.9.9.9 149.112.112.112"
|
||||||
["OpenDNS"]="208.67.222.222 208.67.220.220"
|
["OpenDNS"]="208.67.222.222 208.67.220.220"
|
||||||
["Level3"]="209.244.0.3 209.244.0.4"
|
["Level3"]="209.244.0.3 209.244.0.4"
|
||||||
["DNS.WATCH"]="84.200.69.80 84.200.70.40"
|
["DNS.WATCH"]="84.200.69.80 84.200.70.40"
|
||||||
["Norton"]="199.85.126.10 199.85.127.10"
|
["Norton"]="199.85.126.10 199.85.127.10"
|
||||||
["FamilyShield"]="208.67.222.123 208.67.220.123"
|
["FamilyShield"]="208.67.222.123 208.67.220.123"
|
||||||
["CloudFlare"]="1.1.1.1 1.0.0.1"
|
["CloudFlare"]="1.1.1.1 1.0.0.1"
|
||||||
|
["Google"]="8.8.8.8 8.8.4.4"
|
||||||
["PiVPN-is-local-DNS"]="$vpnGw")
|
["PiVPN-is-local-DNS"]="$vpnGw")
|
||||||
|
|
||||||
pivpnDNS1=$(awk '{print $1}' <<< "${DNS_MAP["${DNSchoices}"]}")
|
pivpnDNS1=$(awk '{print $1}' <<< "${DNS_MAP["${DNSchoices}"]}")
|
||||||
|
@ -1025,7 +1027,7 @@ askClientDNS(){
|
||||||
until [[ $DNSSettingsCorrect = True ]]; do
|
until [[ $DNSSettingsCorrect = True ]]; do
|
||||||
strInvalid="Invalid"
|
strInvalid="Invalid"
|
||||||
|
|
||||||
if pivpnDNS=$(whiptail --backtitle "Specify Upstream DNS Provider(s)" --inputbox "Enter your desired upstream DNS provider(s), separated by a comma.\\n\\nFor example '8.8.8.8, 8.8.4.4'" ${r} ${c} "" 3>&1 1>&2 2>&3)
|
if pivpnDNS=$(whiptail --backtitle "Specify Upstream DNS Provider(s)" --inputbox "Enter your desired upstream DNS provider(s), separated by a comma.\\n\\nFor example '1.1.1.1, 9.9.9.9'" ${r} ${c} "" 3>&1 1>&2 2>&3)
|
||||||
then
|
then
|
||||||
pivpnDNS1=$(echo "$pivpnDNS" | sed 's/[, \t]\+/,/g' | awk -F, '{print$1}')
|
pivpnDNS1=$(echo "$pivpnDNS" | sed 's/[, \t]\+/,/g' | awk -F, '{print$1}')
|
||||||
pivpnDNS2=$(echo "$pivpnDNS" | sed 's/[, \t]\+/,/g' | awk -F, '{print$2}')
|
pivpnDNS2=$(echo "$pivpnDNS" | sed 's/[, \t]\+/,/g' | awk -F, '{print$2}')
|
||||||
|
|
Loading…
Reference in a new issue