点对点和点对点networking之间的Azure路由

我是Azure的新手,尝试使用VPN将单个计算机连接到Azure上的虚拟机。 VM位于较新的资源pipe理器平台上。 不幸的是,只有经典的平台支持点对点。 所以我添加了一个经典的networking,并将两个networking连接到一个站点到站点的VPN。

VNet1(资源) – 10.0.0.0/23

VNet2(经典) – 10.0.10.0/23

VNet2网关也具有点对点的function。 点对点IP范围是192.168.0.0/24。

我在这里下载了我的机器上的VPN客户端,并连接到VPN。 我被分配了192.168.0.5。

VPN连接成功图片 (对不起,我不能直接发布图片)

所有的VPN连接似乎都在工作,但是我从这里看不到VNet1上的机器。 一个ping / tracert到10.0.0.4超时。

我find的一篇文章引用了为VPN连接添加一行到routes.txt的需求。 第一行已经在那里,我加了第二行,重新连接了VPN。

ADD 10.0.10.0 MASK 255.255.254.0默认METRIC默认IF默认

ADD 10.0.0.0 MASK 255.255.254.0默认METRIC默认IF默认

没有运气。 我检查了路由表,10.0.0.0路由在那里。

IPv4 Route Table Active Routes: Network Destination Netmask Gateway Interface Metric <snip> 10.0.0.0 255.255.254.0 On-link 192.168.0.7 28 10.0.1.255 255.255.255.255 On-link 192.168.0.7 266 10.0.10.0 255.255.254.0 On-link 192.168.0.7 28 10.0.11.255 255.255.255.255 On-link 192.168.0.7 266 <snip> 

我错过了什么?

谢谢!

微软昨天晚上在这里发布了资源pipe理器点对点连接的实际文章

(原文:不是直接回答你,而是根据这个[link] [1]

“使用Azure资源pipe理器部署模型创build的虚拟networking的点对点连接现在可以使用REST API和PowerShell”。 )

一名微软员工非常友善地发布了一个使用Azure资源pipe理器模型创build点对点VPN的脚本。 这个function在这个时候是没有logging的,但是这个脚本对我来说是个诡计! ( 原文 )

 # Must created a subnet called GatewaySubnet for the gateway to connect prior to creating the gateway $vnetname = "TestNetwork" $rgname = "TestRG" $region = "North Europe" $clientpool = "192.168.10.0/24" $RootCertName = "MyRootCert.cer" $publicCertData = "<Replace_With_Your_Base64_Cert_Data>"; #Export cert as Base64, and put data into single line. #Login to Azure RM Login-AzureRMAccount # Get the Virtual Network $vnet = Get-AzureRmVirtualNetwork -Name $vnetname -ResourceGroupName $rgname #Create IP for the gateway $GWIP = New-AzureRmPublicIpAddress -AllocationMethod Dynamic -ResourceGroupName $rgname -Location $region -Name GWIP1 #Get the gateway subnet $GWSubnet = Get-AzureRmVirtualNetworkSubnetConfig -Name GatewaySubnet -VirtualNetwork $vnet # Create GW Config $GWIPConfig = New-AzureRmVirtualNetworkGatewayIpConfig -Name GWIPConfig -SubnetId $gwsubnet.Id -PublicIpAddressId $GWIP.Id #Create Gateway $gw = New-AzureRmVirtualNetworkGateway -Location $region -Name GW1 -ResourceGroupName $rgname -GatewayType Vpn -IpConfigurations $GWIPConfig -VpnType RouteBased # Create client VPN config Set-AzureRmVirtualNetworkGatewayVpnClientConfig -VirtualNetworkGateway $gw -VpnClientAddressPool $clientpool # Create Root Cert $rootCert = Add-AzureRmVpnClientRootCertificate -VpnClientRootCertificateName $RootCertName -PublicCertData $publicCertData -VirtualNetworkGatewayName $gw.Name -ResourceGroupName $rgname #Get URL for VPN client - download the exe from here $packageUrl = Get-AzureRmVpnClientPackage -ResourceGroupName $rgname -VirtualNetworkGatewayName $gw.Name -ProcessorArchitecture Amd64