How Does a VPN Work? Encryption & Tunneling Explained (2026)

Mara Vale, Multi-Account Operations Consultant
—

I’ve been deploying VPNs across client operations for over a decade — managing ad accounts, market research infrastructure, multi-region e-commerce setups — and the question I get asked most often isn’t “which VPN should I use?” It’s “how does a VPN actually work?”

That’s the right question to ask. If you understand the mechanics, you can make better decisions about when a VPN solves your problem, when it doesn’t, and which configuration is appropriate for your threat model. Surface-level “it hides your IP” explanations leave out the parts that matter for anyone running a serious operation.

This guide is written for business operators, not cryptography students. I’ll go deep enough to be accurate but keep it grounded in practical terms. By the end, you’ll know what your VPN is doing under the hood, what your ISP can and cannot see, and how to evaluate whether a provider’s protocol choices are sound.


How a VPN Works (Simple Version)

At its core, a VPN does two things simultaneously: it encrypts your traffic and it routes that traffic through an intermediary server. These two functions work together to both secure your data and mask your origin.

Without a VPN, here’s what happens when you visit a website:

  1. Your device sends a request to your ISP’s DNS resolver, asking for the IP address of the site.
  2. Your ISP routes your request across the internet to the destination server.
  3. The destination server sees your real IP address in the request header.
  4. The response travels back through your ISP to your device.

Every hop in that chain — your ISP, any transit networks, the destination server — has visibility into some part of that exchange. Your ISP sees everything. The destination sees your IP. DNS resolvers see your query.

With a VPN, the chain changes completely.

The Journey of a Request

When you activate a VPN connection, here is what actually happens:

Step 1 — Handshake and key exchange. Your VPN client and the VPN server perform a cryptographic handshake. Both sides exchange public keys and agree on session keys that will be used to encrypt this specific session. This key exchange uses asymmetric cryptography (typically RSA-4096 or Elliptic Curve Diffie-Hellman), meaning the keys used to establish the session are never transmitted in a form that could be intercepted and used by a third party.

Step 2 — Tunnel establishment. Once the keys are agreed upon, the VPN client and server establish a secure tunnel. Think of it as a private pipe running through the public internet — everything inside the pipe is encrypted and unreadable to anyone who can only see the outside.

Step 3 — Traffic encryption on your device. Every packet of data your device sends is now encrypted by the VPN client before it leaves your machine. Your ISP receives encrypted data addressed to the VPN server’s IP address. That is all they see.

Step 4 — Transit through the tunnel. The encrypted packet travels from your device to the VPN server. Anyone intercepting this packet — whether at the ISP level, a transit network, or a coffee shop router — sees only encrypted noise.

Step 5 — Decryption and forwarding. The VPN server receives the encrypted packet, decrypts it, and reads the original request. It then forwards that request to the destination website or service, using the VPN server’s IP address as the origin. The destination sees the VPN server, not you.

Step 6 — Return path. The destination server sends its response back to the VPN server’s IP. The VPN server encrypts the response and sends it back through the tunnel to your device. Your VPN client decrypts it and delivers the data to your browser or application.

The entire round trip typically adds 10–40 milliseconds of latency on a good VPN server. On a modern WireGuard-based connection to a nearby server, the overhead is often imperceptible.

If you want a broader introduction to what these tools are used for, see what is a VPN before diving deeper into the technical mechanics here.


Encryption Explained

The word “encryption” gets thrown around without specifics. Let me be precise about what’s actually happening.

Encryption converts readable data (plaintext) into unreadable data (ciphertext) using a mathematical algorithm and a key. Only someone with the correct key can reverse the process and recover the original data. The strength of encryption depends on the algorithm, the key length, and how keys are managed.

AES-256: The Industry Standard

Most reputable VPNs use AES-256-GCM for encrypting data in transit. AES stands for Advanced Encryption Standard. 256 refers to the key length in bits. GCM (Galois/Counter Mode) is the mode of operation, which adds authentication — meaning the receiver can verify that data hasn’t been tampered with in transit, not just that it’s encrypted.

