Cloud VPN Architecture: How Site-to-Site Tunnels Work

Cloud VPN Architecture: How Site-to-Site Tunnels Work

Cloud VPN Architecture: How Site-to-Site Tunnels Work

Cloud VPN Architecture: How Site-to-Site Tunnels Work

Somewhere around 2018, a global manufacturer discovered its factory floor sensors were sending production data across the open internet with no encryption at all. The fix took three weeks and a single managed IPsec tunnel. Stories like this explain why cloud VPN architecture has become one of the most practical networking skills in modern infrastructure work. It is not glamorous. It is not new. But when a data center needs to talk to a virtual private cloud without exposing traffic to the public internet, the architecture underneath that connection decides whether things work smoothly or fail at 2 a.m.

This article walks through how cloud VPN architecture is structured, where the design decisions actually bite, and what separates a tunnel that stays up for years from one that drops every Tuesday.

What cloud VPN architecture actually means

A cloud VPN is a managed IPsec tunnel that connects a cloud provider’s virtual network to something outside it: an on-premises data center, a branch office, or another cloud. The provider handles the gateway hardware and software. The customer handles the peer device on the other end and the routing logic that decides which traffic goes through the tunnel.

That split of responsibility is the single most important thing to understand. The cloud side is a managed service with published limits and configuration templates. The on-premises side is whatever firewall, router, or virtual appliance the organization already owns. Most cloud VPN failures trace back to mismatched settings across that boundary, not to the cloud gateway itself.

Under the hood, the tunnel is built on IPsec, a suite of protocols standardized by the IETF. The current key exchange standard, IKEv2, handles negotiation and rekeying, while the Encapsulating Security Payload protocol handles encryption and integrity for the data itself. According to NIST’s guide to IPsec VPNs, the architecture separates the control plane (key negotiation) from the data plane (encrypted payload), which is why a tunnel can stay up while keys rotate invisibly in the background.

The core building blocks

The core building blocks

Every cloud VPN architecture, regardless of provider, contains the same handful of components.

The cloud VPN gateway

This is the provider-managed endpoint. It terminates IPsec tunnels, holds the public IP address the on-premises device connects to, and forwards decrypted traffic into the virtual network. Most providers offer two gateway SKUs or performance tiers, and the tier determines bandwidth ceiling and tunnel count.

The customer gateway

This is the on-premises side, or a software appliance representing it. Its configuration must match the cloud gateway on encryption algorithms, key lifetimes, and authentication method. A single mismatched parameter, such as a Diffie-Hellman group or a phase-2 lifetime, will cause the tunnel to fail negotiation while both sides report healthy status.

Tunnels and redundancy

Production architectures use at least two tunnels per connection, often terminating on two separate cloud gateway instances in different availability zones. This is where cloud VPN design diverges from older on-premises VPN thinking. A single tunnel is a single point of failure, and providers publish explicit guidance to run redundant tunnels with dynamic routing so failover happens automatically.

Routing

There are two models. Static routing means the customer manually lists the remote subnets on both sides. It is simple and predictable but breaks the moment a network segment is added. Dynamic routing uses BGP to exchange routes automatically, supports failover, and is the right choice for anything beyond a small, stable network. In practice, teams that start with static routing almost always migrate to BGP within a year.

Site-to-site versus point-to-site

Cloud VPN architecture splits into two patterns, and confusing them is a common early mistake.

Feature Site-to-site Point-to-site
Connects Network to network Individual device to network
Typical client Firewall, router, virtual appliance Laptop, phone, developer machine
Routing Static or BGP Client address pool
Scale Fixed number of tunnels Many concurrent users
Common use Data center to VPC, hybrid cloud Remote access, admin access

Site-to-site is infrastructure. Point-to-site is people. A hybrid cloud design usually needs both, and they are configured as separate resources even within the same provider. The access-control logic is also different: point-to-site typically relies on certificate-based authentication per user, while site-to-site relies on pre-shared keys or certificate authentication between gateways.

How a tunnel is established, step by step

The negotiation sequence is worth understanding because most troubleshooting happens here.

  • Phase 1 (IKE SA): both gateways authenticate each other and agree on encryption, hashing, and a Diffie-Hellman group. They establish a secure channel for further negotiation.

  • Phase 2 (IPsec SA): inside that channel, they negotiate the actual data encryption parameters and the traffic selectors, which define which subnets are allowed through.

  • Route exchange: with BGP, the peers now exchange reachable prefixes. With static routing, the routes were already configured and simply become active.

  • Data flow: traffic matching the selectors is encrypted, encapsulated, and sent to the peer’s public IP.

  • Rekeying: keys rotate on a schedule. A lifetime mismatch between peers is a classic cause of tunnels that drop at regular intervals.

That last point deserves emphasis. If one side proposes a phase-2 lifetime of 3,600 seconds and the other insists on 28,800, the tunnel may come up and then fail at the first rekey. The tunnel looks fine until it suddenly isn’t. Checking lifetime settings is the first thing an experienced engineer does when a connection drops on a predictable schedule.

Where cloud VPN architecture fits in a hybrid stack

Cloud VPN is one option among several for connecting environments, and choosing well matters.

Cloud VPN runs over the public internet with IPsec encryption. It is cheap, deploys in minutes, and works anywhere with an internet connection. Its weakness is variability: latency and packet loss depend on the paths between the two endpoints, which nobody controls.

Dedicated interconnect services provide private, physically separate links into a cloud provider. They offer predictable latency and higher bandwidth, but cost significantly more and take weeks or months to provision.

SD-WAN overlays often sit on top of cloud VPN tunnels, adding application-aware routing and policy across many sites. This is increasingly common in multi-cloud environments, where a single organization may run workloads across several providers.

