Azure VPN Gateway

The Azure VPN Gateway connects your on‑premises networks to Azure through site‑to‑site VPN tunnels, point‑to‑site VPN, and VNet‑to‑VNet connections. It provides high‑availability, scalability, and built‑in security.

Getting Started

Prerequisites

Deploy a VPN Gateway

Use the Azure portal or Azure CLI to create a gateway.

# Azure CLI example
az network vnet create \
  --resource-group MyResourceGroup \
  --name MyVNet \
  --address-prefix 10.0.0.0/16 \
  --subnet-name GatewaySubnet \
  --subnet-prefix 10.0.255.0/27

az network public-ip create \
  --resource-group MyResourceGroup \
  --name MyGatewayIP \
  --allocation-method Dynamic

az network vnet-gateway create \
  --resource-group MyResourceGroup \
  --name MyVPNGateway \
  --public-ip-address MyGatewayIP \
  --vnet MyVNet \
  --gateway-type Vpn \
  --vpn-type RouteBased \
  --sku VpnGw1 \
  --location eastus

Key Features

FeatureDescription
Route‑Based VPNSupports dynamic routing and BGP.
Policy‑Based VPNStatic routing for legacy devices.
Active‑Active ModeHigh‑availability with two tunnels.
Point‑to‑Site (P2S)Secure remote access for individual devices.
VNet‑to‑VNetSecure connectivity between Azure VNets.
ExpressRoute IntegrationHybrid connectivity with private peering.

Pricing

Pricing varies by gateway SKU and usage. Refer to the Pricing page for detailed cost tables.

Configuration Guide

After deployment, configure the connection settings:

  1. Create a Local Network Gateway representing your on‑premises VPN appliance.
  2. Define a VPN Connection linking the Azure VPN Gateway and the Local Network Gateway.
  3. Download the generated VPN device configuration script.

Sample Local Network Gateway CLI

# Create local network gateway
az network local-gateway create \
  --resource-group MyResourceGroup \
  --name MyOnPremGateway \
  --gateway-ip-address 203.0.113.10 \
  --local-address-prefixes 10.1.0.0/16

Sample Connection CLI

# Create VPN connection
az network vpn-connection create \
  --resource-group MyResourceGroup \
  --name MyVPNConnection \
  --vnet-gateway1 MyVPNGateway \
  --shared-key MySharedKey123 \
  --local-gateway2 MyOnPremGateway

Frequently Asked Questions