// Lesson 45 of 49 · Security fundamentals
VPN concepts
A VPN builds a private, encrypted tunnel across a network you do not trust — usually the internet.
Two kinds
| Site-to-site | Remote access | |
|---|---|---|
| Connects | Two networks (branch ↔ HQ) | One user device ↔ the company network |
| Built by | Routers or firewalls at each site | A VPN client on the device (or a browser) |
| Users notice | Nothing — it is always on | They start the client and log in |
| Typical technology | IPsec | TLS/SSL VPN or IPsec (IKEv2) |
IPsec building blocks
| Function | Provided by |
|---|---|
| Confidentiality | Encryption — AES |
| Integrity | Hashing — SHA-2 |
| Authentication of the peers | Pre-shared keys or certificates |
| Key exchange | Diffie-Hellman groups, negotiated by IKE (IKEv2 preferred) |
| Anti-replay | Sequence numbers |
IPsec has two protocols: ESP (encryption and integrity — what is normally used) and AH (integrity only; incompatible with NAT). Tunnel mode encrypts the whole original packet and adds a new IP header — the mode used for site-to-site VPNs.
The negotiation happens in two phases: IKE first builds a secure management channel between the peers, then negotiates the IPsec security associations that actually protect the traffic.
GRE and GRE over IPsec
GRE tunnels can carry multicast and routing protocols (such as OSPF) but are not encrypted. Combining GRE with IPsec gives both: dynamic routing over the tunnel and encryption.
Remote-access VPN
A user's laptop runs a client (for example Cisco Secure Client) that connects to a VPN head-end — a firewall or router. The connection usually uses TLS (the same protection as HTTPS), so it passes through most networks. Policies decide whether all traffic or only company traffic goes through the tunnel (full vs split tunnelling).
Key points
- Site-to-site joins networks; remote access joins users.
- IPsec: AES for confidentiality, SHA for integrity, IKE for keys, ESP in tunnel mode.
- GRE carries routing protocols but is not encrypted on its own.
- Remote-access VPNs commonly use TLS.
Sign in to save your lesson progress across devices. You can read every published lesson without an account.