This shows you the differences between two versions of the page.

Link to this comparison view

tech:linux:dns_validate [2015/04/09 06:46] (current)
Line 1: Line 1:
 +====== Validate DNS with nslookup ======
 +To validate that the correct DNS entries are in the DNS
 +**Validate script** (nsvalidate)
 +<code bash>
 +RHOST=`nslookup -type=A $HOSTN|grep Address|grep -v "#​53$"​|cut -d" " -f2`
 +if [ $HOSTI != $RHOST ]; then
 +  echo "​Mismatch:​ $HOSTN expected $HOSTI but returned $RHOST"​
 +**Run script**
 +<code bash>
 +./​nsvalidate someserver1
 +./​nsvalidate someserver2

QR Code
QR Code tech:linux:dns_validate (generated for current page)