What Is a VPN Tunnel, and How Does Traffic Actually Move Through One?

The word "tunnel" is a metaphor doing a lot of work. Here is what is actually happening to your data.

Quick answer

A VPN tunnel is an encrypted, encapsulated path your device's network traffic travels through on its way to a VPN server: your data gets wrapped in a new, encrypted outer packet before it leaves your device, so anyone watching the network between you and the VPN server can see that a connection exists but not what is inside it. The VPN server decrypts and unwraps each packet, forwards it to its real destination on the internet, and reverses the process for the reply. Different tunneling protocols (WireGuard, OpenVPN, IKEv2/IPsec, and older ones like L2TP/IPsec and PPTP) implement this encapsulate-and-encrypt process differently, which is why protocol choice affects a VPN's speed, stability, and security in practice.

What does "tunnel" actually mean here?

"Tunnel" is a metaphor, and like most metaphors it is useful right up until you try to take it literally. Nothing is being dug. What is actually happening is a form of encapsulation: your device takes a normal chunk of network data — a packet — and wraps it inside another packet before sending it out. The inner packet is the one that was always going to be sent anyway: a request to load a web page, a chat message, a DNS lookup, a game server ping. The outer packet is new. It is addressed to the VPN server rather than to the traffic's real destination, and its contents — the entire inner packet, headers and all — are encrypted before it leaves your device.

The "tunnel" is the conceptual path that outer, encrypted packet takes from your device to the VPN server. It is called a tunnel because, from the point of view of anyone else on the network in between — your ISP, the operator of a coffee-shop Wi-Fi router, anyone running a packet sniffer on a shared network — the traffic passing through that path looks like an undifferentiated stream going to one place (the VPN server's IP address), and its contents are opaque. What is inside is hidden the way a train passing through an actual tunnel is hidden from view, even though everyone on the surface can see the tunnel entrance and exit.

This matters because a lot of VPN marketing describes the tunnel as if it is the entire security story. It is a large part of it, but it is worth being precise about what the tunnel protects and what it does not, which is the subject of a later section.

What is a VPN tunnel, technically?

Put together, a VPN tunnel is the combination of three things working at once:

  • Encapsulation — wrapping your original packet inside a new outer packet addressed to the VPN server.
  • Encryption — scrambling the contents of that outer packet (including the inner packet it contains) using a shared key that only your device and the VPN server hold, so the payload is unreadable to anyone else.
  • Authentication — cryptographically verifying that packets arriving at each end really did come from the other trusted party in the tunnel, and haven't been tampered with in transit.

All three happen continuously, packet by packet, for the entire time the VPN connection is active. None of it is a one-time setup step that then gets left alone — every single packet leaving your device while the VPN is connected goes through this process, and every packet coming back from the VPN server goes through the reverse of it.

The specific rules for how encapsulation, encryption, and authentication are carried out are defined by a tunneling protocol — WireGuard, OpenVPN, IKEv2/IPsec, and a handful of others. Your VPN app and the VPN server both need to speak the same protocol for the tunnel to work, the same way two people on a phone call need to speak the same language. The protocol section further down covers how the major ones differ in practice.

How does traffic actually move through a VPN tunnel, step by step?

It helps to walk through an ordinary action — loading a web page — and follow exactly what happens to the data at each stage. Assume you've already connected your VPN app to a server.

1. Your device creates the original request

You type a web address, or tap a link. Your device's operating system builds a normal outgoing packet: it has a destination IP address (the website's server), a source IP address (your device's real IP, at least at this stage), and a payload (the actual HTTP request). At this point, nothing about this packet is any different than it would be without a VPN running.

2. The VPN client intercepts it before it reaches the network

Rather than letting the operating system send that packet straight out over Wi-Fi or your mobile connection, the VPN app has installed a virtual network adapter on your device — software that looks like a network card to the rest of the operating system. The operating system's routing table has been updated (this happens automatically the moment the VPN connects) so that this outgoing packet gets handed to the virtual adapter instead of going directly out the physical Wi-Fi or cellular interface.

3. Encryption and encapsulation happen

The VPN client takes the entire original packet — including its original headers — and encrypts it using the encryption keys negotiated with the VPN server when the connection was first established. It then wraps that encrypted blob inside a brand-new packet. This new outer packet has its own header, with a new source address (still your device's real IP, since that's what the physical network needs to route it) and a new destination address: the IP address of the VPN server. The original destination — the website you're trying to reach — is now buried inside the encrypted payload, invisible to anything inspecting just the outer packet.

4. The encrypted packet travels your normal network path to the VPN server

This encapsulated, encrypted packet now goes out over your actual internet connection exactly like any other packet would — through your router, out to your ISP, across the ordinary internet backbone — except every intermediate hop only sees an encrypted blob addressed to the VPN server's IP. Your ISP can see that you're connected to that server and roughly how much data is flowing, but not what website you're actually visiting or what the request contains.

5. The VPN server decrypts and unwraps the packet

When the encapsulated packet arrives at the VPN server, the server uses the shared session keys to decrypt it and strip away the outer wrapping, recovering the original packet exactly as your device first created it — original destination, original payload, all intact.

6. The VPN server forwards the original request, using its own IP as the source

The VPN server then sends that original request out to the real destination — the website's server — but it does so with the VPN server's own IP address as the source, not your device's. This is the step that is actually responsible for "hiding your IP." As far as the website is concerned, the request came from the VPN server, because in a literal, network-level sense, it did — the VPN server initiated that particular connection to the website on your behalf.

7. The reply makes the same trip in reverse

The website's response goes back to the VPN server (since that's the address it saw as the source of the request). The VPN server encrypts and encapsulates that reply, using the same tunnel, and sends it back to your device. Your VPN client decrypts it, strips the outer wrapper, and hands the original reply — the actual web page data — up to your browser as if it had arrived directly.

This entire seven-step cycle happens continuously and extremely fast — well under the time it takes to notice, on a healthy connection — for every single request your device makes while the VPN is active: every image on a page, every background app sync, every DNS lookup. None of it is a one-time event at connection time; it is the ongoing behavior of the tunnel for as long as it stays connected.

Why does a VPN need to "encapsulate" traffic instead of just encrypting it?

It is worth pausing on why encapsulation is a separate step from encryption, because the two get conflated a lot in casual explanations. Encryption alone would scramble the contents of a packet so they can't be read, but it would not, by itself, change where the packet is addressed or routed. If your device just encrypted the payload of a normal packet and sent it straight to the website, the website's server would still see your device's real IP address as the source, and any network equipment along the path would still see the website's IP as the destination — someone watching the network could still see who you're talking to, just not what you're saying.

Encapsulation solves a different problem: it changes the addressing itself, not just the readability of the payload. By wrapping the original packet inside a new one addressed to the VPN server, the tunnel accomplishes two things at once — it hides the packet's true destination from anyone on the path between you and the VPN server (since the outer packet is only ever addressed to the VPN server), and it lets the VPN server become the effective sender toward the final destination, which is what actually swaps out your visible IP address. Encryption and encapsulation are doing genuinely different jobs, and a VPN tunnel needs both.

What is a "tunneling protocol," and why do the choices differ?

A tunneling protocol is the specific, standardized set of rules that governs how encapsulation, encryption, and authentication are actually implemented — what cryptographic algorithms are used, how the two ends of the tunnel first agree on shared keys, what the packet headers look like, how the connection recovers if it drops. Multiple protocols exist because they represent different trade-offs between speed, security, compatibility with restrictive networks, and how well the connection survives changing network conditions (like switching from Wi-Fi to mobile data mid-session).

Here is what actually differs, protocol by protocol, at a level a non-engineer can use to make sense of the settings menu in a VPN app:

WireGuard

WireGuard is a comparatively new protocol, designed from scratch to be smaller and simpler than its predecessors — its core codebase is a small fraction of the size of older protocols' implementations, which is generally considered a security advantage because there is simply less code where a bug could hide. It uses a fixed, modern set of cryptographic primitives rather than offering a menu of configurable algorithms. In practice, most current VPN apps default to WireGuard, or a provider's own proprietary variant built on top of it, because it tends to establish connections quickly and handle network changes (like a laptop moving from Wi-Fi to a wired connection) more gracefully than older protocols.

OpenVPN

OpenVPN has been around far longer and has a long track record of independent scrutiny, which is itself a point in its favor for some users — a protocol that has been extensively examined over many years has had more opportunity for flaws to be found and fixed. It runs over either the UDP or TCP transport protocol; the UDP variant is generally faster, and the TCP variant, while slower, is harder to distinguish from ordinary encrypted web traffic on some networks, which is why it sometimes gets used specifically to get a VPN working on a restrictive network that blocks other protocols. OpenVPN's configuration is also more flexible than WireGuard's, which is part of why it has historically been the default in many VPN apps, even though it is usually not the fastest option available today.

IKEv2/IPsec

IKEv2 (Internet Key Exchange version 2), paired with IPsec for the actual encryption, is notable mainly for how well it handles a device switching networks mid-connection — it was designed with mobile devices in mind, and it can often re-establish a tunnel almost instantly after a network switch without the user noticing a drop. It has native support built into many mobile operating systems, which historically made it a common choice for mobile VPN apps, though WireGuard has increasingly taken over that role as well.

L2TP/IPsec and PPTP: older protocols worth knowing about, mainly to avoid

L2TP (Layer 2 Tunneling Protocol) doesn't provide encryption on its own, so it is always paired with IPsec to actually secure the tunnel; it still shows up in some older or built-in operating-system VPN clients. PPTP (Point-to-Point Tunneling Protocol) is considerably older still, and its encryption has known, well-documented weaknesses that make it unsuitable for anything privacy-sensitive today. If a VPN app or a manual configuration guide offers PPTP as an option, that is generally a sign to pick a different protocol instead, not a sign that PPTP is the right choice for a particular use case.

None of these protocols are being ranked here as objectively "best" outside of context — WireGuard is a reasonable modern default for most people, but the right choice can depend on the network you're on and what the VPN app actually offers. What matters is understanding that the protocol setting in a VPN app isn't cosmetic — it changes how the tunnel itself is built.

Does a VPN tunnel protect everything on my device, or just my browser?

A properly functioning VPN tunnel operates at the operating-system network level, not inside an individual app or browser, which means it applies to essentially all network traffic leaving the device by default — not just web browsing, but background app updates, other installed apps' network requests, and system-level traffic too. This is different from, say, a browser extension that only reroutes traffic from that one browser; a device-wide VPN client, once connected, is generally routing the whole device's traffic through the tunnel unless something is specifically configured to bypass it.

Two features worth understanding because they directly involve what does and doesn't go through the tunnel:

Split tunneling

Split tunneling is a feature, offered by many VPN apps, that lets you deliberately exclude specific apps or destinations from the tunnel — for example, routing your browser through the VPN while letting a local network printer or a banking app connect directly. It is an explicit, user-configured exception to the default all-traffic behavior, not something that happens automatically.

Kill switch

A kill switch is a safety mechanism that blocks all network traffic from leaving your device if the VPN tunnel drops unexpectedly, rather than silently letting traffic fall back to your normal, unprotected connection. Without one, a momentary tunnel disconnection — which can happen on an unstable network — could mean a few requests go out over your normal connection, briefly exposing your real IP address, without any obvious sign that it happened. This is one of the more consequential settings to check is enabled if the whole reason you're using a VPN is to consistently hide your IP address or route around network restrictions.

What can a VPN tunnel actually hide, and what does it not hide?

Because "tunnel" and "encryption" get talked about as if they solve every privacy problem at once, it is worth being specific and honest about the boundaries.

