How to Connect Azure Virtual Networks via VPN

NOTE: The subnet gateway address ranges must belong to the address space defined for their respective virtual networks. In addition, the gateway subnets cannot overlap any existing subnets defined in the respective virtual networks.

Once the gateway subnets were deployed, I went in and deployed my Virtual Network Gateways. I called the first Virtual Network Gateway "vNet1-vNet2", gave it a Gateway Type of "VPN", and an VPN Type of "Route-Based". I assigned my vNet1 network as the Virtual Network for this gateway and created a new public IP address for the gateway and named it "vNet1-vNet2-PublicIP".

After deploying the first Virtual Network Gateway for vNet1, I deployed another Virtual Network Gateway for vNet2. I called this Virtual Network Gateway "vNet2-vNet1", gave it a Gateway Type of "VPN", and an VPN Type of "Route-Based". I assigned my vNet2 network as the Virtual Network for this gateway and created a new public IP address for the gateway and named it "vNet2-vNet1-PublicIP".

NOTE: The Virtual Network Gateways can take as long as 45 minutes to completely deploy so be patient and make sure they have been deployed before trying to connect them.

I waited abut 25 minutes for my gateways to deploy. Once deployed, I established the VPN connectivity by deploying a "Connection" resource in Azure. When configuring the connection, I assigned my "vNet1-vNet2" gateway as the first gateway and my "vNet2-vNet1" gateway as the second gateway. To establish bi-directional connectivity between the two networks, I checked the "Establish bidirectional connectivity" box and named the first connection "vNet1-vNet2" and the second connection "vNet2-vNet1". After providing a shared key value, I clicked OK to deploy the Connection.

Click here to join the Understanding Azure Facebook group or here for the latest Azure practice questions, answers, explanations, and reference materials.

Thomas Mitchell

Tom is a 20+ year veteran of the IT industry and carries numerous Microsoft certifications, including the MCSE: Cloud Platform and Infrastructure certification. A Subject Matter Expert in Active Directory and Microsoft Exchange, Tom also possesses expert-level knowledge in several other IT disciplines, including Azure, Storage, and O365/Exchange Online. You can find Tom at his website, on LinkedIn, or on Facebook. Need to reach him by phone? Call 484-334-2790.