- Lab
- A Cloud Guru
Configuring an Azure VNet-to-VNet VPN Gateway (v2)
Virtual network gateways enable us to connect our on-premises network to an Azure datacenter. We can then extend our IT presence into the cloud by integrating Azure resources with our local Active Directory. A VPN gateway is a fast, secure way to start our organization's move to the cloud. In this hands-on lab, we connect one virtual network (VNet) to another in an Azure resource group. We then test connectivity between virtual machines located in each VNet. While this lab is completely contained in Azure, the procedure and concepts can be used for local network-to-Azure connectivity as well. >**Note:** *The lab has been updated with pre-deployed Azure virtual network gateways.*
Path Info
Table of Contents
-
Challenge
Verify Lack of Connectivity between Virtual Machines
- Double-click the DFW VM connection.
- Log in to the Azure portal using the credentials provided on the lab page. Be sure to use an incognito or private browser window to ensure you're using the lab account rather than your own.
- In the DFW VM, open Remote Desktop Connection and attempt to connect to the NYC VM IP address of
10.1.0.4
. - Verify that you are unable to connect.
- (Optional) You can test connectivity from the NYC virtual network by performing the previous steps using the VM in NYC. Log in to the VM in NYC and try to connect to the DFW VM using IP address
10.0.0.4
.
-
Challenge
OPTIONAL: Simulate Creating a New Virtual Network Gateway
Note: The lab environment already contains two pre-deployed virtual network gateways. This was done for student convenience, as these resources historically take 30–45 minutes to deploy. However, it is important to know how to deploy a virtual network gateway in Azure. This optional objective takes you through the process — but make sure you DO NOT create the virtual network gateway.
Simulate Creating a Virtual Network Gateway
- From the resource group, click Create to enter the Azure Marketplace.
- Search the Azure Marketplace for "Virtual Network Gateway".
- Click Create on the "Virtual Network Gateway" tile.
- Configure the VNet Gateway with following information:
- Project details:
- Subscription: Leave as default.
- Resource group: This is populated when the virtual network is configured.
- Instance details:
- Name: Enter vng-01.
- Region: Select East US.
- Gateway type: Select VPN.
- SKU: Leave the default selected.
- Generation: Leave the default selected.
- Virtual Network: Select to create a new virtual network named vnet-01.
- Subnet: Replace the name of the "default" subnet with "GatewaySubnet".
- Give "GatewaySubnet" an Address range of 10.2.0.0/24
- Public IP address: Select Create new.
- Public IP address name: Enter vng-pip-01.
- Enable active-active mode: Select Disabled.
- Availability Zone: Select Zone Redundant.
- Project details:
NOTE: Do not create the virtual network gateway. It is not necessary, as these have been pre-configured.
-
Challenge
Create RDP Connections
- Click the virtual machine named vm-dfw and copy the information needed to connect to the VM via RDP.
- Open up the remote desktop application and add a connection.
- Click the virtual machine named vm-nyc and repeat the process to add a connection via RDP.
-
Challenge
Create the Virtual Network Gateway Connections
Configure the
VNG-DFW
VNet Gateway Connection- From the provisioned
VNG-DFW
VNet gateway. - Add a connection with the following values:
- Name: dfw-to-nyc
- First virtual network gateway: VNG-DFW
- Second virtual network gateway: VNG-NYC
- Shared key (PSK): abc123
- Leave the rest as their defaults and click Review + create, then Create.
Configure the
VNG-NYC
VNet Gateway Connection-
Navigate back to the resource group.
-
Select the provisioned
VNG-NYC
VNet gateway. -
Add a connection with the following values:
- Name: nyc-to-dfw
- First virtual network gateway: VNG-NYC
- Second virtual network gateway: VNG-DFW
- Shared key (PSK): abc123
-
Leave the rest as their defaults and click Review + create, then Create.
Note: It may take around 10-20 minutes for the virtual network gateways to configure and establish their status as Connected. If the connection status has not refreshed, switching back and forth between Connections and another topic (e.g., Configuration) should properly refresh the connection status.
- From the provisioned
-
Challenge
Verify Connectivity between Virtual Machines
- In the DFW VM, open Remote Desktop Connection again and attempt to connect to
10.1.0.4
. - Verify that you are now able to connect.
Optional:
- In the NYC VM, open Remote Desktop Connection again and attempt to connect to
10.0.0.4
. - Verify that you are now able to connect.
- In the DFW VM, open Remote Desktop Connection again and attempt to connect to
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.