Thursday, December 16, 2010

Internet Information Server returns IP address in HTTP header

Note:- This procedure is applicable to IIS6 Only It is tested, but test in Test Environment B4 going on to Prod Server.set the name that you want to display it can be PublicIP/AnySiteName by using the Param SetHostName as shown below, with the command results.

CMD:cscript.exe adsutil.vbs set w3svc/1/SetHostName www.MyTestSite.com
CMD:-Results are mentioned below







Above results can be cross checked or verified by using either HTTP HEAD Params or directly by trying the below script, and belive me it will not reveil the Server Private IP thro/over the Internet
No need to stop start the IIS Server also.


CMD:-cscript adsutil.vbs enum /w3svc/1
CMD:-Results are mentioned below













































The other useful info is like /w3svc/1 where 1 is the siteid and if more then 1 site are deployed on to your server then by appending that siteid details about the same can be viewed.
Here 1 is the SiteID for the Default web site for Windows IIS server.
CMD:- cscript adsutil.vbs enum w3svc/SiteID

And apart from all this stuff the simplest way to hide your server information thro' the Http Header is to stop the Default WebSite or Do Not Host your website with the Default Site always create a new site with minimal requirements.

No comments:

Post a Comment