To put AES-256 in perspective: a brute-force attack attempting every possible key combination would require more computational operations than there are atoms in the observable universe, even with hardware that doesn’t currently exist. The algorithm itself has been publicly scrutinized for decades and has no known practical weaknesses. It’s used by banks, governments, and militaries globally.

The 256-bit key length isn’t marketing — 128-bit AES is also considered unbreakable in practice, but 256-bit provides additional margin against theoretical future advances in computing.

GCM mode specifically matters because it’s an authenticated encryption scheme. It ensures:

  • Confidentiality: the data is encrypted
  • Integrity: any tampering with the ciphertext is detectable
  • Authenticity: you can confirm the data came from the legitimate VPN server

Some newer VPN implementations use XChaCha20-Poly1305 instead of AES-256-GCM. This is also a strong, authenticated encryption scheme, and it’s particularly efficient on devices without dedicated AES hardware acceleration (older CPUs, some mobile devices). WireGuard uses ChaCha20-Poly1305 as its default cipher, which is one reason WireGuard benchmarks faster than OpenVPN on certain hardware.

Key exchange vs. session encryption — these are two different processes. AES-256 is a symmetric cipher: the same key is used to encrypt and decrypt. Both your device and the VPN server need that key. But you can’t send the key over an unencrypted connection without risking interception.

This is solved by the initial handshake using asymmetric cryptography: RSA-4096 or ECDH (Elliptic Curve Diffie-Hellman). Asymmetric algorithms use mathematically linked key pairs — data encrypted with one key can only be decrypted with the other. This allows two parties to establish a shared secret over a public channel without ever transmitting the secret itself. Once the session key is established, symmetric AES-256 takes over for all traffic (it’s much faster for bulk data).


Tunneling and Protocols

The protocol layer is what governs how tunneling and encryption are assembled, negotiated, and maintained. VPN protocols are often misunderstood — they’re not just different implementations of the same thing, they have meaningfully different security properties, performance characteristics, and compatibility trade-offs.

Protocol Comparison

ProtocolCipherSpeedSecurityBest Use Case
WireGuardChaCha20-Poly1305Very fastExcellentGeneral use, speed-critical workloads
NordLynx (NordVPN)ChaCha20-Poly1305Very fastExcellentGeneral use on NordVPN
OpenVPNAES-256-GCMModerateExcellentRestrictive networks, legacy compatibility
IKEv2/IPSecAES-256-GCMFastVery goodMobile devices, frequent network switching
L2TP/IPSecAES-256SlowFairLegacy use only
PPTPRC4/MPPEFastPoor — avoidDo not use

WireGuard and NordVPN WireGuard (NordLynx)

WireGuard is the most significant development in VPN protocol design in years. Released as stable in 2020 and now integrated into the Linux kernel, WireGuard’s design philosophy prioritizes simplicity: the entire codebase is approximately 4,000 lines of code, compared to 70,000+ for OpenVPN. A smaller codebase means a smaller attack surface and easier security auditing.

NordVPN implements WireGuard as NordLynx, with a modification that addresses WireGuard’s original privacy limitation. By default, WireGuard requires storing the client’s IP address on the server to maintain the connection state — a potential logging concern. NordVPN’s NordLynx implementation wraps WireGuard with a double NAT system that eliminates this requirement, allowing WireGuard’s performance while avoiding static IP assignment at the server level.

In practical testing, NordLynx consistently delivers the fastest speeds among VPN protocols. For operations where throughput matters — large file transfers, video feeds, high-volume scraping infrastructure — this is the protocol to use.

NordVPN’s implementation also supports perfect forward secrecy: session keys are rotated periodically, so even if a key were somehow compromised in the future, it would not decrypt past sessions. See the full NordVPN review for how this translates to real-world performance.

OpenVPN

OpenVPN has been the VPN industry standard for over 15 years. It’s open-source, extensively audited, and widely supported. It uses the OpenSSL library for cryptography, giving it access to a wide range of cipher suites.