For organizations comparing providers, the gateway feature sets and bandwidth tiers differ more than marketing suggests. A broader comparison of AWS vs Azure vs Google Cloud in 2026 helps frame which gateway options and redundancy models each platform offers before committing to a topology.

Practical configuration tips that save real time

These come from the patterns that repeatedly cause trouble in production deployments.

Match parameters exactly, then verify. Pre-shared keys, encryption algorithms, hashing, DH groups, and lifetimes must match on both sides. Copy them from a single source of truth rather than retyping them into two consoles.

Use BGP from day one. Even for a small network, dynamic routing eliminates an entire class of “why isn’t this subnet reachable” tickets. It also enables automatic failover between redundant tunnels.

Test failover deliberately. Bring down the primary tunnel during a maintenance window and confirm traffic moves. Redundancy that has never been tested is a hypothesis, not a control.

Watch the bandwidth ceiling. Each gateway tier has a published throughput limit. Encryption and decryption consume CPU on the on-premises device too, and an undersized firewall becomes the bottleneck long before the cloud gateway does.

Log both sides. Cloud-side tunnel logs and on-premises firewall logs tell different halves of the same story. Correlating timestamps across them is the fastest route to root cause.

Document the traffic selectors. Overly broad selectors, such as 0.0.0.0/0 on both sides, cause asymmetric routing and confusing failures. Be specific about which subnets cross the tunnel.

For teams also managing remote access alongside site-to-site links, understanding the difference between a VPN and a proxy clarifies which tool belongs where. Cloud VPN architecture is about network-to-network encryption; proxies and consumer VPN clients solve a different problem entirely, and mixing the concepts leads to designs that are either overbuilt or insecure.

Security considerations beyond encryption

Encryption is the floor, not the ceiling. A well-designed cloud VPN architecture adds several layers.

Least-privilege routing. Only route the subnets that genuinely need to cross the tunnel. A flat design that exposes every internal segment to the cloud increases blast radius if either side is compromised.

Strong authentication. Pre-shared keys are convenient but static and shared. Certificate-based authentication with rotation is stronger, and many providers support it on both site-to-site and point-to-site connections.

Segmentation on the cloud side. Use security groups, network ACLs, and separate subnets so that tunnel traffic lands in a controlled zone rather than directly beside sensitive workloads.

Monitoring and alerting. Tunnel status, byte counts, and BGP session state should feed into monitoring with alerts on state changes. Silent tunnel flaps are common and easy to miss without explicit checks.

The broader cloud security model matters here too. As providers push more processing into confidential computing environments, the trust boundaries around network traffic shift. A look at Apple’s private cloud compute and its Google Cloud arrangement in 2026 illustrates how seriously large operators now treat the path between customer data and cloud infrastructure, a mindset that applies equally to VPN design.

Common mistakes and how to avoid them

The same handful of errors appear again and again in cloud VPN deployments.

  • One tunnel, no redundancy. A single tunnel means a single maintenance event takes down the link.

  • Static routing that nobody updates. New subnets silently become unreachable.

  • Mismatched lifetimes. Tunnels that drop on a schedule almost always trace here.

  • Ignoring MTU. IPsec encapsulation adds overhead. Path MTU discovery problems cause connections that work for small packets and hang on large ones, a famously frustrating symptom.

  • No change control on the on-premises side. A firewall firmware update that resets IPsec proposals can take down a working tunnel with no cloud-side change at all.

  • Assuming the cloud gateway is the bottleneck. It usually isn’t.

Conclusion

Cloud VPN architecture is less about exotic technology and more about disciplined configuration. The components are stable, the protocols are mature, and every major provider documents its gateway behavior in detail. What separates reliable deployments from fragile ones is redundancy, dynamic routing, exact parameter matching, and a habit of testing failover before it is needed. Teams that treat the tunnel as production infrastructure, with monitoring, change control, and documented selectors, get years of quiet operation. Teams that treat it as a one-time setup task get the 2 a.m. page. The architecture itself is straightforward; the discipline around it is what actually keeps the connection alive.

Frequently asked questions

What is the difference between a cloud VPN and a traditional VPN?

A traditional VPN typically connects individual users to a corporate network. A cloud VPN connects an entire network, such as a data center or branch office, to a cloud provider’s virtual network using managed gateways. The protocols overlap, but the scale, routing model, and management responsibility differ substantially. (Virtual private network)

Does a cloud VPN encrypt traffic?

Yes. Cloud VPN tunnels use IPsec, which encrypts and authenticates traffic between the two gateways. Traffic inside the cloud provider’s network and inside the on-premises network is not encrypted by the tunnel, so additional encryption may be needed for specific workloads.

How many tunnels should a production cloud VPN have?

At least two, terminating on separate gateway instances in different availability zones. This allows automatic failover if one tunnel or gateway fails. Most providers publish explicit guidance recommending redundant tunnels with dynamic routing.

Why does my cloud VPN tunnel keep dropping?

The most common causes are mismatched phase-2 lifetimes, mismatched encryption or hashing proposals, dead peer detection settings that are too aggressive, and unstable internet paths. Checking lifetime settings on both sides resolves a large share of recurring drop issues.

Is BGP required for cloud VPN?

No, static routing works and is simpler for small, stable networks. However, BGP enables automatic failover, simplifies route management as networks grow, and is strongly recommended for any production deployment with redundancy requirements.

Can a cloud VPN replace a dedicated interconnect?

It can for many workloads, especially where bandwidth needs are moderate and some latency variability is acceptable. Dedicated interconnect offers more predictable performance and higher throughput but costs more and takes far longer to provision. Many organizations run both, using VPN as a backup path.

on this page