A site-to-site VPN is a scrambled link that joins two whole networks across the internet.
This guide is for students, people new to IT work and anyone who has heard "the offices are joined by a tunnel". You do not need to set one up to be affected: if your business has a second office or uses a cloud network, a link like this may carry its most private data.
In short
- A site-to-site VPN links two networks, such as an office and a cloud, not one person's laptop.
- Two gateway devices scramble traffic at one end and unscramble it at the other, so staff need no app.
- Most site-to-site links use a set of open standards called IPsec. The gateways prove who they are with a shared secret or a certificate.
- Patch the gateways quickly, protect their secrets and limit what each side can reach.
What you will learn
- Explain how a site-to-site VPN differs from a VPN app.
- Spot the parts of a tunnel: two gateways, a shared secret and the networks behind them.
- Explain in plain words what IPsec does.
- Ask who owns, patches and checks each tunnel.
- Network door (VPN gateway)
- the device or service at each end that scrambles and unscrambles traffic.
- Shared password (pre-shared key)
- a secret that both gateways know, used to prove who they are to each other.
- Tunnel standards (IPsec)
- a set of open rules for scrambling and checking traffic between networks.
What is a site-to-site VPN?
Think of a covered bridge between two office buildings. Staff walk from one building to the other without stepping outside. Nobody in the street sees who crosses.
A site-to-site VPN does the same for two networks. A VPN is a virtual private network: a private link built over a public network. Here, the link runs between two gateways, one at each site. Any computer in one office can reach the other office as if it were down the corridor.
This is different from the VPN app on a laptop. An app joins one device to a network. A site-to-site link joins whole networks, and the people using it may not know it is there. For the app kind, see VPNs for Beginners.
Where the comparison stops working: a bridge is solid and private. A VPN tunnel still travels over the public internet. It stays private only because the traffic is scrambled, so weak settings or a stolen secret can expose it. Also, a bridge is easy to see. Tunnels are easy to forget.
Why does it matter?
A tunnel joins two networks, so trouble on one side can travel to the other. The gateways also face the internet, so they are a target in their own right.
If you are new to IT work
What could happen: a gateway misses an urgent update and an attacker gets in through it.
Check this: find out who patches each gateway, and how fast.
Next: Firewalls for Beginners
If you run a business with more than one site
What could happen: malware in a small branch spreads to the head office over the tunnel.
Check this: ask which systems each office can actually reach through the link.
If you work with partners or suppliers
What could happen: a tunnel to an old partner is still open years after the work ended.
Check this: keep a list of every tunnel, its owner and its end date.
What does it look like?
A tunnel needs matching settings at both ends. Here is a made-up card for one tunnel. A careful team keeps cards like this.
Example only. All values are made up.
Tunnel card: Leeds office to cloud network Leeds gateway: 203.0.113.10 (1) Cloud gateway: 198.51.100.20 Leeds network: 10.10.0.0/16 (2) Cloud network: 10.50.0.0/16 Proves identity by: shared key FAKE-0000 (3) Owner: (blank) (4) Last patched: 14 months ago (5)
- The public address of each gateway. Both ends must know the other's.
- The whole Leeds network is open to the cloud side, not only the systems that need it.
- A card should only say where the key is stored. This one shows the key itself.
- Nobody is named as owner, so nobody checks it.
- The gateway faces the internet and has missed over a year of fixes.
Why this is risky: the tunnel opens every system on both sides. Its secret is written where others can read it. The gateway is old and has no owner. The UK's national cyber security body says VPN services face the internet. It says they should be updated swiftly when fixes come out.[2]
The safer way: name an owner and patch the gateways fast. Allow only the systems that need to talk. Keep the shared secret in a locked store, or better, use certificates. The same body prefers certificates to shared keys. One reason is that one certificate can be cancelled on its own.[2]
How does it work?
Most site-to-site VPNs use IPsec, which a US government guide describes as a framework of open standards for private communication over internet networks.[1] In plain words, it does four jobs.
- Introduce. The two gateways contact each other and agree which scrambling methods to use.
- Prove. Each gateway shows it is the real partner, using a shared key or a certificate.
- Scramble. A computer in Leeds sends data to a server in the cloud. The Leeds gateway scrambles it, a process called encryption, and sends it over the internet.
- Check and unscramble. The cloud gateway checks the data was not changed on the way, unscrambles it and passes it to the server.
- Refresh. The gateways change their working keys from time to time, so one key does not protect traffic for too long.

Cloud providers offer this as a service. For example, Amazon's site-to-site VPN uses IPsec and gives each connection two tunnels, so one can carry traffic if the other fails.[3] The device on your side is called a customer gateway.[3]
The gateways prove who they are with a shared key or a certificate. That makes each gateway a non-human identity (NHI). An NHI is a digital identity, or the credential behind it, that represents a machine. It lets the machine connect to other systems without a person. Its secret needs the same care as any password. See Non-Human Identities for Beginners.