The main advantage of OpenVPN today is its ability to run on TCP port 443 — the same port used by HTTPS traffic. This makes OpenVPN extremely difficult to block or detect using deep packet inspection (DPI), because it can be configured to look like standard web traffic. For operations in restrictive network environments, OpenVPN TCP remains the most reliable option.

The tradeoff is performance. OpenVPN runs in userspace (not kernel space like WireGuard), adding overhead. On typical hardware, OpenVPN throughput is 30–50% lower than WireGuard for the same connection.

IKEv2/IPSec

IKEv2 (Internet Key Exchange version 2) paired with IPSec is particularly well-suited to mobile use cases. Its key feature is MOBIKE (Mobility and Multihoming Protocol), which allows VPN connections to persist seamlessly when a device switches between networks — for example, moving from Wi-Fi to a cellular connection. Most other protocols drop and re-establish the connection during a network change.

IKEv2 is natively supported on iOS and Android, which means lower battery consumption compared to running a userspace VPN client. For teams deploying VPNs across mobile devices, this matters.

Protocols to Avoid

PPTP (Point-to-Point Tunneling Protocol) was developed in the 1990s and should not be used under any circumstances. Its encryption has been broken, and session hijacking is feasible with modest resources. The only reason it still appears in provider lists is backward compatibility.

L2TP/IPSec is not broken the same way PPTP is, but there are documented concerns about its design. Documents disclosed in 2013 suggested the NSA had worked to introduce weaknesses into certain IPSec standards. While L2TP with AES-256 is not trivially broken, the uncertainty combined with its performance disadvantages relative to WireGuard and OpenVPN makes it a poor choice for new deployments.


What Your ISP Can Still See

Understanding how vpn works doesn’t mean assuming the VPN makes you invisible. Your ISP sees less, but they don’t see nothing. Understanding exactly what remains visible is essential for accurately evaluating your privacy posture.

Visible vs. Hidden

What your ISP CAN see with a VPN:

  • That you are connected to a VPN server (they can see the VPN server’s IP address and sometimes identify it as belonging to a VPN provider)
  • The approximate volume of data you’re transmitting
  • Connection timing — when you connected, for how long, and when you disconnected
  • That you are using a VPN protocol (most VPN traffic has identifiable characteristics, though obfuscation features can reduce this)

What your ISP CANNOT see with a reputable VPN:

  • The websites or services you’re accessing
  • The content of your communications
  • Your DNS queries (a good VPN routes DNS through its own encrypted resolver — DNS leaks are a failure mode to test for)
  • The URLs or specific pages you visit
  • Any data you send or receive

The important nuance: “your ISP can see you’re using a VPN” is not necessarily a problem. Millions of businesses use VPNs for entirely routine operational purposes. What matters is that they cannot see the content or destination of your traffic.

What the destination website sees:

  • The VPN server’s IP address (not your real IP)
  • Standard browser fingerprinting data (user agent, screen resolution, etc.) — this is not affected by the VPN
  • Cookies and logged-in session data — if you log into an account, the website knows who you are regardless of what IP you’re connecting from

The VPN handles network-layer identity (your IP address). It does not handle application-layer identity. If you need to understand where VPNs fit relative to other anonymization tools, VPN vs. proxy covers the practical differences.

DNS leaks are the most common VPN failure mode affecting ISP visibility. If your VPN client doesn’t route DNS queries through its own resolver, those queries travel unencrypted to your ISP’s DNS server, revealing every domain you look up. Any serious VPN provider includes built-in DNS leak protection. Always test a new VPN setup at dnsleaktest.com to verify.


Limits of VPN Protection

A VPN is a network-layer tool. It secures the pipe. It does not secure the endpoints, the applications, or the browser environment. Understanding these limits prevents overconfidence in deployment decisions.

Edge Cases Where a VPN Doesn’t Help

Browser fingerprinting. Your browser exposes a substantial amount of identifying data beyond your IP address: user agent string, screen resolution, system fonts, installed plugins, WebGL renderer, canvas rendering signature, and more. This fingerprint can identify you across sessions even when your IP changes. A VPN does not change your browser fingerprint. For operations where cross-session anonymization matters, you need anti-detect browser technology layered on top of network-level VPN protection — these are complementary tools, not substitutes.

