mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Change NSLOOKUP to dig for resolver tests, add dnsmasq specific records check
This commit is contained in:
parent
5de179f1eb
commit
8466d0b681
1 changed files with 20 additions and 10 deletions
|
@ -216,12 +216,14 @@ function portCheck {
|
||||||
echo >> ${DEBUG_LOG}
|
echo >> ${DEBUG_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testNslookup {
|
function testResolver {
|
||||||
TESTURL="doubleclick.com"
|
echo "############################################################" >> ${DEBUG_LOG}
|
||||||
echo "#######################################" >> ${DEBUG_LOG}
|
echo "############ Resolver Functions Check ############" >> ${DEBUG_LOG}
|
||||||
echo "############ NSLookup Test ############" >> ${DEBUG_LOG}
|
echo "############################################################" >> ${DEBUG_LOG}
|
||||||
echo "#######################################" >> ${DEBUG_LOG}
|
|
||||||
|
|
||||||
# Find a blocked url that has not been whitelisted.
|
# Find a blocked url that has not been whitelisted.
|
||||||
|
TESTURL="doubleclick.com"
|
||||||
if [ -s "$WHITELISTMATCHES" ]; then
|
if [ -s "$WHITELISTMATCHES" ]; then
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
CUTURL=${line#*" "}
|
CUTURL=${line#*" "}
|
||||||
|
@ -237,12 +239,19 @@ function testNslookup {
|
||||||
done < "$GRAVITYFILE"
|
done < "$GRAVITYFILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "NSLOOKUP of $TESTURL from Pi-hole:" >> ${DEBUG_LOG}
|
echo "Resolution of $TESTURL from Pi-hole:" >> ${DEBUG_LOG}
|
||||||
nslookup "$TESTURL" >> ${DEBUG_LOG}
|
dig "$TESTURL" @127.0.0.1>> ${DEBUG_LOG}
|
||||||
echo >> ${DEBUG_LOG}
|
echo >> ${DEBUG_LOG}
|
||||||
echo "NSLOOKUP of $TESTURL from 8.8.8.8:" >> ${DEBUG_LOG}
|
echo "Resolution of $TESTURL from 8.8.8.8:" >> ${DEBUG_LOG}
|
||||||
nslookup "$TESTURL" 8.8.8.8 >> ${DEBUG_LOG}
|
dig "$TESTURL" @8.8.8.8 >> ${DEBUG_LOG}
|
||||||
echo >> ${DEBUG_LOG}
|
echo >> ${DEBUG_LOG}
|
||||||
|
|
||||||
|
echo "Pi-hole dnsmasq specific records lookups" >> ${DEBUG_LOG}
|
||||||
|
echo "Cache Size:" >> ${DEBUG_LOG}
|
||||||
|
dig +short chaos txt cachesize.bind >> ${DEBUG_LOG}
|
||||||
|
echo "Upstream Servers:" >> ${DEBUG_LOG}
|
||||||
|
dig +short chaos txt servers.bind >> ${DEBUG_LOG}
|
||||||
|
echo >> ${DEBUG_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkProcesses {
|
function checkProcesses {
|
||||||
|
@ -259,6 +268,7 @@ function checkProcesses {
|
||||||
echo " processes status:" >> ${DEBUG_LOG}
|
echo " processes status:" >> ${DEBUG_LOG}
|
||||||
${SUDO} systemctl -l status "$i" >> "$DEBUG_LOG"
|
${SUDO} systemctl -l status "$i" >> "$DEBUG_LOG"
|
||||||
done
|
done
|
||||||
|
echo >> ${DEBUG_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
function debugLighttpd {
|
function debugLighttpd {
|
||||||
|
@ -301,8 +311,8 @@ distroCheck
|
||||||
ipCheck
|
ipCheck
|
||||||
hostnameCheck
|
hostnameCheck
|
||||||
portCheck
|
portCheck
|
||||||
testNslookup
|
|
||||||
checkProcesses
|
checkProcesses
|
||||||
|
testResolver
|
||||||
debugLighttpd
|
debugLighttpd
|
||||||
|
|
||||||
echo "::: Writing dnsmasq.conf to debug log..."
|
echo "::: Writing dnsmasq.conf to debug log..."
|
||||||
|
|
Loading…
Reference in a new issue