What Is a Site-to-Site VPN? How It Links Office Networks (2026)
A site-to-site VPN joins two offices into one network with no apps on anyone’s laptop. Here’s how the tunnel works, how AWS, Azure and Google do it, and what it costs.

Your head office has the file server. The branch across town needs it. Nobody wants to log in to a VPN app every morning.
That’s the problem a site-to-site VPN solves. Instead of each person connecting, the two offices connect to each other, permanently, through an encrypted tunnel between their routers or firewalls. Staff just use the network as if both buildings were one.
It sounds simple, and the idea is. The details are where projects stall: overlapping IP ranges, mismatched IPsec settings, a tunnel that drops every few hours. This guide explains how site-to-site VPNs work, how AWS, Azure and Google Cloud do it, what they really cost, and the mistakes worth avoiding before you start.
- A site-to-site VPN links whole networks, not individual users.
- IPsec with IKEv2 is the standard, and both ends must match exactly.
- Route-based tunnels with BGP make growth and failover far easier.
- Cloud gateways are cheap per hour, but data transfer drives the bill.
- Overlapping subnets break more projects than any device or protocol.
What a Site-to-Site VPN Actually Is
A site-to-site VPN is a permanent encrypted tunnel between two networks, built by gateway devices at each end rather than by apps on each user’s device. Computers behind the gateways don’t need any VPN software at all.
Each location has a VPN gateway: a firewall, router, virtual appliance or cloud service. The two gateways authenticate each other, agree on encryption keys and keep a tunnel open across the public internet.
When a laptop in the branch sends traffic to an address in the head office’s range, the branch gateway encrypts it, sends it through the VPN tunnel, and the head office gateway decrypts and delivers it.
The user never notices. They type the file server’s address, and it opens.
That’s the big contrast with a remote access VPN, where each person runs a client that connects their single device. Site-to-site connects networks. Remote access connects people.
Site-to-Site vs Remote Access VPN
Use site-to-site to join fixed locations and remote access for people on the move. Most businesses with more than one office end up running both.
| Site-to-site VPN | Remote access VPN | |
|---|---|---|
| Connects | Network to network | One device to a network |
| Who sets up the tunnel | Gateways at each site | A client app on each device |
| Always on? | Yes, typically | Only while the user is connected |
| User software needed | None | VPN client on every device |
| Typical protocol | IPsec with IKEv2 | IPsec, SSL/TLS VPNs, WireGuard |
| Best for | Branch offices, data centers, cloud VPCs, partners | Remote and traveling staff |
| Main headache | Routing and matching settings on both ends | Client rollout and user support |
At larger scale, the head office often terminates dozens of tunnels on a single device built for it. That’s the job of a VPN concentrator, which can handle both site-to-site and remote access tunnels.
Intranet vs Extranet Site-to-Site VPNs
An intranet VPN links locations of the same company. An extranet VPN links your network to a partner’s, with much tighter limits. The technology is identical. The trust model isn’t.
In an intranet setup, the head office, branches and data center all belong to one organization. Broad access between sites is normal, because they share the same staff, policies and IT team.
In an extranet setup, you connect to a supplier, a payment processor or a client. You don’t want them browsing your network. So the tunnel only carries traffic between a few specific hosts, and firewall rules on both sides allow just the services the partnership needs.
Common mistake: setting up an extranet tunnel with the same “allow everything” rules as an internal link. A tunnel is a door. Who’s allowed through it is decided by the firewall policy behind it, not by the encryption.
How the IPsec Tunnel Comes Up
Most site-to-site VPNs use IPsec, and the tunnel forms in two phases: IKE builds a secure control channel, then IPsec security associations carry the data. Matching settings on both ends is what makes or breaks it.
1Phase 1: IKE Builds a Secure Channel
The two gateways use the Internet Key Exchange protocol, today almost always IKEv2, to prove who they are and agree on keys. Authentication is usually a pre-shared key or certificates.
Both sides must agree on an encryption algorithm, an integrity algorithm and a Diffie-Hellman group. If one side offers AES-256 with DH group 14 and the other insists on group 20, Phase 1 fails and nothing else happens. Our explainer on VPN encryption covers what those choices mean.
2Phase 2: IPsec SAs Carry the Traffic
Inside that channel, the gateways negotiate IPsec security associations (SAs) for the actual data. Traffic is encrypted with ESP (Encapsulating Security Payload) in tunnel mode, which wraps each original packet inside a new one addressed gateway to gateway.
Keys expire and get renegotiated on a schedule called the lifetime. Mismatched lifetimes don’t always stop the tunnel from forming, which is exactly why they cause the classic “drops every hour” problem.
3Getting Through NAT
Plain ESP doesn’t survive most NAT routers. NAT traversal (NAT-T) wraps ESP inside UDP port 4500 so it can pass through. If either gateway sits behind NAT, both sides need it enabled, and the firewall must allow UDP 500 and 4500.
Policy-Based vs Route-Based VPNs
A policy-based VPN encrypts traffic that matches a list of address pairs. A route-based VPN creates a virtual tunnel interface and lets the routing table decide what goes through it. Route-based is more flexible and is the modern default.
| Policy-based | Route-based | |
|---|---|---|
| How traffic is selected | Traffic selectors (source and destination subnets) | Routes pointing at a tunnel interface |
| Adding a new subnet | Edit the policy on both ends | Add a route, or let BGP learn it |
| Dynamic routing (BGP) | Not supported | Supported |
| Redundant tunnels and failover | Awkward | Natural |
| Best for | Simple, fixed links to older devices | Cloud VPNs, multiple sites, anything that will grow |
Our take: pick route-based unless an old device on the other end forces your hand. Every major cloud gateway supports it, and BGP over route-based tunnels is what makes automatic failover possible.
Hub-and-Spoke vs Full Mesh
With a few sites, connect every branch to headquarters. With many sites that talk to each other, the design gets harder.
In hub-and-spoke, each branch has one tunnel to a central hub. Branch-to-branch traffic travels through the hub. It’s simple to manage, but the hub becomes a bottleneck and a single point of failure.
In a full mesh, every site has a tunnel to every other site. Traffic takes the shortest path, but the tunnel count explodes. Ten sites need 45 tunnels, because the count is n × (n − 1) ÷ 2.
That math is a big reason companies with many locations move to SD-WAN or cloud transit hubs instead of managing dozens of hand-built tunnels.
Site-to-Site VPNs to the Cloud: AWS, Azure and Google Cloud
Every major cloud offers a managed VPN gateway, so your office can reach cloud servers on private addresses. You configure your on-premises device. The cloud runs the other end.
1AWS Site-to-Site VPN
According to AWS’s documentation, each Site-to-Site VPN connection includes two tunnels you can use at the same time for high availability. The AWS end is either a virtual private gateway attached to one VPC or a transit gateway that connects many VPCs and sites.
Standard tunnels support up to 1.25 Gbps each, and AWS now offers large bandwidth tunnels of up to 5 Gbps on Transit Gateway or Cloud WAN. It supports IKEv2, NAT traversal, BGP and AES-256 with SHA-2.
On cost, AWS’s pricing page (checked November 2026) shows $0.05 per connection-hour in US East (Ohio), about $36 a month. Data sent out of AWS is billed separately at standard rates. The 5 Gbps option costs $0.60 an hour, and each tunnel also uses a public IPv4 address with its own standard charge.
2Microsoft Azure VPN Gateway
Azure calls it a site-to-site connection: an IPsec/IKE tunnel between an Azure VPN gateway and your on-premises device. The same connection type also links two Azure virtual networks (VNet-to-VNet).
Gateways can run active-standby or active-active. Microsoft’s documentation notes that an active-active setup costs the same as active-passive, so there’s little reason not to use both instances if your device supports two tunnels.
3Google Cloud HA VPN
Google Cloud’s current offering is HA VPN. Google’s documentation says it can provide a 99.99% availability SLA in most topologies, compared with 99.9% for its older Classic VPN. To get the higher SLA, you build redundant tunnels across both HA VPN interfaces.
| Cloud | Service | Built-in redundancy | Worth knowing |
|---|---|---|---|
| AWS | Site-to-Site VPN | Two tunnels per connection | $0.05/hour per connection in US East (Ohio); data transfer extra |
| Azure | VPN Gateway | Active-standby or active-active | Active-active costs the same as active-passive |
| Google Cloud | HA VPN | Two interfaces, redundant tunnels | 99.99% SLA in most topologies |
Check before you buy: the hourly connection fee is rarely the big number. In AWS’s own example, a connection moving 5 TB out per month costs $36 in connection fees, $36 for a Transit Gateway attachment and $451.80 in data transfer out. Plan for bandwidth, not just tunnels.
A Minimal Site-to-Site Example With WireGuard
IPsec dominates business gear, but WireGuard can link two Linux gateways with a very short config. Here’s what Site A’s side looks like.
# Site A gateway (office LAN 10.10.0.0/24)
[Interface]
Address = 172.16.0.1/30
ListenPort = 51820
PrivateKey = <site-a-private-key>
[Peer]
# Site B gateway
PublicKey = <site-b-public-key>
Endpoint = siteb.example.com:51820
AllowedIPs = 172.16.0.2/32, 10.20.0.0/24
PersistentKeepalive = 25Site B mirrors it, with the addresses swapped and Site A’s LAN (10.10.0.0/24) in its AllowedIPs. On both gateways you then enable IP forwarding and add routes so each LAN sends the other site’s range to the WireGuard interface.
The key line is AllowedIPs. In WireGuard, it works as both the routing table and the access list. Only traffic from those ranges is accepted from the peer, and only traffic to them is sent.
A note on testing: this is a reference config built from WireGuard’s documented options, with placeholder keys and hostnames. We haven’t run it between two physical offices, so test it in a lab before relying on it. For protocol background, see how VPN protocols work.
How to Plan a Site-to-Site VPN
Most failed setups trace back to planning, not to the device. Work through these steps before touching a config screen.
- List the networks. Write down every subnet at every site. They must not overlap. Two offices both using 192.168.1.0/24 can’t route to each other without NAT tricks.
- Choose the topology. Hub-and-spoke for a few branches, a cloud transit hub or SD-WAN for many.
- Match the crypto settings. Agree on IKE version, encryption, integrity, DH group and lifetimes for both phases. Write them in one shared table.
- Pick route-based and plan routing. Static routes for one or two subnets, BGP for anything dynamic or redundant.
- Open the firewall. Allow UDP 500 and 4500 (and ESP if no NAT) between the gateways’ public IPs.
- Plan for failure. Two tunnels, ideally over two internet links, with monitoring that alerts when one drops.
- Lock down access. Write firewall rules for what each site may reach, especially for partners.
Troubleshooting Site-to-Site Tunnels
Read the gateway logs for which phase fails, and the fix usually becomes obvious.
| Symptom | Likely cause | Fix |
|---|---|---|
| Tunnel never comes up | Phase 1 mismatch or wrong pre-shared key | Compare IKE version, ciphers, DH group and PSK on both ends |
| Phase 1 up, no traffic | Phase 2 mismatch or wrong traffic selectors | Match subnets exactly on both sides; check PFS settings |
| Tunnel drops on a schedule | Lifetime mismatch or no dead peer detection | Align lifetimes; enable DPD and keepalives |
| Some sites unreachable | Overlapping subnets or missing routes | Renumber or use NAT; add routes on both sides |
| Small requests work, large transfers hang | MTU and fragmentation issues | Lower the tunnel MTU or clamp TCP MSS |
| Tunnel works only one way | Firewall rule or return route missing | Check policies and routes in both directions |
The MTU row catches experienced engineers too. IPsec adds headers to every packet. If the path can’t carry the bigger packet and fragmentation is blocked, web pages half-load and file copies stall. AWS’s documentation notes its Site-to-Site VPN doesn’t support Path MTU Discovery, so setting the MSS clamp yourself matters there.
Security Settings Worth Getting Right
An always-on tunnel into your network deserves the same care as your front door. These settings close the gaps we see most often in older configs.
- IKEv2 over IKEv1. Use IKEv1 only when a legacy device on the other end leaves no choice.
- Modern crypto. AES-256-GCM or AES-256 with SHA-256 or better, and Diffie-Hellman group 14 or higher. Drop 3DES, MD5, SHA-1 and DH groups 1, 2 and 5.
- Perfect forward secrecy on Phase 2. It forces a fresh key exchange for each new SA, so one stolen key doesn’t unlock earlier traffic.
- Long, random pre-shared keys or certificates. A short PSK copied into an email is the weakest part of many tunnels. Certificates scale better past a few sites.
- Least-privilege firewall rules. Allow only the subnets and ports each site needs, especially on extranet links.
- Logging and alerts. Send tunnel up and down events to your monitoring so a silent drop doesn’t become a Monday-morning outage.
Warning: VPN gateways are a favorite target for attackers because they face the internet by design. Patch firewall and gateway firmware promptly, and turn off management interfaces on the public side.
Site-to-Site VPN vs SD-WAN vs Private Lines
A site-to-site VPN is the cheapest way to join networks over the internet. SD-WAN manages many of those links for you, and private lines skip the internet entirely.
| Site-to-site VPN | SD-WAN | Private line (MPLS, Direct Connect, ExpressRoute) | |
|---|---|---|---|
| Runs over | The public internet | Several links, often internet plus LTE | Dedicated carrier or cloud circuits |
| Setup effort | Manual, per tunnel | Central controller, mostly automatic | Carrier provisioning, weeks |
| Performance guarantees | None beyond your ISP | Picks the best path per application | Contractual bandwidth and latency |
| Cost | Lowest | Medium, subscription | Highest |
| Best for | A handful of sites, cloud connectivity | Many branches, mixed links | Large, latency-sensitive or regulated traffic |
Many SD-WAN products still build IPsec tunnels underneath. They just automate the tunnels, the routing and the failover you’d otherwise do by hand.
Do Consumer VPNs Offer Site-to-Site?
Not in the business sense. Consumer VPN apps like the ones in our VPN directory connect your device or router to the provider’s servers so you can browse privately. They don’t join two of your own networks together.
Some business VPN and zero-trust platforms do offer site-to-site gateways alongside user access. If your team is distributed rather than split across offices, our guide to the best VPNs for remote teams is the better starting point.
Frequently Asked Questions
The Bottom Line
A site-to-site VPN makes two networks behave like one, with no apps on anyone’s laptop. IPsec with IKEv2 does the heavy lifting, and every major cloud offers a managed gateway for the far end.
Our take: the tunnel itself is the easy part. Clean, non-overlapping subnets, matching settings written down in one place, route-based design and two tunnels instead of one are what separate a set-and-forget link from a weekly support ticket.
Next step: list every subnet at every site today. If two of them overlap, fix that first. Then pick hub-and-spoke or a cloud transit hub and build one redundant pair of tunnels before you add the rest.
Keep Reading
More articles you might enjoy


