no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | tech:linux:dns_validate [2015/04/09 11:46] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Validate DNS with nslookup ====== | ||
| + | To validate that the correct DNS entries are in the DNS | ||
| + | |||
| + | **Validate script** (nsvalidate) | ||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | HOSTN=$1 | ||
| + | HOSTI=$2 | ||
| + | RHOST=`nslookup -type=A $HOSTN|grep Address|grep -v "# | ||
| + | if [ $HOSTI != $RHOST ]; then | ||
| + | echo " | ||
| + | fi | ||
| + | </ | ||
| + | |||
| + | **Run script** | ||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | ./ | ||
| + | ./ | ||
| + | </ | ||