Skip to content

The word "tunnel" suggests a physical thing: a pipe that your data enters at one end and leaves at the other. That picture is helpful for about five seconds and misleading afterwards. A VPN tunnel is not a place, a cable or a separate road. It is a way of packaging data so that, as it crosses networks you do not control, nobody can see what is inside or where it is ultimately going.

This article takes the tunnel apart. You will see how one packet is wrapped inside another, what a watcher on the cafe network actually observes, how a tunnel is born, kept alive and closed, why it costs a small amount of speed, and what the symptoms are when one stalls. For the larger story of why people use VPNs at all, how a VPN works is the right companion.

A tunnel is a method, not a place

Everything on the internet travels as packets: small chunks of data, each with a label on the front (the header) saying where it is from and where it is going. Your phone makes these constantly, one for every little piece of a web page, a message or a video frame.

Tunnelling means taking one of those complete packets, label and all, and treating it as cargo. The VPN software puts the whole thing inside a new packet with a new label. This technique is called encapsulation. The new label points at the VPN server, not at the website you wanted. Because the cargo is also encrypted, the original label and contents are unreadable to anyone along the way.

A courier comparison works well. Imagine you want to send a letter to a friend but do not want the post office, or the neighbours on your street, to know who it is for. You put the finished letter, with the friend's name on the envelope, inside a bigger sealed box addressed to a trusted office. The office opens the box, reads the inner envelope and forwards it. Along the road, the box shows only the office address. That box is the tunnel; the sealed lid is the encryption.

Two points follow immediately.

  • The tunnel travels over the same cables as everything else. Nothing special is dug. What changes is how the data looks from outside.
  • The tunnel exists only between its two ends. Before your device wraps the packet and after the server unwraps it, the data is in its ordinary form.

The anatomy of a tunnelled packet

Seeing the layers makes the idea concrete. A packet inside a tunnel has two sets of labels and one encrypted core.

Layer What it contains Who can read it
Outer header Your device's address as sender, the VPN server's address as recipient Anyone on the path: the cafe router, your internet provider
Tunnel wrapper Technical fields that identify the session and let the server decrypt Visible as metadata, but meaningless without the keys
Encrypted core The original packet, including its own header and its data Only your device and the VPN server
Inside the core The real destination, such as a website, and the request Hidden from the path; visible to the VPN server after decryption

Now consider what different observers see.

  • Someone on the same Wi-Fi. They see that your device exchanges a steady stream of encrypted packets with a single server address. They do not see which sites or apps are behind them.
  • Your internet provider. Same view: traffic to one address, with sizes and timing but no readable content.
  • The website you visit. It sees a request arriving from the VPN server's address, not yours.
  • The VPN server's operator. It sees the inside of the core after decryption. That is the point where trust in the provider matters, covered in more detail in the article on VPN encryption.

A tunnel does not make traffic invisible. An observer can still tell that a VPN is in use, roughly how much data is moving and when. What the tunnel removes is the readable content and the real destinations.

The life of a tunnel: setup, steady state, rekeying and closing

A tunnel is not simply "on". It goes through stages, and knowing them helps explain odd behaviour.

  1. Setup. When you press connect, your app contacts the server, proves who you are and negotiates fresh encryption keys. This is a handshake, and it is why the first second feels slower than the rest. Different VPN protocols do this differently, and the page on VPN protocols compares the families.
  2. Steady state. Packets flow both ways, each wrapped on departure and unwrapped on arrival. The app and server keep a small amount of shared state about the session.
  3. Keepalive. If you are idle, small periodic messages tell the network and the server that the tunnel is still wanted. Many home routers and mobile networks quietly forget idle connections after a minute or two; keepalives prevent that.
  4. Rekeying. Good designs swap the encryption keys regularly during a long session, so that a stolen key would unlock only a short slice of traffic.
  5. Roaming or reconnection. When your phone moves from Wi-Fi to mobile data, your device's address changes. Some designs notice and carry on seamlessly; others must set the tunnel up again. You may see a brief gap.
  6. Teardown. When you disconnect, the session state is discarded and keys are forgotten. Traffic returns to the normal route.

These stages explain three everyday observations. A short pause on connecting is the handshake. A tunnel that dies after the laptop sleeps has lost its keepalive. A brief wobble when you walk out of the building is the roaming step.

Why a tunnel costs a little speed

Every tunnel has a small price. Understanding it removes much of the mystery from "why is my VPN slower".

Extra bytes on every packet. Wrapping adds a new header and some security fields. If your network allows packets up to a maximum size, called the maximum transmission unit, the wrapped packet must still fit. Suppose the path allows packets of 1,500 bytes and the tunnel adds roughly 80 bytes. The original packets inside can then be at most about 1,420 bytes. The real overhead depends on the design and is illustrative here, but the arithmetic is the same everywhere.

Processing. Encrypting and decrypting takes work. Modern processors have dedicated instructions for it, so on current phones and laptops this is rarely the limiting factor.

A longer route. Traffic travels to the server first and then on to the site. The extra distance adds delay, which Cloudflare's explanation of latency describes well.

Fragmentation problems. If the inner packets are too large for the tunnel, they have to be split into pieces, which costs time. Discovering the correct size along a path is the job described in the standard on path MTU discovery. When this discovery breaks, you get a distinctive pattern: small pages and chat messages work, but large uploads or certain sites hang. The usual fix is a lower packet size in the VPN settings, or a different network.

For most people on a decent connection, the combined cost is a few percent of throughput and a few tens of milliseconds. Our page on VPN speed separates these from other causes.

Full tunnel and split tunnel

Two arrangements are common.

Arrangement What goes through the tunnel Typical use
Full tunnel All traffic from the device Protecting everything on untrusted Wi-Fi
Split tunnel Only chosen apps or destinations Keeping a banking app or a local printer outside the tunnel

In a full tunnel, your device's routing table points all internet-bound traffic at the tunnel. In a split tunnel, a short list of exceptions stays on the regular connection. The tunnel mechanism is identical in both; what changes is the list of traffic admitted. The trade-off, explained in what split tunneling is, is convenience against coverage: anything outside the tunnel gets none of its protection.

What a tunnel does not cover

The most important thing a tunnel does not do is extend beyond its end. Two limits are worth saying plainly.

  1. After the server. Once the VPN server unwraps your packet and sends it on, it travels the normal internet. If the connection to the website is HTTPS, it remains encrypted to the site; if it is plain HTTP, it is readable on that last stretch. A tunnel and HTTPS complement each other.
  2. Before you connect and after you disconnect. The tunnel exists only while it is up. Apps that launch on boot, before the VPN is connected, may send their first requests outside it.

Nor does a tunnel check whether the content inside is safe. A malicious file or a phishing page travels through the tunnel exactly as through no tunnel. The tunnel protects the journey, not the cargo.

Kinds of tunnels you may read about

The word is used loosely across networking, so it helps to know the main variants.

  • Remote-access tunnels connect one device, such as your laptop, to a server. This is the type behind personal VPN apps and staff working from home.
  • Site-to-site tunnels join two whole networks, for example a head office and a branch, so that every device in both can reach each other without installing anything.
  • Tunnel mode and transport mode are two options in the IPsec family of standards. In tunnel mode the entire original packet is wrapped; in transport mode only the payload is protected and the original header stays. The security architecture standard, RFC 4301, defines both.
  • Layer choice. Some tunnels carry whole network frames, others only IP packets. Consumer VPN apps almost always use IP packets because it is simpler and lighter.
  • Transport underneath. The outer packets can ride on UDP or TCP. UDP tends to be quicker, while TCP can pass through some strict networks more easily at a cost in efficiency. This is a design detail that your app normally picks for you.

When a tunnel stalls: symptoms and fixes

Tunnels are reliable, but they occasionally go quiet. Here are the common symptoms and a sensible order of response.

Symptom Likely cause What to try
App says connected, no pages load after waking the device The tunnel went stale during sleep Disconnect and reconnect
Small pages work, large ones or uploads hang Packet size problem Switch networks, or lower the packet size if your app offers it
Everything slows after moving from Wi-Fi to mobile data The tunnel is re-establishing Wait a few seconds; reconnect if it persists
Connected, but some sites show errors A routing or DNS hiccup on that path Choose another location
Tunnel drops repeatedly on one network That network filters or resets idle sessions Use mobile data there; check keepalive options
Traffic seems to flow with the VPN off The tunnel fell and nothing blocked leaks Turn on the kill switch if your app has one

Fix one thing at a time. The tunnel is simple in principle, so a clean reconnect solves a large share of problems.

Summary

A VPN tunnel is a method of encapsulation: each of your packets, label and all, is wrapped inside a new encrypted packet addressed to the VPN server, which unwraps it and forwards it. The tunnel exists only between your device and that server, goes through setup, keepalive, rekeying and teardown stages, and costs a little overhead in bytes, processing and distance. Observers on the path can see that a tunnel exists and how busy it is but not what is inside, and the tunnel does not protect what happens after the server or vet the cargo itself.

When you want a simple way to try this yourself, the pricing page shows prepaid options that connect through a free app.

Frequently asked questions

Is a VPN tunnel a physical cable or a real pipe?

No. A tunnel is a way of packaging data. Your original packets are placed inside new, encrypted packets, and those travel over the ordinary internet. The word tunnel describes the effect, which is that outsiders cannot see inside.

Does a VPN tunnel go all the way to the website I visit?

No. The tunnel runs between your device and the VPN server. After the server, your traffic continues over the normal internet, which is why HTTPS still matters for the last stretch.

Why does a VPN tunnel slow things down a little?

Wrapping adds extra bytes to every packet, encryption takes processing time, and the route usually becomes longer because traffic detours through the server. These costs are small on a good connection.

What happens if the tunnel drops while I am online?

Without protection, your device may quietly go back to sending traffic on the normal route. A kill switch, if your app has one, blocks traffic until the tunnel returns. Check that the setting is on.

Is a split tunnel still a tunnel?

Yes. A split tunnel sends only selected apps or destinations through the tunnel, while everything else uses the normal connection. The tunnel itself works the same way.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Need a VPN for a short trip or a busy month?

XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.

See passes

Keep reading

VPN Security

What Is VPN Encryption?

VPN encryption scrambles your data between your device and the VPN server. Here is how keys, ciphers and the handshake work, and what encryption cannot do.

10 min read

VPN Basics

What Is a VPN Protocol?

A VPN protocol sets the rules for how your device and a VPN server connect and protect traffic. Here is what that means in plain language, with the main trade-offs.

9 min read

VPN Security

What Is Split Tunneling?

Split tunneling lets you choose which apps or sites use the VPN and which go straight to the internet. It is flexible, but it also changes what is protected.

9 min read

VPN Security

What Is a VPN Kill Switch?

A kill switch stops your device from quietly falling back to an unprotected connection when the VPN drops. Here is how the idea works and how to check it.

12 min read

VPN Basics

How Does a VPN Work?

A step-by-step walk through what happens when you connect to a VPN and open a website: the handshake, the tunnel, the server and the return trip.

9 min read