0

我想在由模板创建的虚拟网络网关的“点到站点”部分中设置“地址池”属性。这里是 Azure 门户中的设置 在此处输入图像描述 这里是模板

{
      "apiVersion": "2015-06-15",
      "name": "[variables('gateway').name]",
      "type": "Microsoft.Network/virtualNetworkGateways",
      "location": "[parameters('aseLocation')]",
      "dependsOn": [
          "[variables('virtualNetworkSubnet').name]",
          "[variables('publicIpVnGateway').name]"
      ],
      "properties": {
          "gatewayType": "Vpn",
          "ipConfigurations": [
              {
                  "name": "default",
                  "properties": {
                      "privateIPAllocationMethod": "Dynamic",
                      "subnet": {
                          "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetwork').name, variables('virtualNetworkSubnet').name)]"
                      },
                      "publicIpAddress": {
                        "id": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', variables('publicIpVnGateway').name)]"
                      }
                  }
              }
          ],
          "enableBgp": false,
          "vpnType": "RouteBased",
          "sku": {
              "name": "Standard",
              "tier": "Standard"
          }
      }
  }
4

1 回答 1

0

是的,您可以使用以下属性来执行此操作:

            "properties": {
              "ipConfigurations": [
                {
                  "properties": {
                    "privateIPAllocationMethod": "Dynamic",
                    "subnet": {
                      "id": ""
                    },
                    "publicIPAddress": {
                      "id": ""
                    }
                  },
                  "name": "vnetGatewayConfig"
                }
              ],
              "gatewayType": "VPN",
              "vpnType": "RouteBased",
              "enableBgp": false,
              "activeActive": false,
              "vpnClientConfiguration": {
                "vpnClientAddressPool": {
                    "addressPrefixes": [
                        "<ip_address>"
                    ]
                },
                "vpnClientProtocols": [
                    "SSTP",
                    "IkeV2"
                ]
            },
              "sku": {
                "name": "<sku>",
                "tier": "<sku>",
                "capacity": "2"
              }
            }

通过插入“vpnClientConfiguration”部分,您可以定义指向站点配置的点。此外,您还可以在此处添加证书参考。

于 2019-01-28T21:17:46.820 回答