Logged-in accounts. If you log into Google, Facebook, or any account-based service while on a VPN, the service knows who you are. The VPN masks your IP from them, but your account credential is a more direct identifier than your IP ever was.

Application-level data. A VPN encrypts the transport layer. Applications that independently transmit identifying information (device IDs, advertising identifiers, app-specific tokens) can bypass the privacy benefit of the VPN at the application layer. On mobile devices in particular, apps frequently use device identifiers that persist independently of network configuration.

Malware and credential theft. A VPN does not protect against malware on your device. If keyloggers, RATs, or other malicious software are running, they can exfiltrate data that has already been decrypted on your device before the VPN client even sees it. Network-layer encryption stops external network interception; it doesn’t stop local compromise.

VPN provider as the new trust point. When you use a VPN, you’re shifting trust from your ISP to your VPN provider. Your ISP no longer sees your traffic — but your VPN provider does. This is why provider selection and no-log audit verification matter. A provider that logs traffic and then shares those logs with third parties provides far weaker protection than your ISP would have. Is NordVPN safe? covers what their independent audits actually verified, and are free VPNs safe? explains why the economics of free VPNs create structural logging incentives.

WebRTC leaks. WebRTC, a browser technology used for video calls and peer-to-peer connections, can expose your real IP address through the browser even while a VPN is active. This is because WebRTC connections can bypass the VPN tunnel. Most VPN clients include WebRTC leak protection, and browser extensions like uBlock Origin can block WebRTC exposure. Test for this at browserleaks.com/webrtc.

The kill switch matters. If your VPN connection drops unexpectedly, your device will typically fall back to your regular internet connection, immediately exposing your real IP and unencrypted traffic. A kill switch — which blocks all internet traffic if the VPN tunnel drops — is essential for any operation where momentary exposure is unacceptable. Verify your VPN has this feature and that it’s enabled.


Putting It Together: Making Informed Deployment Decisions

Here’s how I synthesize this for operational decisions:

Choose WireGuard-based protocols (NordLynx, Lightway, or native WireGuard) as your default. The performance advantage and smaller attack surface are meaningful, and the encryption is not weaker than OpenVPN — it’s differently implemented but equally sound.

Use OpenVPN TCP as a fallback in network environments where VPN connections are restricted or throttled. Port 443 TCP is very difficult to block without also breaking HTTPS for everyone.

Verify your provider’s no-log claims are backed by independent audits, not just marketing statements. NordVPN has completed multiple independent audits by Deloitte. Try NordVPN if you want a provider where audit verification is a documented practice, not an aspiration.

Test for leaks before deploying. DNS leak test, WebRTC leak test, IP confirmation — run these on any new VPN configuration before relying on it for anything sensitive.

Layer tools appropriately. If network-layer IP masking is what you need, a VPN solves it. If you need device fingerprint isolation across sessions, you need anti-detect tooling. If you need to run isolated browser profiles at scale, you need both. The tools are complementary and serve different layers of the stack.


Frequently Asked Questions

How does a VPN work?

A VPN works by installing an encrypted tunnel between your device and a VPN server. When you connect, your device and the VPN server exchange encryption keys and establish a secure channel. All your internet traffic is encrypted on your device, sent through this tunnel to the VPN server, decrypted there, and then forwarded to the website or service you’re requesting. The website sees the VPN server’s IP address, not yours. Return traffic follows the reverse path.

What encryption do VPNs use?

Most reputable VPNs use AES-256-GCM encryption for data in transit — the same standard used by banks and governments. Some VPNs, including those using WireGuard, use XChaCha20 instead. For key exchange (establishing the encrypted connection), VPNs use asymmetric algorithms like RSA-4096 or Elliptic Curve Diffie-Hellman (ECDH). The protocol layer (WireGuard, OpenVPN, or IKEv2) governs how these encryption components are assembled and negotiated.

What is VPN tunneling?

