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}
|
||||
}
|
||||
|
||||
function testNslookup {
|
||||
TESTURL="doubleclick.com"
|
||||
echo "#######################################" >> ${DEBUG_LOG}
|
||||
echo "############ NSLookup Test ############" >> ${DEBUG_LOG}
|
||||
echo "#######################################" >> ${DEBUG_LOG}
|
||||
function testResolver {
|
||||
echo "############################################################" >> ${DEBUG_LOG}
|
||||
echo "############ Resolver Functions Check ############" >> ${DEBUG_LOG}
|
||||
echo "############################################################" >> ${DEBUG_LOG}
|
||||
|
||||
|
||||
# Find a blocked url that has not been whitelisted.
|
||||
TESTURL="doubleclick.com"
|
||||
if [ -s "$WHITELISTMATCHES" ]; then
|
||||
while read -r line; do
|
||||
CUTURL=${line#*" "}
|
||||
|
@ -237,11 +239,18 @@ function testNslookup {
|
|||
done < "$GRAVITYFILE"
|
||||
fi
|
||||
|
||||
echo "NSLOOKUP of $TESTURL from Pi-hole:" >> ${DEBUG_LOG}
|
||||
nslookup "$TESTURL" >> ${DEBUG_LOG}
|
||||
echo "Resolution of $TESTURL from Pi-hole:" >> ${DEBUG_LOG}
|
||||
dig "$TESTURL" @127.0.0.1>> ${DEBUG_LOG}
|
||||
echo >> ${DEBUG_LOG}
|
||||
echo "NSLOOKUP of $TESTURL from 8.8.8.8:" >> ${DEBUG_LOG}
|
||||
nslookup "$TESTURL" 8.8.8.8 >> ${DEBUG_LOG}
|
||||
echo "Resolution of $TESTURL from 8.8.8.8:" >> ${DEBUG_LOG}
|
||||
dig "$TESTURL" @8.8.8.8 >> ${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}
|
||||
}
|
||||
|
||||
|
@ -259,6 +268,7 @@ function checkProcesses {
|
|||
echo " processes status:" >> ${DEBUG_LOG}
|
||||
${SUDO} systemctl -l status "$i" >> "$DEBUG_LOG"
|
||||
done
|
||||
echo >> ${DEBUG_LOG}
|
||||
}
|
||||
|
||||
function debugLighttpd {
|
||||
|
@ -301,8 +311,8 @@ distroCheck
|
|||
ipCheck
|
||||
hostnameCheck
|
||||
portCheck
|
||||
testNslookup
|
||||
checkProcesses
|
||||
testResolver
|
||||
debugLighttpd
|
||||
|
||||
echo "::: Writing dnsmasq.conf to debug log..."
|
||||
|
|
Loading…
Reference in a new issue