#!/bin/csh -f #H# This script verifies that the reverse DNS for the IP address entered as #H# the CLI param matches the forward DNS of the name that it points to. set IP=$1 set Name=`dnsname $IP` set RealIP=`dnsip $Name` if ("$IP" == "$RealIP") then echo "$IP is $Name." exit 0 else echo "$IP claims to be $Name but it isn't because $RealIP is." exit 1 endif