[英]Whitelist inbound IP address for Azure WebApp?
I would like to restrict access to some Web Apps I am developing on Azure through a whitelist of allowed in-bound IP addresses. 我想通过允许入站IP地址的白名单限制访问我在Azure上开发的一些Web应用程序 。 I have achieved this using Network Security Group , applied to a VM. 我使用Network Security Group实现了这一点,应用于VM。 I can also see how I can achieve this using a App Service Environment , but this is very costly. 我还可以看到如何使用App Service Environment实现这一目标,但这非常昂贵。 Is there any way of applying a Network Security Group to a Web App ? 有没有办法将网络安全组应用于Web应用程序 ? Or can I add a Network Security Group to a Virtual Network ? 或者我可以将网络安全组添加到虚拟网络吗? Or is there another method that I'm overlooking? 还是有另一种我忽视的方法?
Thanks! 谢谢!
You can restrict IP addresses in the web.config using the ipSecurity element like so: 您可以使用ipSecurity元素限制web.config中的IP地址,如下所示:
<system.webServer>
<security>
<ipSecurity allowUnlisted="false">
<add ipAddress="XXX.XXX.XXX.XXX" allowed="true" />
</ipSecurity>
</security>
</system.webServer>
Full documentation on the ipSecurity element: https://www.iis.net/configreference/system.webserver/security/ipsecurity 有关ipSecurity元素的完整文档: https ://www.iis.net/configreference/system.webserver/security/ipsecurity
Azure Web App support for the feature: https://azure.microsoft.com/en-us/blog/ip-and-domain-restrictions-for-windows-azure-web-sites/ Azure Web App对该功能的支持: https : //azure.microsoft.com/en-us/blog/ip-and-domain-restrictions-for-windows-azure-web-sites/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.