首页 文章

Azure ARM模板:在虚拟网络网关中设置点对站配置

提问于
浏览
0

I 'd like to set the '由模板创建的虚拟网络网关的地址池' property in the '点对站点“部分 . 这里的Azure门户设置
enter image description here
这里是模板

{
      "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"
          }
      }
  }

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”部分,您可以定义指向站点配置的点 . 此外,您还可以在此处添加证书引用 .

相关问题