在我查看的 Windows Server 上,IIS 运行 WWW 发布服务,并且防火墙仅允许端口 80 和 443 访问此服务。来自客户端浏览器的连接超时,当我查看服务器上的安全事件日志时,我看到记录的事件如下:
The Windows Filtering Platform has blocked a connection.
Application Information:
Process ID: 4
Application Name: System
Network Information:
Direction: Inbound
Source Address: 192.168.10.21 <= This is this server where the event is logged
Source Port: 80 <= This is the IIS WWW publishing service listening port
Destination Address: 192.168.10.3 <= This is the client PC where the browser requests the URL on the IIS
Destination Port: 60112
Protocol: 6
Filter Information:
Filter Run-Time ID: 86327
Layer Name: Receive/Accept
Layer Run-Time ID: 44
如果连接是如上所述的入站,则源应该是 192.168.10.3,源端口应该是浏览器使用的任何随机高端口,目标应该是 192.168.10.21,目标端口应该是 80,但事实恰恰相反。
不明白为什么事件字段是颠倒的,我无法理解如何允许这种连接。
如果这实际上不是原始请求,而是 IIS 对已允许的请求的响应,那么为什么它会被阻止?防火墙上没有阻止规则,唯一与 HTTP(s) 连接有关的规则是 IIS WWW 服务的允许入站规则。
我已经按照上面描述的方式设置了大量 Apache 服务器及其各自的规则,从来没有遇到任何问题。如果 IIS 需要不同的方法,那么为什么以及如何做?供应商要求网站在 IIS 上运行,因此在这方面我没有自由。
编辑:
如果我修改规则以应用于任何程序或服务,则连接有效。如果我将其限制为仅适用于服务,它仍然有效。并且只有当我专门选择全球 Web 发布服务作为其目标时,它才会停止允许连接。由此可见,Windows 防火墙和 IIS 之间存在一些问题,但是什么问题呢?