A worked example
Darius Dube runs a fictional furniture firm with a shop in Leeds and a warehouse in Bradford. The two sites share a stock system, joined by a site-to-site VPN that a contractor set up five years ago.
Darius hires Tomas Novak as his first IT lead. In his first week, Tomas asks for a list of tunnels. Nobody has one.
Tomas logs in to both gateways and finds three tunnels, not one. The second goes to the firm's cloud accounts system. The third goes to a delivery company the firm stopped using two years ago.
He thinks of the covered bridge. A bridge to a building you no longer use is just an unlocked door. With Darius's approval, he switches off the third tunnel and records why.
Next he checks the gateways themselves. The Leeds gateway is several updates behind, including a security fix the maker has marked as urgent. Tomas plans a short evening outage and installs the update.
Then he looks at what each tunnel allows. The warehouse can reach every system in the shop, including the office PCs. Tomas limits the tunnel so the warehouse reaches only the stock system.
Last, he finds that the shared keys were typed into a spreadsheet years ago. He changes them on both ends, stores the new ones in the firm's password vault and adds a yearly check to his calendar. Darius asks for a one-page tunnel list, with an owner for each line.
Myths and mistakes
| What people think | What is true |
|---|---|
| A site-to-site VPN is the same as the VPN app on my laptop. | The app joins one device. A site-to-site link joins whole networks through two gateways. |
| The tunnel is encrypted, so everything behind it is safe. | Encryption protects data on the journey. It does not stop malware on one side reaching the other. |
| Once a tunnel works, you can leave it alone. | Gateways face the internet and need prompt updates.[2] |
| A shared key is fine to share by email. | Anyone with the key and the right settings may be able to pose as your gateway. Keep it in a locked store. |
| Partner tunnels close when the contract ends. | They stay open until someone switches them off. Give each one an end date and an owner. |
What can I do this week?
- List every tunnel your organisation has, with both ends and an owner.
- Check when each gateway was last updated.
- Find where the shared keys are stored, and move them to a locked store.
- Ask which systems each side can reach, and whether it needs them all.
- Switch off any tunnel that nobody can explain, after checking with its likely owner.
Checklist
- Every tunnel is listed, with both ends, a purpose and a named owner.
- Gateways get security updates promptly, and urgent fixes go in first.
- Gateways prove who they are with certificates, or with strong shared keys kept in a locked store.
- Each tunnel allows only the systems and services each side needs.
- Partner tunnels have an end date and are reviewed at least yearly.
- Old scrambling methods are switched off on both gateways.
- Gateway records are kept and checked for unusual activity.
Common questions
Do staff need to do anything to use a site-to-site VPN?
Usually no. The gateways do the work, so staff computers need no VPN app. People use shared systems as normal, and traffic between sites goes through the tunnel without them noticing. That is handy, but it also means problems can go unseen.
What is IPsec, in plain words?
IPsec is a set of open standards. It lets two devices agree how to scramble traffic, prove who they are and check nothing changed on the way. Most site-to-site VPNs use it. The IPsec Security Guide covers the settings in depth.
Is a shared key or a certificate better?
Certificates are usually the stronger choice. The UK's national cyber security body prefers them, partly because you can cancel one certificate without changing every other gateway. If you use shared keys, make them long and random and store them in a locked store.
Can I link my office to the cloud this way?
Yes. Major cloud providers offer site-to-site VPN services that connect to a gateway in your office. Amazon's service, for example, gives each connection two tunnels so one can take over if the other fails. Limit what the cloud side can reach.
Are site-to-site VPNs being replaced?
Partly. Some firms move to services that check each user and app on every request, an approach called zero trust. Site-to-site links remain common for joining offices, data centres and clouds. See Zero Trust for Beginners.
Where next?
Ready for the detail? Read the practitioner guide: IPsec Security Guide. It goes further into which scrambling methods to allow, certificates versus shared keys, and hardening the gateways.
Also useful:
- Site-to-Site VPN Security Guide
- VPNs for Beginners
- Network Segmentation for Beginners
- SASE and SSE for Beginners
- Machine Identities and Certificates for Beginners
Related NHI Mgmt Group resources: How VPNs Work · VPN and Firewall Log Detection Guide · Network Segmentation and Microsegmentation Guide
Key terms
- Virtual private network (VPN)
- A private link built over a public network by scrambling the traffic.
- VPN gateway
- The device or service at each end of a VPN that scrambles and unscrambles traffic.
- IPsec
- A set of open standards for scrambling and checking traffic between networks.
- A secret both gateways know and use to prove who they are to each other.
- Digital certificate
- A signed digital ID card that a device uses to prove who it is.
- Encryption
- Scrambling data so only someone with the right key can read it.
- Machine identity
- The credential, such as a key or certificate, that lets a device prove who it is.
Sources and further reading
- Guide to IPsec VPNs (SP 800-77 Rev. 1). Barker, Dang, Frankel, Scarfone and Wouters, NIST, June 2020. https://csrc.nist.gov/pubs/sp/800/77/r1/final, accessed 28 Nov 2026.
- Device security guidance: Virtual Private Networks (VPNs). National Cyber Security Centre (UK), published 29 June 2021, reviewed 13 May 2025. https://www.ncsc.gov.uk/collection/device-security-guidance/infrastructure/virtual-private-networks, accessed 28 Nov 2026.
- What is AWS Site-to-Site VPN? AWS Site-to-Site VPN User Guide, Amazon Web Services. https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html, accessed 28 Nov 2026.