首页 > 解决方案 > 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 客户端,但这无法扩展。

有人可以给我任何指示吗?

标签: azurepowershellazure-vpn

解决方案


默认情况下,点到站点配置 UI 中Tunnel typeOpenVPN(SSL)。在使用 PowerShell 生成文件之前,您应该选择VpnClientProtocolSSTPIKEv2其中之一,因为它们用于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

推荐阅读