将 NSG 添加到应用程序网关子网

Pra*_*een 2 azure azure-application-gateway network-security-groups

我的要求很简单。我需要将 NSG 关联到包含我的应用程序网关的子网。

一旦我将 NSG 关联到此子网,我就会收到连接超时错误。

根据 Microsoft 的文档,我添加了端口范围 65503-65534 的例外。

来自https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-faq

应用程序网关子网上支持网络安全组 (NSG),但有以下限制:

对于应用程序网关 v1 SKU 的端口 65503-65534 和 v2 SKU 的端口 65200 - 65535 上的传入流量,必须设置例外。Azure 基础结构通信需要此端口范围。它们受到 Azure 证书的保护(锁定)。如果没有适当的证书,外部实体(包括这些网关的客户)将无法在这些端点上发起任何更改。

无法阻止出站互联网连接。

必须允许来自 AzureLoadBalancer 标记的流量。

我错过了什么吗?任何帮助将不胜感激。

4c7*_*b41 5

这是适合我的 nsg 应用程序网关排除规则示例:

    {
        "apiVersion": "2017-06-01",
        "name": "NameGoesHere",
        "type": "Microsoft.Network/networkSecurityGroups/securityRules",
        "location": "[resourceGroup().location]",
        "properties": {
            "description": "This rule is needed for application gateway probes to work",
            "protocol": "*",
            "destinationAddressPrefix": "*",
            "sourcePortRange": "*",
            "destinationPortRange": "65503-65534",
            "sourceAddressPrefix": "*",
            "access": "Allow",
            "priority": "literally any priority",
            "direction": "Inbound"
        }
    }
Run Code Online (Sandbox Code Playgroud)

尝试将具有此规则的 nsg 添加到应用程序网关子网,它将起作用。另外,请确保您没有使用 NSG 显式阻止从应用程序网关到后端的访问。