Lesson 4 of 6 Azure Networking Services

Connecting Networks with Azure VPN Gateway

This lesson explains Azure VPN Gateway, its site-to-site, point-to-site and network-to-network connections, and its high-availability options.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the purpose of Azure VPN Gateway.
  • Distinguish site-to-site, point-to-site and network-to-network connections.
  • Describe the high-availability options for VPN gateways.

What a VPN gateway is

A virtual private network (VPN) uses an encrypted tunnel within another network, typically the internet, to connect two or more trusted private networks. Traffic in the tunnel is encrypted to prevent eavesdropping and other attacks.

Azure VPN Gateway is a type of virtual network gateway, deployed in a dedicated subnet named GatewaySubnet in a virtual network. It sends encrypted traffic between the Azure virtual network and an on-premises location over the public internet, using the Internet Protocol Security (IPsec) and Internet Key Exchange (IKE) protocols. A virtual network can have only one VPN gateway, although that gateway can have several connections. The gateway's SKU determines its throughput and number of connections.

True or false

VPN gateway basics

Exam skills 2.2.5

Check the facts about Azure VPN Gateway.

Log in to try this activity Interactive activities are free with an account.

Connection types

VPN gateways support several kinds of connection. The following list describes them.

  • Site-to-site: connects an on-premises datacentre or office network to an Azure virtual network through a VPN device on-premises, so that the two networks behave as one.
  • Point-to-site: connects individual computers, such as a remote employee's laptop, to an Azure virtual network with VPN client software.
  • Network-to-network (VNet-to-VNet): connects two Azure virtual networks through VPN gateways, although virtual network peering is usually simpler for this.

VPN gateways can be route-based, which use routing to decide which tunnel carries a packet and are the preferred type for most scenarios, including point-to-site and coexistence with ExpressRoute, or policy-based, which use static address-prefix policies.

Sort into groups

Which VPN connection?

Exam skills 2.2.5

Choose the VPN connection type for each situation.

Log in to try this activity Interactive activities are free with an account.

High availability

Because a VPN connection is critical for hybrid workloads, Azure offers several ways to make it resilient:

  • Active/standby: by default, a gateway runs two instances; if the active one fails or is under maintenance, the standby takes over, typically within seconds for planned maintenance and within 90 seconds for unplanned disruption.
  • Active/active: both gateway instances have their own public IP addresses and tunnels, for faster failover.
  • ExpressRoute failover: a VPN connection can serve as a backup path for an ExpressRoute circuit.
  • Zone-redundant gateways: in regions with availability zones, gateway instances are spread across zones.
Match the pairs

Resilient VPN connections

Exam skills 2.2.5

Match each high-availability option with how it works.

Log in to try this activity Interactive activities are free with an account.
Worked example

Connecting a branch office

A company wants its branch office network to reach VMs in an Azure virtual network using private IP addresses. The traffic must be encrypted, the company accepts that it travels over the internet, and it wants a low-cost solution that can be set up this week. What should it use?

A site-to-site VPN with Azure VPN Gateway meets the requirements: it connects the branch network to the virtual network through an encrypted IPsec tunnel over the internet and can be configured quickly with an on-premises VPN device. ExpressRoute provides a private connection that does not use the internet, but it costs more and requires a connectivity provider, which typically takes longer to arrange. Point-to-site would connect individual computers rather than the whole branch network.

Check yourself

Which VPN connection type connects an individual laptop to an Azure virtual network?

Show answer

Point-to-site. Site-to-site connects whole networks.

Exam Tips

Remember for the exam

  • VPN Gateway sends encrypted IPsec traffic between Azure and on-premises over the public internet.
  • Site-to-site connects networks; point-to-site connects individual computers.
  • A VNet has one VPN gateway, deployed in GatewaySubnet; active/active and zone-redundant options increase availability.