Establishing VPN Gateway Connection Between VNet To VNet

In this article, you will learn how to establish VPN gateway connection between VNet to VNet.

Introduction

 
To establish the connection between two virtual networks there are several methods. In this demo we will learn how to establish VPN gateway connection between two Virtual Networks.
 
In the lab scenario, I have already configured Virtual Networks and Virtual Machines
 
Site-1 Environment
  • Site 1 – Resource Group

    • VNet Name – Site1VNet
      • Address Space – 20.0.0.0/16
      • Subnet – 20.0.0.0/24
    • Virtual Machine Name – Site1VM

      Establishing VPN Gateway Connection Between VNet To VNet
Site-2 Environment
  • Site 2 – Resource Group

    • VNet Name – Site2VNet
      • Address Space – 30.0.0.0/16
      • Subnet – 30.0.0.0/24
    • Virtual Machine Name – Site2VM

      Establishing VPN Gateway Connection Between VNet To VNet
Step 1 - Creating the Gateway Subnet in Site-1
 
Click the Site-1 Resource Group and then select Virtual Network, in this demo our Virtual Network is "Site1VNet". In the Site1VNet Select "Subnets" under the Settings. In the Subnets Click "Gateway Subnet" and then enter the "Address Range (CIDR Block)" and then Click Ok.
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 2
 
Creating the Gateway Subnet in Site-2 (Follow Step 1),
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
 
Step 3 - Configuring Virtual Network Gateway
 
In the Site-1 Resource Group Click “+Add” to enter the Marketplace.
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 4
 
Search the Virtual Network Gateway and then click the “Create” button.
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 5 - Deploying the Virtual Network Gateway in Site 1
 
Enter the name for Virtual Network Gateway in this demo, our name is "Site1Gw", and then select the Virtual Network (Site1VNet), and create the new Public IP address (Site1-IP) and click "Create+Review"
 
Establishing VPN Gateway Connection Between VNet To VNet
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 6
 
Deploying the Virtual Network Gateway in Site 2 (Follow Step 5).
 
Establishing VPN Gateway Connection Between VNet To VNet
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 7
 
Open the Site-1 Resource group and then click the Virtual Network Gateway “Site1Gw”.
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 8
 
In the Virtual Network Gateway, Click “Connections” and then click “Add”.
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 9
 
In the Add connection our connection name is “Site1-to-Site2”, Connection type is “VNet-to-VNet”. Now we need to select second Virtual Network Gateway, so click “Choose another virtual network gateway” and then select “Site2Gw”.
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
After selecting the Gateway, enter the “Shared key” and click “Ok”.
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 10
 
Creating the Connection (Follow Step 9),
 
Name: Site2-to-Site1
Second virtual network gateway: Site1Gw
Shared key: Enter the same key that we entered on Site-1 Connection
 
Establishing VPN Gateway Connection Between VNet To VNet 
 
Step 11
 
Verifying the Connection,
 
Establishing VPN Gateway Connection Between VNet To VNet
 
Establishing VPN Gateway Connection Between VNet To VNet
 

Summary

 
In this demo, we have learned how to deploy a VPN network gateway connection between VNet to VNet Connection. If you have any questions feel free to comment under the article.