Steps to create VNET-to-VNET VPN using Azure Portal
In this blog, we will show you the Steps to create VNET-to-VNET VPN using Azure portal.
REQUIREMENTS
- Microsoft Azure Subscription
- Azure VM’s for testing
OVERVIEW
- In this demo, We are creating two resource group named AZ-US and AZ-India. AZ-US group location will be south central US and AZ-India group location will be South India.
- Two virtual networks will be created under this group.
- Create a Virtual network gateway and make the connection between US and India virtual networks.
CREATING RESOURCE GROUPS
- Open the Azure portal and click on resource groups link in the services link.
- Click on Add Button.
- Provide the Resouce Group name, subscription and Resource Group location and click Create.
- Repeat the above steps to create another resource group named AZ-India.
- New resource groups are created successfully.
CREATING VIRTUAL NETWORK FOR AZ-US
- From the Azure portal, Click on Virtual Networks.
- Click on Add button.
- We use 10.0.0.0/16 network for AZ-US network. Provide the required information click Create button.
- AZ-US-VNET deployed successfully.
- Click on the AZ-US-VNET and select the subnets option.
- Select the Gateway subnet option.
- We need to create a Gateway subnet before creating the VPN Gateway. Verify your network requirements and assign the address range to the gateway subnet accordingly. We use the 10.0.1.0/24 address range for this demo.
- New gateway subnet is available on the list.
CREATING VIRTUAL NETWORK FOR AZ-INDIA
- From the Azure portal, Click on Virtual Networks.
- Click on Add button.
- We use 192.168.0.0/16 network for AZ-India network. Provide the required information and click Create.
- After successful creation, click on the AZ-India-VNET and select subnets option.
- Click on Gateway Subnet option.
- We use 192.168.1.0/24 subnet for this demo. Click Ok to create a new gateway subnet for AZ-India-VNET.
- Gateway Subnet is available on the list.
CREATING VIRTUAL NETWORK GATEWAY FOR AZ-US NETWORK
- From the Azure portal, Click on More services and type virtual network gateway in the search box. Click on it.
- To create a new Virtual Network Gateway, Click the Add button.
- Provide a name Name for this gateway then select the Gateway type as VPN and VPN type as Route-based. We select the SKU type as VpnGw1. To learn more about these terms, please check the URL https://www.assistanz.com/azure-vpn-overview/
- Select the AZ-US network under virtual network section.
Note : The Virtual Network option will be greyed out if the Gateway Subnet was not created properly.
- Create a new public IP or select the existing one for this virtual network gateway.
- Select the Location and click on Create button.
- It will take 45 minutes to create a virtual network gateway.
- Virtual Network Gateway for AZ-US was deployed successfully.
- New public IP was assigned to this gateway.
CREATING VIRTUAL NETWORK GATEWAY FOR AZ-INDIA NETWORK
- From the Virtual Network Gateway, Click on Add button and provide the required information. Also, select the AZ-India Virtual network for this new gateway.
- Create a public IP address or select the existing one.
- Select the location and click on create button.
- It will take 45 minutes to complete the deployment.
- Deployment completed successfully.
CREATING CONNECTION BETWEEN AZ-INDIA AND AZ-US
- From the Virtual network gateway, Click on AZ-India-Gateway and select connections option.
- Click on Add button.
- Provide a name for this connection and leave the default connection type (Vnet-to-Vnet).
- Choose the second network to which connection will be initiated.
- Provide a shared key and this will be used later while creating the connection between AZ-US-VNET to AZ-India-VNET. We used Password01 as shared key for this demo.
- Click OK to create a connection between India and US V-NET.
- The connection created successfully.
CREATING CONNECTION BETWEEN AZ-US TO AZ-INDIA
- From the virtual network gateway, Click on AZ-US-Gateway.
- Click on Connections option.
- Click on Add button.
- Provide the required information and select the secondary gateway as AZ-India-Gateway.
- Provide the shared key which we used to create earlier connection and click OK.
- The connection created successfully.
VERIFICATION
- We have created one VM under each virtual network(AZ-India-VNET and AZ-US-VNET) named AZ-India-VM and AZ-US-VM.
- The IP Address of AZ-India-VM is 192.168.0.4
- The IP Address of AZ-US-VM is 10.0.0.4.
- For demo purpose, we created a shared folder named Remoteshare in AZ-India-VM.
- We are able to access the shared folder from AZ-US-VM.
- You can also see the data in and data out in the virtual network gateway connection tab.
Related Links:
https://www.assistanz.com/azure-vpn-overview/
https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet#create-subnet
https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-gateway-settings
VIDEO
Thanks for reading this blog. We hope it was useful for you to learn about VNET-to-VNET VPN using Azure Portal.