1

I'm new to Azure and trying to use VPN to connect a single machine here to a VM on Azure. The VM is on the newer Resource Manager platform. Unfortunately, only the classic platform supports point-to-site. So I added a classic network and connected both networks with a site-to-site VPN.

VNet1 (Resource) - 10.0.0.0/23

VNet2 (Classic) - 10.0.10.0/23

The VNet2 Gateway also has point-to-site enabled. Point-to-site IP range is 192.168.0.0/24.

I downloaded the VPN client on my machine here and connected to the VPN. I'm assigned 192.168.0.5.

VPN Connection Successful Image (sorry, I can't post the image directly)

All VPN connections appear to be working, but I cannot see machines on VNet1 from here. A ping/tracert to 10.0.0.4 times out.

One article I found referenced the need for adding a line to the routes.txt for the VPN connection. The first line was already there, I added the second one and re-connected the VPN.

ADD 10.0.10.0 MASK 255.255.254.0 default METRIC default IF default

ADD 10.0.0.0 MASK 255.255.254.0 default METRIC default IF default

No luck. I checked the route table and the 10.0.0.0 routing is in there.

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>

What am I missing?

2 Answers 2

2

Thanks!

The actual article for a Point-to-Site connection for Resource Manager was published by Microsoft last night to here

(Original text: Not a direct answer for you, but according to this [link][1]

"Point-to-Site connections for virtual networks created using the Azure Resource Manager deployment model are now available using REST APIs and PowerShell." )

2
  • I've upvoted you for leading me in the right direction. Posted the full solution below. (Unfortunately my upvotes don't count yet) Jan 12, 2016 at 0:19
  • Thanks for the updated link. I've changed your answer to the accepted answer since this is the full tutorial. Jan 14, 2016 at 1:31
2

A Microsoft employee was kind enough to post a script for creating a point-to-site VPN using Azure Resource Manager model. The feature is undocumented at this time, but this script did the trick for me! (Original Post)

# 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  

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .