VPN Fundamentals: What a VPN Is and How It Works
On this page
Summary: A VPN (virtual private network) is a protected connection built on top of a network you don’t control. Your device and a VPN server wrap your traffic inside an encrypted “tunnel,” so the networks in between see only scrambled data headed to that server. With a typical consumer VPN service, websites see the server’s IP address instead of yours, and your internet provider or Wi-Fi operator can no longer see which sites you visit - but the company running the VPN server now can. A VPN changes who can observe your traffic and where it appears to come from; it does not make you anonymous or protect you from most other online risks.
Three things people mean by “VPN”
Much of the confusion around VPNs comes from one word covering three different things. A statement that is true of one is often false of the others.
| Term | What it is | Who controls it |
|---|---|---|
| VPN technology | The networking technique itself: a virtual network built on top of existing networks to carry traffic privately between devices or networks. Standards and implementations such as IPsec, OpenVPN, and WireGuard are different ways of building one. | Whoever deploys it: a company, a service provider, or an individual. |
| VPN service | A commercial offering in which a provider runs VPN servers and lets subscribers route their traffic through them. | The provider, which operates the servers your traffic passes through. |
| VPN app or client | The software on your device that sets up and maintains the tunnel. It can be a provider’s app or a VPN client built into the operating system. | You install it; its behavior is set by whoever built and configured it. |
The technical definitions are broader than most consumers expect. NIST’s Guide to IPsec VPNs (SP 800-77 Rev. 1) describes a VPN as a virtual network on top of existing physical networks that can provide secure communication for data moving between networks or between devices on the same network. The IETF’s VPN terminology document (RFC 4026) goes further: it treats “VPN” as a generic term for separating a group of users on shared networks so they can communicate as if on a private network, and notes that adding end-to-end encryption falls outside the scope of the IETF’s VPN working groups. Carrier-run business networks partitioned with MPLS are VPNs in this sense: they keep one customer’s traffic separate from another’s by design. NIST observes that such links are now usually protected by an IPsec VPN as well - a reminder that separation and encryption are distinct properties.
This matters when you read claims. “A VPN encrypts your traffic” describes how a particular service and app are built, not something the term guarantees; the Federal Trade Commission has warned that some VPN apps don’t encrypt traffic at all, or encrypt only part of it. In the same way, “the VPN keeps no logs” is a statement about a service’s policy, while “the VPN leaked my traffic” could point to the app, the operating system, or the protocol.
For a fuller explanation of the distinction between VPN technology, consumer services, and client apps, see What Is a VPN? Technology, Services and Types.
How a VPN works
Every VPN connection, consumer or corporate, follows the same basic pattern, even though protocols differ in the details:
- The two ends authenticate and agree on keys. The client and the VPN server verify each other’s identity - typically with public-key cryptography or a pre-shared secret - and run a key exchange (commonly Diffie-Hellman) to derive session keys that an eavesdropper cannot compute.
- Your device gets a virtual network interface. The operating system treats the tunnel as another network adapter with its own IP address, and routing rules decide which traffic goes into it.
- Traffic is encapsulated. Each outgoing packet is encrypted and wrapped inside a new packet addressed to the VPN server. Networks along the way see only the outer packet: your device talking to the server.
- The server unwraps and forwards. The server decrypts each packet and sends it on to its destination from its own address. Replies come back to the server, which encrypts them and returns them through the tunnel.
Two consequences follow from this design. First, the protection a VPN adds covers only the stretch between your device and the VPN server. Beyond the server, your traffic crosses the internet like any other, protected only by whatever encryption the website or app already uses, such as HTTPS. NIST’s architecture descriptions make the same point: each VPN design protects some segments of the path and leaves others outside the tunnel. Second, the VPN server becomes a new vantage point. Everything that enters the tunnel comes out there, decrypted as far as the VPN layer is concerned.
For a step-by-step conceptual account of traffic routing, encryption, and the VPN tunnel, read How VPN Traffic, Tunnels and Encryption Work.
Who can see what
The table below compares a visit to an HTTPS website with and without a consumer VPN that carries all of your device’s traffic. It draws on the Electronic Frontier Foundation’s Surveillance Self-Defense guide to VPNs and the FTC’s guidance on VPN apps.
| Observer | Without a VPN | With a full-tunnel consumer VPN |
|---|---|---|
| Local Wi-Fi operator and others on the network | Domain names you visit, when, and how much data moves; not page contents, logins, or messages | Encrypted traffic going to the VPN server, and its volume |
| Internet service provider | The same metadata as above | That you are connected to a VPN server, and how much data flows |
| VPN provider | Nothing | Your real IP address and the browsing metadata your ISP would otherwise see |
| Website you visit | Your IP address, which indicates your general location | The VPN server’s IP address - plus anything you log in with, type in, or allow it to track; some sites can tell you are using a VPN |
Full tunnel and split tunnel
A VPN doesn’t have to carry everything. NIST describes split tunneling as a configuration in which only some traffic goes through the VPN while the rest uses the device’s normal connection; in a full-tunnel setup, all traffic goes through the tunnel. Consumer apps often expose split tunneling as a setting that lets chosen apps or sites bypass the VPN. Whenever a claim says a VPN “protects your traffic,” the first question is which traffic.
Protocols: different ways to build the tunnel
A VPN protocol is the set of rules for authenticating the two ends, exchanging keys, and encrypting packets. The protocol determines much of a VPN’s security and behavior, which is why no single implementation represents VPN technology as a whole. NIST’s 2020 guide groups the main options this way:
| Protocol family | How it builds the tunnel | Status in authoritative guidance |
|---|---|---|
| IPsec with IKEv2 | An IETF standard working at the network layer. IKE negotiates keys and settings; ESP carries the encrypted packets. | The focus of NIST’s guidance; IKEv2 is recommended over the older IKEv1. |
| TLS-based (“SSL VPNs”), including OpenVPN | Uses TLS over TCP or DTLS over UDP. Because it can run on the same port as HTTPS, it is harder for networks to block. | Widely used. NIST notes lower performance for application-based implementations and a history of vulnerabilities in OpenVPN; NSA and CISA advise organizations to avoid non-standard SSL/TLS VPN products for remote access. |
| WireGuard | A deliberately minimal design that runs over UDP, authenticates only with public keys, and uses a fixed set of modern algorithms such as Curve25519 and ChaCha20-Poly1305. | Common in consumer services, per the EFF. NIST noted in 2020 that its algorithms are not NIST-approved - a constraint for U.S. federal compliance rather than a finding that the protocol is insecure. |
| PPTP and L2TP/IPsec | Older protocols built on PPP, a design from the dial-up era. | NIST says these must not be used. PPTP should be treated as offering no real confidentiality or integrity protection. |
To compare protocol options and their practical trade-offs, continue to VPN Protocols: Types, Differences and How to Choose.
Consumer VPN services versus work and managed VPNs
The same technology serves different jobs, and broad statements about what “a VPN” does often hold for only one of them. NIST describes the main architectures:
- Remote access. An individual device connects to an organization’s VPN gateway so the user can reach internal services such as email and file servers while away from the office. Some organizations route all of the device’s internet traffic through the company firewall rather than allowing split tunneling.
- Gateway-to-gateway (site-to-site). Two networks, such as a branch office and headquarters, are linked through VPN gateways. Users typically install nothing and don’t notice it, and protection covers only the path between the gateways.
- Consumer VPN service. The “other network” is the provider’s server. In the EFF’s framing, what a VPN is really best suited for is routing your connection through a different network - here, so that your traffic appears to originate from the provider and is shielded from the networks in between.
The difference changes who you are trusting. On a work VPN, whoever runs the corporate network can see the traffic you send through it; on a consumer service, the provider can. The risk lens differs too: NSA and CISA guidance treats remote-access VPN servers as entry points into protected networks and therefore as targets for attackers. That is a concern about an organization’s network, not about an individual’s browsing privacy - so advice written for one context rarely transfers cleanly to the other.
What a VPN changes - and what it doesn’t
The FTC’s summary of consumer VPN apps captures the core trade: a VPN app typically hides the content of your traffic from your ISP or Wi-Fi provider, but it does not make you anonymous. “It just shifts trust from those networks to the VPN app provider.”
What a VPN can change
- The IP address that websites and online services see, and with it the approximate location they infer.
- What your ISP and the operator of your local network can observe about where you go online.
- The exposure of unencrypted traffic on a network you don’t trust. With an encrypting VPN, the FTC notes, someone monitoring that Wi-Fi connection sees only unreadable data, even for a site that doesn’t use encryption itself.
What a VPN doesn’t change
- Identity and tracking. Cookies, tracking pixels, browser fingerprinting, GPS, and any account you sign into or form you fill out can still identify you.
- The need for trust. The provider can see your traffic. It is subject to the laws and government requests of the countries where it operates, and a claim such as “no logs” is a policy statement, not a guarantee.
- Most security threats. The EFF stresses that a VPN is not a security multi-tool; protections such as strong passwords, two-factor authentication, and software updates address risks a VPN doesn’t touch.
- Flaws in the VPN itself. NIST points to weak algorithms, buggy software, and poorly generated keys as risks that remain. In 2024, researchers disclosed TunnelVision (CVE-2024-3661), a technique in which a malicious network server pushes routing instructions that steer traffic outside the tunnel while the VPN still appears connected; the EFF’s analysis of TunnelVision explains its implications for VPN users.
- Reliability. According to NIST, VPNs generally don’t improve availability and often reduce it somewhat, because they add components and complexity to a connection.
Public Wi-Fi is where the standard advice has shifted most. The EFF notes that using a VPN on public Wi-Fi is no longer as necessary for everyone, because most web traffic is now encrypted with HTTPS. HTTPS still leaves metadata such as domain names visible to the local network, and a VPN would hide that from the network - while handing it to the VPN provider. The case for a VPN is strongest on a network you have specific reason to distrust, and only when you trust the VPN more than that network.
A checklist for reading any VPN claim
Before accepting a statement about what “a VPN” does, pin down its scope:
- Which VPN? The technology, a specific service, or a specific app - and is it a consumer service or a workplace VPN?
- Protected between which two points? Usually your device and the VPN server, and nothing beyond.
- Which traffic? The whole device, or only some apps under split tunneling?
- Built on which protocol? A current one such as IKEv2/IPsec, OpenVPN, or WireGuard, or a deprecated one such as PPTP?
- Who runs the server, and under which laws? Policies like “no logs” are claims. The EFF treats published third-party security audits as a meaningful sign of seriousness, while noting that an audit can’t guarantee how a provider behaves afterward.
- What happens if the tunnel drops? Some apps and operating systems can block all traffic while the VPN is disconnected, a feature often called a kill switch. Android, for example, has a system setting named Block connections without VPN.
For a focused explanation of kill switches, split tunneling, leak protection, and other feature limits, see VPN Protection Features: What They Do and Their Limits.
Frequently asked questions
Are Tor and iCloud Private Relay VPNs?
Not in the usual sense. Tor is designed so that no single Tor server can see your browsing data, which is why the EFF calls it a better option than a VPN for anonymity; a VPN provider, by contrast, can see all of your traffic. Apple’s iCloud Private Relay masks your IP address from websites in Safari using a relay protocol called MASQUE, which the EFF notes is not traditionally a VPN protocol.
Does a VPN slow down my connection?
It can. NIST notes that encryption takes extra processing, that wrapping packets makes them larger and can cause fragmentation, and that TLS-based VPNs running over TCP can degrade sharply when packets are lost. How noticeable the effect is depends on the protocol, the implementation, and the network path.
Are free VPN apps different from paid ones?
The technology may be the same, but the business model differs, and that affects your privacy. The FTC notes that many free VPN apps make money by showing ads or by sharing your information with third parties - or routing your traffic through them. Since the provider sees your traffic either way, how it earns money is part of what you are trusting.