What the tunnel does hide, from the network between your device and the VPN server:

  • The actual content of your traffic (what a website request contains, what data is being transferred).
  • The specific destination of individual connections (which sites and services you're reaching), from anyone observing the network path up to the VPN server — your ISP, or anyone on a shared local network.
  • Your device's real IP address, from the perspective of the websites and services you connect to, since they see the VPN server's IP instead.

What the tunnel does not hide or protect against:

  • Your identity on services you're logged into. If you log into an account with your name, email, or payment details, that service knows who you are regardless of what IP address the request came from. A VPN tunnel changes your visible IP, not your account identity.
  • Browser and device fingerprinting. Websites can identify and track a device through characteristics like browser configuration, installed fonts, screen resolution, and other technical details that a VPN tunnel does not alter at all.
  • Malware or phishing. A VPN tunnel encrypts the path your traffic travels; it does not evaluate whether the content arriving through that path is malicious. Visiting a malicious site or downloading a malicious file over a VPN is exactly as risky as doing so without one.
  • What the VPN server itself can see. The VPN server is, by necessity, the point where your traffic is decrypted back to its original form before being forwarded onward — so the provider operating that server is technically capable of observing that traffic at that moment, which is precisely why a provider's logging policy and jurisdiction matter as a separate question from the tunnel's technical design. The tunnel protects you from third parties on the network path; it does not, on its own, prove anything about what the VPN provider itself does or doesn't retain.
  • DNS leaks, if misconfigured. Normally your VPN tunnel also carries DNS lookups (the process of translating a domain name like example.com into an IP address) through the encrypted tunnel to the VPN provider's own DNS servers. If a device or app is misconfigured and sends DNS queries outside the tunnel instead, that can reveal which sites you're looking up even while the rest of your traffic stays protected — this is why VPN apps generally include, and it is worth confirming is active, DNS leak protection.

What happens when a VPN tunnel drops or reconnects?

Tunnels aren't permanent, unbreakable pipes — they can drop for ordinary reasons: switching from Wi-Fi to mobile data, a brief loss of internet connectivity, the VPN server restarting, or the app itself being closed. What happens next depends on the protocol and the app's configuration.

With protocols designed for mobility, like IKEv2 and WireGuard, a brief network interruption often results in the tunnel silently re-establishing itself within a second or two once connectivity returns, without the user needing to do anything. With less mobility-aware setups, or a longer outage, the VPN app typically needs to renegotiate the connection from scratch — reauthenticating and re-establishing shared encryption keys with the server — which can take noticeably longer and, depending on the app, may briefly leave the device without any tunnel at all in between.

This gap — the moment between a tunnel dropping and a new one being fully established — is exactly what a kill switch, described earlier, exists to cover. Without one, whatever traffic your device sends during that gap goes out over your normal, unprotected connection instead, which is a common and easy-to-miss way that a VPN's protection quietly lapses.

How do the two ends of a tunnel agree on encryption keys in the first place?

Before any of your actual traffic can be encapsulated and encrypted, your device and the VPN server have to go through a setup step called a handshake, which happens the moment you tap "connect" and generally finishes in well under a second on a healthy connection. The broad idea is the same across protocols, even though the exact mechanics differ: your device and the server each generate a temporary key pair, exchange the public half of that pair over the (still unencrypted, at this point) connection, and use a cryptographic technique — most commonly a form of Diffie-Hellman key exchange — that lets both sides independently compute the same shared secret key without ever having transmitted that key itself over the network. Anyone observing the handshake traffic sees the public keys being exchanged, but that information alone is not enough to derive the shared secret both ends end up with.

Alongside the key exchange, the handshake also handles authentication — each side proving to the other that it is who it claims to be, rather than an impostor intercepting the connection. This is typically done with pre-shared keys, certificates, or public-key pairs configured ahead of time (this is part of what happens invisibly when you first log into a VPN app and it provisions your device). Without this authentication step, a tunnel's encryption alone wouldn't protect against a "man-in-the-middle" attack, where an attacker sits between you and the real VPN server and negotiates separate encrypted tunnels with each side, decrypting and re-encrypting traffic as it passes through unnoticed. Modern protocols are specifically designed to make this kind of interception fail the authentication check rather than succeed silently.

Once the handshake completes and both sides hold the same shared session key, the actual traffic-carrying part of the tunnel described earlier in this guide begins, and it continues using that session key (which most protocols periodically rotate for additional security, without you needing to reconnect) until the connection ends or the app renegotiates it.

Can a network operator detect or block VPN tunnel traffic?

Detecting that a VPN tunnel exists at all — as opposed to reading what's inside it — is a different, and generally easier, problem than breaking its encryption, and it is worth understanding the distinction. A network operator, whether that's a corporate IT department, a university, or a national internet censor, cannot read the encrypted contents of a well-implemented tunnel, but several things about a VPN connection can still be visible even without decrypting anything:

  • The destination IP address itself. Many VPN providers' server IP ranges are publicly known or can be identified through routine traffic analysis, so a network operator can block a connection simply by refusing traffic to those addresses, without needing to inspect the traffic's contents at all.
  • Protocol-specific traffic patterns. Each tunneling protocol has recognizable characteristics in its packet structure and handshake — the way OpenVPN's or WireGuard's handshake packets are formatted, for instance, differs from ordinary HTTPS web traffic in ways that deep packet inspection can identify, even without decrypting the payload.
  • Port numbers. Some protocols default to specific, well-known network ports, which are trivial to block outright regardless of what's actually running on them.

This is exactly why some VPN providers offer what's often called an "obfuscated" server mode or a protocol specifically designed to disguise VPN traffic as ordinary encrypted web traffic — it doesn't change the underlying tunnel's encryption, but it changes the outer characteristics that make VPN traffic identifiable in the first place, which matters specifically for getting a VPN to work on a network that actively tries to detect and block it. This is a separate feature from the base tunneling protocol, and not every provider or every server offers it, so it's worth checking for specifically if you expect to need it rather than assuming any VPN connection will get through any network.

Does tunneling protocol choice affect speed?

Yes, and this is one of the more concrete, noticeable ways the tunnel's design shows up in daily use. Every layer of encapsulation and encryption adds some processing overhead and a small amount of extra data to each packet (the outer packet's headers), and different protocols differ in how efficiently they do this. WireGuard's smaller, more modern codebase and lighter-weight cryptographic handshake generally make it the fastest of the mainstream options in most conditions, which is a large part of why it has become the default choice for many VPN providers. OpenVPN, particularly over TCP, tends to carry more overhead and can feel noticeably slower, especially on connections with higher latency, though its TCP mode's ability to disguise itself as ordinary encrypted web traffic can make it the more reliable choice on networks that actively try to block VPN traffic, even at a speed cost.

