Azure WebApp的白名单入站IP地址?

时间:2016-08-15 15:29:27

标签: azure networking

我想通过允许入站IP地址的白名单限制访问我在Azure上开发的某些 Web Apps 。我使用 Network Security Group 实现了这一点,应用于VM。我还可以看到如何使用 App Service Environment 实现这一目标,但这非常昂贵。有没有办法将网络安全组应用于 Web App ?或者我可以将网络安全组添加到虚拟网络吗?还是我有另一种方法可以忽略?

谢谢!

1 个答案:

答案 0 :(得分:8)

您可以使用ipSecurity元素限制web.config中的IP地址,如下所示:

<system.webServer>
  <security>
     <ipSecurity allowUnlisted="false">
       <add ipAddress="XXX.XXX.XXX.XXX" allowed="true" />
     </ipSecurity>
  </security>
</system.webServer>

有关ipSecurity元素的完整文档:https://www.iis.net/configreference/system.webserver/security/ipsecurity

Azure Web App对该功能的支持: https://azure.microsoft.com/en-us/blog/ip-and-domain-restrictions-for-windows-azure-web-sites/

相关问题