On this page

Summary: A VPN tunnel is a path created by encapsulation: your device wraps each outgoing packet inside a new outer packet addressed to the VPN server, the networks in between deliver it using only that outer address, and the server unwraps it and sends the original packet on. The tunnel is the wrapping, not the encryption. Most consumer VPN protocols also encrypt the wrapped packet, but some tunneling protocols do not, and even an encrypted tunnel covers only the traffic your device actually routes into it, and only as far as the VPN server.

VPN Advisors is an independent, affiliate-supported website that explains how VPNs work, what they protect, and how to evaluate VPN services. This article explains what a VPN tunnel is, how it carries traffic through packet encapsulation, and why tunneling and encryption are separate processes. For a broader look at how VPN traffic moves and is protected, see our How Does a VPN Work? guide.

What a VPN tunnel actually is

In networking, a tunnel is built by encapsulation: placing one complete packet inside another. The IETF's Generic Routing Encapsulation specification (RFC 2784) describes the pattern in its most general form. The packet being carried is the payload packet, and the outer protocol that carries it is the delivery protocol. Nothing physical is created. "Tunnel" describes what happens to the packets: they cross the internet sealed inside an outer packet, and only the two ends of the tunnel open them.

In a consumer VPN, those two ends are the VPN client on your device and the VPN server. NIST's description of IPsec tunnel mode in its Guide to IPsec VPNs (SP 800-77 Rev. 1) shows the structure plainly: the new outer header lists the tunnel endpoints as the packet's source and destination, and the entire original packet, including its own header, becomes the payload.

What a VPN tunnel actually is
Part of the packet What it holds Who uses it
Outer header Your device's current network address (which a router can translate) and the VPN server's address Your Wi-Fi network, your internet provider, and every router between you and the VPN server
Tunnel protocol header Information the server needs to match the packet to your connection and process it The VPN server
Inner packet The original packet: its real destination (such as a website), ports, and data The VPN server, which unwraps it and forwards it

Anatomy of a tunneled packet. Exact header layouts vary by protocol.

Routers along the way forward the packet by its outer header, so they can deliver it to the VPN server without reading the inner packet. Whether they could read the inner packet if they tried is a separate question, and encryption answers it.

Tunneling and encryption are separate jobs

The familiar phrase "encrypted tunnel" joins two mechanisms. Encapsulation determines how a packet is carried and where it is delivered. Encryption determines whether someone who intercepts it can read the inner packet. Standards and protocol documentation keep the two apart, and several real protocols show that a tunnel can exist without encryption.

Tunneling and encryption are separate jobs
Protocol How it creates the tunnel Where encryption comes from
IPsec (used by IKEv2 VPNs) Adds a new outer IP header around the whole original packet in tunnel mode; can use UDP encapsulation through NAT, or optional TCP encapsulation when UDP is unavailable ESP, the IPsec protocol that carries the data. ESP can also run with NULL encryption (integrity checks only), which does not conceal packet contents
WireGuard Encapsulates IP packets in UDP Built into the protocol (ChaCha20-Poly1305), with no alternative ciphers by design
OpenVPN Carries packets from a virtual TUN or TAP interface over UDP (the default) or TCP Normally TLS-based security, though the OpenVPN manual notes it also supports non-encrypted tunnels
L2TP Carries PPP traffic inside UDP on port 1701 None for the data itself; relies on IPsec, which is why consumer settings list it as L2TP/IPsec
GRE Wraps a packet of one network protocol inside another None; the specification defines encapsulation only

The table describes protocol design, not any provider's configuration, and is not a ranking.

The GRE specification is explicit that the format itself adds no protection: its security section says a network using GRE should be about as secure as an ordinary IPv4 network. NIST makes a parallel point about L2TP, noting that L2TP used without IPsec, as some internet providers deploy it, is not classified as a VPN in that ISP use case.

The protocols most consumer VPN apps rely on do bind the two jobs together. The WireGuard whitepaper describes encapsulating packets in UDP with authenticated encryption, and the protocol deliberately offers no cipher choices. In IPsec tunnel mode with encryption enabled, NIST notes that encrypting the original header hides the packet's real source and destination, protocol, and ports. These are properties of a protocol and its configuration, not of tunneling as such. The FTC's consumer guidance on VPN apps reports that researchers who studied almost 300 VPN apps found some that did not use encryption at all.

