热门文章
 
自动备份IIS配置的实现方法
IIS的安装与配置
Win XP家用版安装 II
IIS 安装配置基础
windows 2003系统
windows 2003系统
windows 2003系统
windows 2003系统
windows XP 安装
Win2000如何IIS
 推荐文章
 
微软教程:SMTP 文件夹所
微软教程:为 IIS 5 分
精心配置IIS打造安全Web
自动备份IIS配置的实现方法
Win XP家用版安装 II
防止别人用ipc$和默认共享
IIS 安装配置基础
windows 2003系统
windows 2003系统
windows 2003系统
windows 2003系统
windows XP 安装
Win2000如何IIS
IIS配置文件后门
配置asp.net环境
IIS 6.0 中的 Web
 
你现在的位置:您现在的位置是: 中国ASP>>ASP与服务器>>IIS配置
屏蔽 HTTP 标头(内容-位置)中的 IP 地址

微软官方教程,来自Microsoft.

问:在对 IIS 5 服务器进行端口扫描时,它返回以下信息:

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: http://192.168.0.44/Default.htm
Date: Tue, 19 Feb 2002 20:19:20 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Tue, 19 Feb 2002 20:04:10 GMT
Content-Length: 16


问题是,Content-Location(内容-位置)标头暴露了 web 服务器的内部 IP 地址。这就为黑客大开了方便之门。是否有办法让 IIS 在扫描过程中不返回服务器的 IP 地址?

答:有,您可以配置 IIS 4 和 IIS 5,使 Content-Location 字段返回 URL 而非 IP 地址,如下所示:

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: http://homer.test.bh.tm/Default.htm
Date: Tue, 19 Feb 2002 20:27:20 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Tue, 19 Feb 2002 20:04:10 GMT
Content-Length: 16


要做到这一点,您必须将 UseHostName 这一值添加到 Metabase 中的 W3SVC 键上。最简单的办法是使用默认情况下安装在 Inetpub\Adminscripts 中的 ADSUTIL 程序,如下所示:

adsutil set w3svc/UseHostName True


然后,您必须重新启动 web 服务。


相关信息:

IIS 安装配置基础
Win XP家用版安装 IIS
windows 2003系统安装 和安全配置 1
windows 2003系统安装 和安全配置 2
windows 2003系统安装 和安全配置3
windows 2003系统安装 和安全配置4
windows XP 安装 iis
Win2000如何IIS

 

中国ASP技术 ASP.ORG.CN 版权所有 2004-2008