如何使用Azure App Service/Web App限制IP地址

编程入门 行业动态 更新时间:2024-10-25 20:27:21
本文介绍了如何使用Azure App Service/Web App限制IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

web.config中的ipSecurity部分是否可以与Azure App Services一起使用?

Does the ipSecurity section in web.config works with Azure App Services?

如何使用Azure上托管的Web应用程序设置简单的IP地址阻止(黑名单)?

What are the steps to get a simple IP address blocking (black list) set up with a web app hosted on Azure?

推荐答案

App Service在网络连接> IP限制

App Service provides UX for this under Networking > Ip Restrictions

您可以在此处阻止特定的IP地址或地址范围:

From here you can block a specic ip address or a range of address:

如果要通过web.config进行操作,则需要使用XDT转换

If you want to do it through web.config you will need to use XDT Transforms

<?xml version="1.0"?> <configuration xmlns:xdt="schemas.microsoft/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>

您可以在此处了解有关XDT转换和应用程序服务的更多信息: github/projectkudu/kudu/wiki/Xdt-transform-samples

You can read more about XDT transforms and app service here: github/projectkudu/kudu/wiki/Xdt-transform-samples

更多推荐

如何使用Azure App Service/Web App限制IP地址

本文发布于:2023-08-01 16:38:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1269914.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   地址   Azure   Service   App

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!