为点到点VPN配置设置的azure命令是什么?
我正在寻找通过Portal执行这些步骤的代码中的az等效项:
- From the settings section for a Virtual network gateway
- Click on Point-to-site configuration settings
- Set address pool, tunnel type, authentication type, and a root certificate
- Save
- Download VPN Client (vpnconfig.ovpn file)发布于 2019-08-21 00:52:05
要通过Azure命令创建虚拟网络网关,可以遵循使用CLI创建基于路由的VPN网关。中的步骤。但是,当需要创建虚拟网络网关时,您应该添加更多的参数。
--address-prefixes
以空格分隔的表示P2S客户端地址空间的CIDR前缀列表。
--client-protocol
用于连接的协议。
接受值: IkeV2、OpenVPN、SSTP
所以完整的命令如下所示:
az network vnet-gateway create \
-n VNet1GW \
-l eastus \
--public-ip-address VNet1GWIP \
-g TestRG1 \
--vnet VNet1 \
--gateway-type Vpn \
--sku VpnGw1 \
--vpn-type RouteBased \
--address-prefixes 192.168.0.0/24 \
--client-protocol OpenVPN然后,您需要上传根证书的证书:
az network vnet-gateway root-cert create -g TestRG1 -n vpncliCert --gateway-name VNet1GW --public-cert-data path/to/your/certificate当一切正常时,您可以下载VPN客户端以供使用。不要忘记在您的计算机中安装根证书的客户端证书。
https://stackoverflow.com/questions/57582271
复制相似问题