How traffic moves through a VPN tunnel

  1. Your device routes the packet to the VPN interface. When the VPN connects, the client adds a virtual network interface to your device. WireGuard, for example, appears on Linux as an interface named wg0, and OpenVPN uses a TUN or TAP interface. Your operating system's routing rules then decide which packets go to that interface. The app sending the data does not need to know a VPN exists.
  2. The client encapsulates the packet, and usually encrypts it. The original packet becomes the payload, and the client adds the tunnel protocol header and a new outer header addressed to the VPN server.
  3. Your local network and internet provider deliver it to the server. They see the outer header: your address, the server's address, and the tunnel protocol in use. With encryption, the inner destination and content stay hidden, though NIST notes that the number and size of encrypted packets can still be counted.
  4. The VPN server unwraps the packet and forwards it. It removes the outer header, decrypts the payload if encrypted, verifies any integrity protection, checks the recovered packet against its rules, and sends the original packet toward its real destination.
  5. Replies take the same route in reverse. Responses return to the VPN server, which encapsulates them and sends them through the tunnel to your device, where the client unwraps them and hands them to the app.

During a session, your device effectively has two addresses: the outer one given by whatever network you are on, and an inner one used inside the tunnel. Because applications talk through the inner address, NIST explains that the outer address can change, for example when a phone moves from Wi-Fi to mobile data, without breaking existing connections, provided the protocol supports it. IKEv2 does this through an extension called MOBIKE, and NIST describes WireGuard as having the same reconnection property. And because the VPN server is the one that sends your traffic onward, websites typically see it arriving from the server rather than from your own network connection.

The tunnel ends at the VPN server

An encrypted VPN tunnel protects traffic only between its two endpoints. In NIST's diagrams of remote access VPNs, the segment between the VPN gateway and the final destination is marked as not protected by the VPN. For a consumer VPN, that segment runs from the VPN server to the website or service you are using. Traffic there is only as protected as the connection itself makes it: an HTTPS session stays encrypted between your device and the website, while a protocol that sends data in plain text becomes readable again once it leaves the server.

The server is also where the inner packets are opened. The FTC describes a VPN app as routing your data through servers the VPN provider controls, and in its business guidance on VPN apps notes that a VPN typically hides your traffic's content from your internet provider or public Wi-Fi operator by shifting that trust to the VPN provider, without making you anonymous. The tunnel changes who can observe your traffic on the first leg of its journey. It does not remove observation.

Not all traffic necessarily enters the tunnel

"The VPN is connected" and "this packet went through the tunnel" are different statements. Routing decides what enters the tunnel, and three situations break the simple picture of all traffic flowing through it.

Split tunneling

A split-tunnel setup deliberately sends some traffic through the VPN and the rest directly, by destination or by app. NIST describes it as a common corporate VPN option, and consumer apps use the same idea. On Android, the VpnService API lets a VPN app list allowed or disallowed apps, and apps left outside the tunnel "use networking as if the VPN wasn't running."

Traffic the VPN client does not handle

RFC 7359 documents how a VPN client that handles only IPv4, running on a device that also has IPv6 enabled, can let IPv6 traffic bypass the tunnel and travel unprotected on the local network. The IETF's steering group added a note to that document making a broader point: leakage can occur through any unencrypted interface on the system, including split tunnels configured in the VPN software itself.

Routing changes from the local network

Many VPN clients steer traffic into the tunnel with routing rules, so anyone who can change those rules can steer traffic out. CVE-2024-3661, publicized in May 2024 as TunnelVision, showed that DHCP, the protocol networks use to hand out addresses, can add routes to a device's routing table through its classless static route option (option 121). An attacker on the same local network who can control DHCP responses can use this to divert traffic over the physical connection while the VPN stays up. They can observe or disrupt diverted traffic and may read or alter content that is not separately encrypted; HTTPS-protected content remains encrypted. The vulnerability carries a CVSS base score of 7.6.

NIST's guidance names the underlying design difference: policy-based IPsec configurations, which enforce what traffic must be protected, are not vulnerable to routing table changes the way routing-based IPsec setups are. Client design matters too. In reporting on TunnelVision, at least one consumer VPN provider said its desktop apps use firewall rules to block traffic to public addresses outside the tunnel, while acknowledging that its iOS app was affected.

Reading "secure tunnel" in VPN descriptions

"Secure tunnel" and "encrypted tunnel" are common shorthand in VPN marketing, but they are not standardized terms, and even technical vocabulary is loose. NIST points out that IKE and IPsec are often used interchangeably although that is not correct, and that some L2TP implementations confusingly require turning off "L2TP encryption" to turn on IPsec. RFC 7359 notes that "SSL VPN" can mean either a full tunnel for all traffic or a browser portal that wraps access to specific services. When a product says it creates a secure tunnel, three questions establish what the claim actually covers:

  • What creates the tunnel, and does that protocol encrypt the inner packet?
  • Which traffic is routed into it: everything, selected apps or destinations, and both IPv4 and IPv6?
  • Where does it end, and who operates that endpoint?

The answers describe a specific implementation. The tunnel concept on its own guarantees none of them.