You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
function checkDNS {
host=$1
echo -e "
+ Checking DNS entries for $host"
## Check the forward DNS record.
forwardDNS=$(nslookup $host | grep ^Name -A1 | awk '/^Address:/ {print $2}')
if [[ ! -z $forwardDNS ]]
then
printOK "Forward DNS resolves to $forwardDNS"
else
printError "Forward DNS does not resolve"
fi
## Check the reverse DNS record.
reverseDNS=$(nslookup $forwardDNS | awk '/name/ {print $NF}' | rev | cut -c2- | rev)
if [[ ! -z $reverseDNS ]]
then
printOK "Reverse DNS resolves to $reverseDNS"
else
printError "Reverse DNS not resolvable for $forwardDNS"
fi
## Check the forward and reverse records match.
if [[ $host == $reverseDNS ]]
then
printOK "Forward and reverse DNS match"
else
printError "Forward and reverse DNS do not match for $host / $reverseDNS"
fi
echo
}
The text was updated successfully, but these errors were encountered:
https://github.com/boogiespook/sat6_healthCheck/blob/master/sat6_healthCheck.sh#L189-L221
The text was updated successfully, but these errors were encountered: