配置 Sophos Mobile Web 服务器
Sophos Mobile 包括 Web 服务器组件,用于提供 Sophos Mobile Admin 的内容和 Sophos Mobile Self Service Portal Web 应用程序。您可以配置该 Web 服务器,使其适合您的环境。
对 Web 服务器的 HTTP 请求在请求标题中包括有 Host 字段,用于指定处理该请求的 Web 应用程序。攻击者可能会操纵该 Host 字段的值,引发意想不到的行为。
安装后,Sophos Mobile 的 Web 服务器组件不会检查 Host 字段的值。我们建议您配置该 Web 服务器,使其只接受指向您的域名的请求。
-
在安装 Sophos Mobile 服务器的计算机上,运行脚本
%MDM_HOME%\tools\HostValidationUndertowFilter\addModule.bat
请将 %MDM_HOME% 替换为您的 Sophos Mobile 安装文件夹。
-
在文本编辑器中打开文件
%MDM_HOME%\wildfly\standalone\configuration\smc-config.xml
,并搜索以下内容:<filter name="hostheadervalidation" ...> <param name="allowedHosts" value="localhost"/> </filter>
-
在
localhost
后,添加您的 Sophos Mobile Admin 和 Sophos Mobile Self Service Portal 的域名。例如,如果您的域名是
smc.example.com
,请按以下方式修改该行。<param name="allowedHosts" value="localhost,smc.example.com"/>
如果您的 Sophos Mobile 服务器可以通过多个域名访问,请输入所有域名,并以逗号隔开。
-
保存该文件
smc-config.xml
。 - 重新启动 Sophos Mobile 服务。