mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-28 08:04:11 +02:00
Install on IPv6-only/DNS64/NAT64 system (#6144)
This commit is contained in:
commit
248d25b8d0
@ -48,7 +48,6 @@ Google (ECS, DNSSEC);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:
|
|||||||
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
|
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
|
||||||
Level3;4.2.2.1;4.2.2.2;;
|
Level3;4.2.2.1;4.2.2.2;;
|
||||||
Comodo;8.26.56.26;8.20.247.20;;
|
Comodo;8.26.56.26;8.20.247.20;;
|
||||||
DNS.WATCH (DNSSEC);84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
|
|
||||||
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
|
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
|
||||||
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
|
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
|
||||||
Quad9 (filtered, ECS, DNSSEC);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
|
Quad9 (filtered, ECS, DNSSEC);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
|
||||||
@ -56,6 +55,17 @@ Cloudflare (DNSSEC);1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001
|
|||||||
EOM
|
EOM
|
||||||
)
|
)
|
||||||
|
|
||||||
|
DNS_SERVERS_IPV6_ONLY=$(
|
||||||
|
cat <<EOM
|
||||||
|
Google (ECS, DNSSEC);2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
|
||||||
|
OpenDNS (ECS, DNSSEC);2620:119:35::35;2620:119:53::53
|
||||||
|
Quad9 (filtered, DNSSEC);2620:fe::fe;2620:fe::9
|
||||||
|
Quad9 (unfiltered, no DNSSEC);2620:fe::10;2620:fe::fe:10
|
||||||
|
Quad9 (filtered, ECS, DNSSEC);2620:fe::11;2620:fe::fe:11
|
||||||
|
Cloudflare (DNSSEC);2606:4700:4700::1111;2606:4700:4700::1001
|
||||||
|
EOM
|
||||||
|
)
|
||||||
|
|
||||||
# Location for final installation log storage
|
# Location for final installation log storage
|
||||||
installLogLoc="/etc/pihole/install.log"
|
installLogLoc="/etc/pihole/install.log"
|
||||||
# This is a file used for the colorized output
|
# This is a file used for the colorized output
|
||||||
@ -688,7 +698,11 @@ find_IPv4_information() {
|
|||||||
local IPv4bare
|
local IPv4bare
|
||||||
|
|
||||||
# Find IP used to route to outside world by checking the route to Google's public DNS server
|
# Find IP used to route to outside world by checking the route to Google's public DNS server
|
||||||
route=$(ip route get 8.8.8.8)
|
if ! route="$(ip route get 8.8.8.8 2> /dev/null)"; then
|
||||||
|
printf " %b No IPv4 route was detected.\n" "${INFO}"
|
||||||
|
IPV4_ADDRESS=""
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# Get just the interface IPv4 address
|
# Get just the interface IPv4 address
|
||||||
# shellcheck disable=SC2059,SC2086
|
# shellcheck disable=SC2059,SC2086
|
||||||
@ -704,6 +718,28 @@ find_IPv4_information() {
|
|||||||
IPV4_ADDRESS=$(ip -oneline -family inet address show | grep "${IPv4bare}/" | awk '{print $4}' | awk 'END {print}')
|
IPV4_ADDRESS=$(ip -oneline -family inet address show | grep "${IPv4bare}/" | awk '{print $4}' | awk 'END {print}')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
confirm_ipv6_only() {
|
||||||
|
# Confirm from user before IPv6 only install
|
||||||
|
|
||||||
|
dialog --no-shadow --output-fd 1 \
|
||||||
|
--no-button "Exit" --yes-button "Install IPv6 ONLY" \
|
||||||
|
--yesno "\\n\\nWARNING - no valid IPv4 route detected.\\n\\n\
|
||||||
|
This may be due to a temporary connectivity issue,\\n\
|
||||||
|
or you may be installing on an IPv6 only system.\\n\\n\
|
||||||
|
Do you wish to continue with an IPv6-only installation?\\n\\n" \
|
||||||
|
"${r}" "${c}" && result=0 || result="$?"
|
||||||
|
|
||||||
|
case "${result}" in
|
||||||
|
"${DIALOG_CANCEL}" | "${DIALOG_ESC}")
|
||||||
|
printf " %b Installer exited at IPv6 only message.\\n" "${INFO}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
DNS_SERVERS="$DNS_SERVERS_IPV6_ONLY"
|
||||||
|
printf " %b Proceeding with IPv6 only installation.\\n" "${INFO}"
|
||||||
|
}
|
||||||
|
|
||||||
# Get available interfaces that are UP
|
# Get available interfaces that are UP
|
||||||
get_available_interfaces() {
|
get_available_interfaces() {
|
||||||
# There may be more than one so it's all stored in a variable
|
# There may be more than one so it's all stored in a variable
|
||||||
@ -857,6 +893,9 @@ collect_v4andv6_information() {
|
|||||||
printf " %b IPv4 address: %s\\n" "${INFO}" "${IPV4_ADDRESS}"
|
printf " %b IPv4 address: %s\\n" "${INFO}" "${IPV4_ADDRESS}"
|
||||||
find_IPv6_information
|
find_IPv6_information
|
||||||
printf " %b IPv6 address: %s\\n" "${INFO}" "${IPV6_ADDRESS}"
|
printf " %b IPv6 address: %s\\n" "${INFO}" "${IPV6_ADDRESS}"
|
||||||
|
if [ "$IPV4_ADDRESS" == "" ] && [ "$IPV6_ADDRESS" != "" ]; then
|
||||||
|
confirm_ipv6_only
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check an IP address to see if it is a valid one
|
# Check an IP address to see if it is a valid one
|
||||||
|
Loading…
x
Reference in New Issue
Block a user