Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Azure icon
Labs

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.*

Azure icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 45m
Published
Clock icon Sep 17, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Verify Lack of Connectivity between Virtual Machines

    1. Double-click the DFW VM connection.
    2. 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.
    3. In the DFW VM, open Remote Desktop Connection and attempt to connect to the NYC VM IP address of 10.1.0.4.
    4. Verify that you are unable to connect.
    5. (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.
  2. 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

    1. From the resource group, click Create to enter the Azure Marketplace.
    2. Search the Azure Marketplace for "Virtual Network Gateway".
    3. Click Create on the "Virtual Network Gateway" tile.
    4. 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.

    NOTE: Do not create the virtual network gateway. It is not necessary, as these have been pre-configured.

  3. Challenge

    Create RDP Connections

    1. Click the virtual machine named vm-dfw and copy the information needed to connect to the VM via RDP.
    2. Open up the remote desktop application and add a connection.
    3. Click the virtual machine named vm-nyc and repeat the process to add a connection via RDP.
  4. Challenge

    Create the Virtual Network Gateway Connections

    Configure the VNG-DFW VNet Gateway Connection

    1. From the provisioned VNG-DFW VNet gateway.
    2. 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
    3. Leave the rest as their defaults and click Review + create, then Create.

    Configure the VNG-NYC VNet Gateway Connection

    1. Navigate back to the resource group.

    2. Select the provisioned VNG-NYC VNet gateway.

    3. 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
    4. 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.

  5. Challenge

    Verify Connectivity between Virtual Machines

    1. In the DFW VM, open Remote Desktop Connection again and attempt to connect to 10.1.0.4.
    2. Verify that you are now able to connect.

    Optional:

    1. In the NYC VM, open Remote Desktop Connection again and attempt to connect to 10.0.0.4.
    2. Verify that you are now able to connect.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

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.

Start learning by doing today

View Plans