From 086f0790fc90ac1e1953b6507e3db0d1dd46c051 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 4 Mar 2017 22:31:18 +0100 Subject: [PATCH] Add Google's IPv6 address for potential IPv6 resolver tests --- advanced/Scripts/piholeDebug.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/piholeDebug.sh b/advanced/Scripts/piholeDebug.sh index 484cb737..df03da56 100755 --- a/advanced/Scripts/piholeDebug.sh +++ b/advanced/Scripts/piholeDebug.sh @@ -273,6 +273,12 @@ testResolver() { local piholedig local remotedig + if [[ ${protocol} == "6" ]]; then + g_addr="2001:4860:4860::8888" + else + g_addr="8.8.8.8" + fi + # Find a blocked url that has not been whitelisted. url=$(shuf -n 1 "${GRAVITYFILE}" | awk -F ' ' '{ print $2 }') @@ -296,11 +302,11 @@ testResolver() { log_write "" - log_write "Resolution of ${testurl} from 8.8.8.8:" - if remotedig=$(dig -"${protocol}" "${testurl}" @8.8.8.8 +short); then + log_write "Resolution of ${testurl} from ${g_addr}:" + if remotedig=$(dig -"${protocol}" "${testurl}" @${g_addr} +short); then log_write "${remotedig:-NXDOMAIN}" else - log_write "Failed to resolve ${testurl} on 8.8.8.8" + log_write "Failed to resolve ${testurl} on ${g_addr}" fi log_write ""