Azure 应用程序网关中的拒绝名单客户端 IP

Denylist client IP in Azure Application Gateway

我们正在为我们的站点使用 Azure 应用程序网关,并且很少有人 抓取 我们的站点。我们想在网关级别阻止他们的 IP,因为我们不想在每个 Web 服务中配置相同的阻止。

我们找不到仅使用网关或其虚拟网络来阻止IP 的方法。有没有人有同样的问题,可以照亮我们的道路?

您可以在虚拟网络中部署应用程序网关。如果是这样,您将拥有此应用程序网关的专用子网。此子网只能包含应用程序网关。您可以 associate an NSG to this subnet. 如果是这样,您可以通过 NSG 中的入站或出站安全规则限制来自此应用程序网关子网的入站和出站流量。在这种情况下,您可以添加入站安全规则以将您客户的 IP 列入备选名单。

参考DOC,注:

Network Security Groups (NSGs) are supported on the application gateway subnet with the following restrictions:

Exceptions must be put in for incoming traffic on ports 65503-65534 for the Application Gateway v1 SKU and ports 65200 - 65535 for the v2 SKU. This port-range is required for Azure infrastructure communication. They are protected (locked down) by Azure certificates. Without proper certificates, external entities, including the customers of those gateways, will not be able to initiate any changes on those endpoints.

Outbound internet connectivity can't be blocked.

Traffic from the AzureLoadBalancer tag must be allowed.

希望对您有所帮助。