Beyond protocol choice, distance to the VPN server and that server's own load matter at least as much for real-world speed as protocol choice does — a nearby, lightly loaded server on an efficient protocol will generally outperform a distant, congested one regardless of which protocol is in use. If a VPN connection feels slow, checking both the protocol setting and trying a geographically closer server are both reasonable first troubleshooting steps before assuming something is fundamentally wrong.

Practical takeaway

A VPN tunnel is the mechanism, not the whole product: it is the specific process by which your device's traffic gets encapsulated inside a new, encrypted packet addressed to a VPN server, decrypted and unwrapped there, forwarded to its real destination under the server's IP address, and returned the same way in reverse. Understanding those steps makes a few practical things easier to evaluate: why the protocol setting in your VPN app's settings menu genuinely affects speed and reliability and is worth knowing rather than ignoring, why a kill switch matters for the moments a tunnel drops, and why the tunnel's encryption is only ever part of a VPN's overall trustworthiness — what the provider operating the server at the other end of that tunnel does with the traffic it necessarily has to decrypt is a separate question, governed by its logging policy and jurisdiction rather than by the tunnel's technical design. Read a provider's own policy pages, and our individual provider reviews, for that half of the picture.

Frequently asked questions

Is a VPN tunnel the same thing as encryption?

No — encryption is one part of what a VPN tunnel does, but the tunnel also involves encapsulation (wrapping your original packet inside a new one addressed to the VPN server) and authentication (verifying packets really came from the trusted party at each end). Encryption alone would scramble your data's contents but wouldn't change where the packet is addressed or hide your IP address from the destination; encapsulation is what actually reroutes traffic through the VPN server and swaps out the visible IP.

Can my internet provider see what I'm doing if I'm connected to a VPN tunnel?

Your internet provider can see that your device is sending encrypted traffic to the IP address of a VPN server, and roughly how much data is being transferred, but it cannot see the contents of that traffic or which specific websites and services you're actually reaching through the tunnel — that information is inside the encrypted, encapsulated packet.

Why does my VPN app let me choose between different tunneling protocols?

Different protocols — WireGuard, OpenVPN, IKEv2/IPsec, and others — implement encapsulation, encryption, and authentication differently, which creates real trade-offs in speed, how well the connection survives switching networks, and how well the traffic can get through networks that try to block VPN connections. Having a choice lets you pick the protocol best suited to your situation rather than being locked into one.

Does a VPN tunnel protect my whole device, or just my browser?

A standard VPN app's tunnel operates at the operating-system network level and by default carries essentially all of a device's network traffic, not just a single browser's — including other installed apps and background system traffic — unless a feature like split tunneling is specifically used to exclude certain apps or destinations from it.

If the VPN tunnel is encrypted, can the VPN provider still see what I'm doing?

Technically, yes, at the moment traffic passes through the VPN server — the server has to decrypt each packet back to its original form in order to forward it to its real destination, so the provider operating that server is capable of observing that traffic. This is why a provider's logging policy and jurisdiction are a separate, important question from the tunnel's encryption itself; the tunnel protects you from third parties on the network path, not necessarily from the provider operating the tunnel's endpoint.

What happens to my data if the VPN tunnel suddenly disconnects?

Without a kill switch enabled, a device typically falls back to sending traffic over its normal, unprotected connection during and after a tunnel drop, which can briefly expose your real IP address without an obvious warning. A kill switch instead blocks all network traffic until the tunnel is fully re-established, which is why it's worth confirming is turned on if consistent protection matters to you.