This design connects your On-Premises network to Azure using an encrypted Site-to-Site (S2S) VPN.
Topology: The VPN Gateway sits in the Hub VNet. All Spoke VNets use this gateway to communicate with On-Premises. This design details the configuration of that connection.
+--------------+ +--------------------------+ +--------------+
| On-Premises | | HUB VNet | | SPOKE VNet |
| Router | | (10.0.0.0/16) | | (10.1.0.0/16)|
| (192.168.1.1)|<--------->| [VPN Gateway] |<--------->| [Workload] |
| | IPsec | (10.0.0.4) | Peering | |
+--------------+ Tunnel +--------------------------+ +--------------+
PRIMARY REGION (East US)
+-----------------------------------------------------------------------+
| HUB VNet: vnet-hub (10.0.0.0/16) |
| +-----------------------+ |
| | GatewaySubnet | |
| | (10.0.0.0/24) | |
| | [Local Network Gw] | (Represents On-Prem IP) |
| | [Virtual Network Gw]--|--(Connection)---> IPsec Tunnel |
| +-----------|-----------+ |
| | |
| v (Peering) |
+---------------|-------------------------------------------------------+
|
+---------------|-------------------------------------------------------+
| SPOKE VNet: vnet-spoke (10.1.0.0/16) |
| +-----------------------+ |
| | VM: vm-workload | |
| | (Routes 192.168.x.x | |
| | to Virtual Gw) | |
| +-----------------------+ |
+---------------|-------------------------------------------------------+
|
| (Config Replication)
v
+-----------------------------------------------------------------------+
| SECONDARY REGION (West US) - DR Site |
| |
| +-----------------------+ |
| | VPN Gateway (Standby) | |
| | (Not Connected) | |
| +-----------------------+ |
+-----------------------------------------------------------------------+
* Deploy a VPN Gateway in West US Hub.
* Do *not* connect it (to save cost/complexity) or keep it connected with high routing cost (BGP).
* In disaster, update On-Prem router to point to West US IP.
1. Spoke VM: Sends packet to 192.168.1.5 (On-Prem Server).
2. Peering: Packet routes to Hub Gateway (due to "Use Remote Gateway").
3. Gateway: Encrypts packet. Wraps in IPsec. Sends to On-Prem Public IP.
4. Internet: Packet traverses public internet.
5. On-Prem Router: Decrypts packet. Forwards to Server.
1. Ensure vnet-hub exists (Design 5).
2. Ensure GatewaySubnet exists in vnet-hub.
1. Search: "Local network gateways" -> + Create.
2. Name: lng-office.
3. Resource Group: rg-hub-prod.
4. Region: East US.
5. IP address: Enter your *Office Public IP* (e.g., 203.0.113.5).
* *Note: If you don't have a static public IP, you cannot do this step easily.*
6. Address Space: Enter your *Office Local Subnet* (e.g., 192.168.1.0/24).
7. Create.
1. Search: "Virtual network gateways" -> + Create.
2. Name: vpngw-hub.
3. Region: East US.
4. Gateway type: VPN.
5. VPN type: Route-based.
6. SKU: VpnGw1.
7. Virtual network: vnet-hub.
8. Public IP address: Create new pip-vpngw.
9. Create.
* *Warning: This takes 45 minutes.*
1. Go to vpngw-hub -> Connections -> + Add.
2. Name: Hub-to-Office.
3. Connection type: Site-to-site (IPsec).
4. Local network gateway: Select lng-office.
5. Shared key (PSK): Enter a strong password (e.g., Secret123!).
6. IKE Protocol: IKEv2.
7. Create.
1. Go to the Connection Hub-to-Office.
2. Download configuration (Top bar).
3. Device vendor: Select yours (e.g., Cisco, Ubiquiti, Generic).
4. Download.
5. Apply: Open the text file and apply the config to your local router.
1. Go to Connection. Status should change from Connecting to Connected.
2. Ping: From an Azure VM (10.0.x.x), ping an On-Prem Server (192.168.1.x).
3. It should reply.