VPN tunneling refers to the process of encapsulating your network packets inside another encrypted packet for transmission. Think of it as putting your letter inside a sealed envelope (encryption) inside a courier package (the tunnel). The outer package travels over the public internet to the VPN server, where the courier package is opened, the sealed envelope is decrypted, and your original message is forwarded to its destination. The tunnel ensures that anyone intercepting the courier package can’t read what’s inside.

Can my ISP see my traffic with a VPN?

With a VPN, your ISP can see that you’re connected to a VPN server and the volume of data you’re sending, but cannot see the content of your traffic or the websites you’re visiting. Your ISP sees encrypted data flowing to the VPN server’s IP address — that’s it. They cannot see your DNS queries (with a good VPN), the URLs you visit, or the content of your communications.

Which VPN protocol is best?

WireGuard-based protocols (NordLynx in NordVPN, Lightway in ExpressVPN) are the best choice for most users in 2026 — they’re the fastest, most modern, and have the smallest code surface for security auditing. OpenVPN is older but battle-tested and works in more restrictive network environments. IKEv2 is good for mobile devices because it handles network switching (Wi-Fi to cellular) cleanly. Avoid PPTP and L2TP/IPSec — they’re outdated and carry documented security concerns.


About the Author

Mara Vale is a multi-account operations consultant with over 10 years of experience in performance marketing and online business infrastructure. He tests and reviews privacy tools, anti-detect browsers, proxies, and automation software from an operational practitioner’s perspective — not a theoretical one. His focus is on tools that real businesses actually deploy to manage accounts, run market research, and maintain operational security. He writes independently, based on hands-on testing.

Thinking about NordVPN?

Mara tested it hands-on. Check the current plans, pricing and free-trial options for yourself.

Visit Official Website

Frequently Asked Questions

Frequently Asked Questions

How does a VPN work?

A VPN works by installing an encrypted tunnel between your device and a VPN server. When you connect, your device and the VPN server exchange encryption keys and establish a secure channel. All your internet traffic is encrypted on your device, sent through this tunnel to the VPN server, decrypted there, and then forwarded to the website or service you're requesting. The website sees the VPN server's IP address, not yours. Return traffic follows the reverse path.

What encryption do VPNs use?

Most reputable VPNs use AES-256-GCM encryption for data in transit — the same standard used by banks and governments. Some VPNs, including NordPass, use XChaCha20 instead. For key exchange (establishing the encrypted connection), VPNs use asymmetric algorithms like RSA-4096 or Elliptic Curve Diffie-Hellman (ECDH). The protocol layer (WireGuard, OpenVPN, or IKEv2) governs how these encryption components are assembled and negotiated.

What is VPN tunneling?

VPN tunneling refers to the process of encapsulating your network packets inside another encrypted packet for transmission. Think of it as putting your letter inside a sealed envelope (encryption) inside a courier package (the tunnel). The outer package travels over the public internet to the VPN server, where the courier package is opened, the sealed envelope is decrypted, and your original message is forwarded to its destination. The tunnel ensures that anyone intercepting the courier package can't read what's inside.

Can my ISP see my traffic with a VPN?

With a VPN, your ISP can see that you're connected to a VPN server and the volume of data you're sending, but cannot see the content of your traffic or the websites you're visiting. Your ISP sees encrypted data flowing to the VPN server's IP address — that's it. They cannot see your DNS queries (with a good VPN), the URLs you visit, or the content of your communications.

Which VPN protocol is best?

WireGuard-based protocols (NordLynx in NordVPN, Lightway in ExpressVPN) are the best choice for most users in 2026 — they're the fastest, most modern, and have the smallest code surface for security auditing. OpenVPN is older but battle-tested and works in more restrictive network environments. IKEv2 is good for mobile devices because it handles network switching (Wi-Fi to cellular) cleanly. Avoid PPTP and L2TP/IPSec — they're outdated and less secure.

See the latest features and current pricing for yourself.

Get NordVPN

Continue Reading

Special Discount Available — Limited Time!
Get NordVPN Now →