azure - Azure 点到站点 VPN 下载中缺少 VpnClientSetupAMD64.exe
问题描述
我正在尝试设置我的第一个 Azure 点到站点 VPN。如果我没看错,我从这个 PowerShell 代码中得到的 URL:
$profile = New-AzVpnClientConfiguration -ResourceGroupName $ResourceGroup -Name $GWName -AuthenticationMethod "EapTls"
$profile.VPNProfileSASUrl
应该下载一个名为VpnClientSetupAMD64.exe的可执行文件,该可执行文件将位于下载的 zip 文件的WindowsAmd64文件夹中。该可执行文件应在本机 Win 10 1909 客户端上进行设置。
我得到的 zip 文件中没有任何可执行文件,也没有该目录。我只获取带有 VPN 客户端配置数据的 XML 和 OVPN 文件。
我还尝试在 VnetGW/point-to-site 页面上的 GUI Azure 门户中使用下载 VPN 客户端选择,我得到了相同的 zip 文件 - 仍然没有安装 exe。
我寻找一种方法来直接下载VpnClientSetupAMD64.exe文件或指定我得到的azurevpnconfig.xml文件作为设置 VPN 客户端的参数,但我没有看到任何适用的。
我了解我可以使用我拥有的信息手动配置 VPN 客户端,但这无法扩展。
有人可以给我任何指示吗?
解决方案
默认情况下,点到站点配置 UI 中Tunnel type
为OpenVPN(SSL)。在使用 PowerShell 生成文件之前,您应该选择VpnClientProtocol
SSTP和IKEv2或其中之一,因为它们用于Windows 客户端。所以你会得到VpnClientSetupAMD64.exe文件。您可以在此处获得更多详细信息。
您还可以参考创建 VPN 网关并使用 PowerShell 添加点到站点配置。
New-AzVirtualNetworkGateway -Name VNet1GW -ResourceGroupName TestRG1 `
-Location 'East US' -IpConfigurations $gwipconfig -GatewayType Vpn `
-VpnType RouteBased -GatewaySku VpnGw1 -VpnClientProtocol "IKEv2"
# Add the VPN client address pool
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName $RG -Name $GWName
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -VpnClientAddressPool $VPNClientAddressPool
# Create a self-signed root certificate
$cert = New-SelfSignedCertificate -Type Custom -KeySpec Signature `
-Subject "CN=P2SRootCert" -KeyExportPolicy Exportable `
-HashAlgorithm sha256 -KeyLength 2048 `
-CertStoreLocation "Cert:\CurrentUser\My" -KeyUsageProperty Sign -KeyUsage CertSign
# Export the root certificate to "C:\cert\P2SRootCert.cer"
# Upload the root certificate public key information
$P2SRootCertName = "P2SRootCert.cer"
$filePathForCert = "C:\cert\P2SRootCert.cer"
$cert = new-object System.Security.Cryptography.X509Certificates.X509Certificate2($filePathForCert)
$CertBase64 = [system.convert]::ToBase64String($cert.RawData)
$p2srootcert = New-AzVpnClientRootCertificate -Name $P2SRootCertName -PublicCertData $CertBase64
Add-AzVpnClientRootCertificate -VpnClientRootCertificateName $P2SRootCertName `
-VirtualNetworkGatewayname "VNet1GW" `
-ResourceGroupName "TestRG1" -PublicCertData $CertBase64
推荐阅读
- google-sheets - 谷歌表格查询多个范围
- python - 如何将每个绘制列的图例标签添加到多个散点图子图中?
- windows - 没有从 FormIO createForm() API 获得回调
- python - Tabula-py 不读取文件的全部数据
- java - “类型不匹配:无法从 double 转换为 int 错误”
- database - Flutter roodBundle.load() 未加载更新的资产
- angular - 通过 url 输入输入时,Angular 应用程序未正确引导
- python-3.x - Python中的最小距离算法
- android - 有没有办法获取安装应用程序的链接?
- c++ - CMake 错误:在构建 docker 映像时,源目录“/”似乎不包含 CMakeLists.txt