A VPN gateway is a managed network endpoint that connects a cloud virtual network to on-premises data centers, branch offices or remote users through encrypted tunnels over the public internet. In Cloud networking, it is the most common way to extend a VPC privately to existing infrastructure without leasing a dedicated physical circuit.
Cloud providers offer VPN gateways as fully managed services: the provider runs redundant tunnel endpoints, while the customer configures peer addresses, routing and encryption parameters. The gateway typically uses IPsec with IKEv2 for site-to-site links and TLS or IPsec for point-to-site client access.
How a VPN gateway builds encrypted tunnels
A VPN gateway establishes IPsec security associations with a peer device, usually a firewall or router at the customer site, and then encapsulates traffic between the two networks inside encrypted packets. The negotiation runs in two phases: IKE phase 1 authenticates the peers and creates a protected control channel, and IKE phase 2 creates the child security associations that carry user data.
Each packet leaving the virtual network is encrypted, given a new outer header addressed to the peer’s public IP address, and sent across the internet. The receiving side decrypts it and forwards the inner packet to its local destination. Because of this encapsulation, both networks behave as if joined by a private link, although the transport is shared.
The table below lists the main parameters that both ends of a site-to-site tunnel must agree on.
| Parameter | Typical values | What it affects |
|---|---|---|
| IKE version | IKEv2 preferred, IKEv1 for legacy peers | Negotiation reliability and features |
| Encryption algorithm | AES-256-GCM, AES-128-GCM | Confidentiality and throughput |
| Integrity algorithm | SHA-256 or SHA-384 | Tamper detection |
| Diffie-Hellman group | Group 14, 19, 20 or 21 | Strength of key exchange |
| Authentication | Pre-shared key or certificate | Peer identity assurance |
| SA lifetime | About 1 to 8 hours | Frequency of rekeying |
A mismatch in any of these parameters is the most frequent reason a tunnel fails to come up. Providers publish supported combinations, and the on-premises device must be configured to match them exactly.
Site-to-site, point-to-site and routing options
VPN gateways support two main connection types: site-to-site, which links entire networks, and point-to-site or client VPN, which connects individual devices. They also differ in how routes are exchanged, either through static routes or through dynamic routing with BGP.
The following table compares the connection and routing variants and when each applies.
| Variant | Connects | Best suited for |
|---|---|---|
| Site-to-site, static | Network to network with fixed prefixes | Small sites with stable address ranges |
| Site-to-site, BGP | Network to network with dynamic routes | Multiple sites and automatic failover |
| Point-to-site | Single device to virtual network | Remote administrators and developers |
| Policy-based | Traffic matched by selectors | Legacy firewalls that require it |
| Route-based | Traffic routed into a tunnel interface | Most modern cloud deployments |
Route-based tunnels with BGP are the recommended default for production, because routes update automatically when prefixes change and traffic shifts to a surviving tunnel when one fails. Providers generally assign each tunnel a link-local inside address range for the BGP session.
VPN gateway compared with other cloud connectivity
A VPN gateway is the fastest and cheapest hybrid connectivity option, but it is not the only one. Dedicated private circuits, often called Cloud interconnect, and hub services such as a Transit gateway solve related problems with different trade-offs.
The comparison below places the VPN gateway beside its closest neighbors in cloud networking.
| Option | Transport | Typical bandwidth | Main trade-off |
|---|---|---|---|
| VPN gateway | Encrypted tunnels over the internet | About 1.25 Gbps per tunnel | Variable latency, quick to deploy |
| Cloud interconnect | Dedicated physical circuit | 1 to 100 Gbps | Predictable performance, weeks to provision |
| VPC peering | Provider backbone | Not limited by a gateway | Links cloud networks only, no transit |
| Transit gateway | Provider backbone hub | High aggregate capacity | Central routing, separate hourly and data charges |
Many enterprises combine options: a dedicated circuit as the primary path and a VPN gateway as an encrypted backup. Some also run IPsec over the dedicated circuit when regulations require encryption on every link.
Designing a resilient VPN gateway deployment
A resilient design removes every single point of failure: two tunnels per connection, two customer devices where possible, and dynamic routing that detects failure within seconds. Most providers already place their side of the tunnels in separate zones, so the weakest link is usually the on-premises end.
The decision table below matches common requirements with a suitable design choice.
| Requirement | Recommended design | Reason |
|---|---|---|
| High availability | Active-active tunnels with BGP | Traffic continues if one tunnel drops |
| Throughput above one tunnel | Equal-cost multipath across tunnels | Aggregates bandwidth of several tunnels |
| Many VPCs to connect | Terminate VPN on a transit hub | Avoids one gateway per VPC |
| Remote workforce access | Point-to-site with identity provider | Per-user authentication and revocation |
| Overlapping address ranges | Renumber or apply NAT | Routing cannot resolve duplicate prefixes |
Address planning deserves attention before deployment. Overlapping CIDR ranges between the cloud and on-premises networks are a common blocker, and fixing them after systems are live is far more expensive than reserving distinct ranges at the start.
Limitations and frequent mistakes
The main limitation of a VPN gateway is that it rides on the public internet, so latency and jitter vary with conditions outside the provider’s control. Per-tunnel throughput caps and encryption overhead also make it unsuitable for sustained multi-gigabit replication.
- MTU and MSS issues: encapsulation adds overhead, so packets near 1,500 bytes may fragment or drop unless the MSS is clamped to about 1,350 to 1,380 bytes.
- Single tunnel configured: many outages occur because only one of the two provided tunnels was set up on the customer device.
- Weak cryptography: keeping IKEv1 or old Diffie-Hellman groups for convenience weakens the whole link.
- Missing route propagation: the tunnel is up, but subnet route tables do not point traffic toward the gateway.
- Firewall rules forgotten: Security group and network ACL rules must still allow the on-premises prefixes.
Monitoring should cover tunnel state, BGP session state and bytes transferred, with alerts on any tunnel that stays down. A tunnel that silently fails leaves the connection running without redundancy until the second tunnel also fails.
A plain-language summary
A VPN gateway is a secure doorway between a company’s network in the cloud and its offices or employees elsewhere. Data travels over the ordinary internet, but it is locked inside an encrypted envelope that only the two ends can open.
It is a bit like sending valuables through the regular postal service inside a sealed, tamper-proof box. The roads are public, but nobody along the way can see or change what is inside. The key benefit is a private connection without building a private road.
An example from practice
A regional insurance company moves its claims application to a cloud VPC but keeps its document archive in its own data center. The network team needs a private link within two weeks, far faster than a dedicated circuit could be ordered.
The team deploys a managed VPN gateway and configures two route-based IPsec tunnels with BGP to a pair of on-premises firewalls, using AES-256-GCM, SHA-256 and Diffie-Hellman group 20. They clamp the TCP MSS to 1,360 bytes and set alerts on tunnel and BGP state.
The connection goes live in three days. Claims staff retrieve archived documents with latency of roughly 15 to 25 milliseconds, and during a planned firewall upgrade traffic fails over to the second tunnel without users noticing. The company later adds a dedicated circuit and keeps the VPN gateway as its encrypted backup path.