By default, performing a Request.ServerVariables("REMOTE_HOST")
in ASP returns the value of REMOTE_ADDR, the IP address of the
You can have the REMOTE_HOST variable return the Host Name
instead by using the Adsutil.vbs script.
The default locations for this script are:
IIS 4.0 - C:\WinNT\System32\InetSrv\AdminSamples
IIS 5.0 - C:\InetPub\AdminScripts
Once you find the location of the adsutil.vbs script, open a
command prompt and cd to the directory that holds the script
(cd InetPub\AdminScripts). Then type: cscript adsutil.vbs set /w3svc/EnableReverseDNS "TRUE"
The value of Request.ServerVariables("REMOTE_HOST") will now
return the Remote Host name and not the IP Address.
Note: While this can be useful, caution should
be exercised when making this change as it requires extra
processing and can have a detrimental effect on server performance.
Be sure to test your application and server setup to be sure it
can handle the additional load and that the performance hit is acceptable
before enabling this lookup in a production environment.