Arm*_*min 8 iis ip azure azure-web-sites
web.config中的ipSecurity部分是否适用于Azure App Services?
使用托管在Azure上的Web应用程序设置简单IP地址阻止(黑名单)的步骤是什么?
App Service在Networking> Ip Restrictions下为此提供了UX
从这里你可以阻止一个特定的IP地址或一系列地址:
如果您想通过web.config执行此操作,则需要使用XDT Transforms
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<security>
<ipSecurity xdt:Transform="RemoveAttributes(allowUnlisted)">
<add ipAddress="204.79.197.200" allowed="true" xdt:Transform="Insert"/>
</ipSecurity>
</security>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
您可以在此处阅读有关XDT转换和应用服务的更多信息:https://github.com/projectkudu/kudu/wiki/Xdt-transform-samples
是的,web.config 中的 ipSecurity 部分适用于 Azure 应用服务。
使用 Azure 上托管的 Web 应用程序设置简单的 IP 地址阻止(黑名单)的步骤是什么?
<system.webServer>
<security>
<ipSecurity>
<add ipAddress="x.x.x.x" allowed="false" />
</ipSecurity>
</security>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
我们还可以从 IIS 管理器连接到 WebApp,然后可以轻松配置限制 IP。更多详细信息请参阅博客。
归档时间: |
|
查看次数: |
7601 次 |
最近记录: |