Skip to main content
Online Security

What Is a VPN? How It Works, What It Hides and Where It Falls Short

Published 17 min read
A laptop on a desk at night beside a window overlooking Tehran's city lights and Milad Tower, the screen glowing with an abstract world map

In short

A VPN (virtual private network) sends your traffic through an encrypted tunnel to a server run by the VPN provider, so websites see that server's IP address instead of yours [1]. It hides your browsing from your internet provider and local Wi-Fi owner, but the VPN provider can see all of it [1]. It is not an anonymity tool [1].

Key takeaways

  1. A VPN masks your IP address and hides your outgoing traffic from your internet service provider and the local network owner, but everything becomes visible to the VPN provider instead [1].
  2. A VPN is not an anonymity tool: websites can still track you through GPS, cookies, tracking pixels and fingerprinting [1].
  3. Most web traffic now uses HTTPS, so a VPN is no longer essential for everyone on public Wi-Fi; HTTPS still leaves metadata such as domain names visible [1].
  4. The 2024 TunnelVision technique (CVE-2024-3661) showed that an attacker on the same local network can force traffic outside many routing-based VPNs while the app still shows as connected [3][4].
  5. A 2025 investigation found that one in five of the top 100 free VPNs in the US App Store during 2024 were secretly owned by Chinese companies [8].
  6. Check a provider's privacy policy, business model, ownership, audits and protocol (OpenVPN or WireGuard, never PPTP) before trusting it [1].
  7. VPN rules differ by country; in Iran, the Supreme Council for Cyberspace prohibited unlicensed VPNs in February 2024 [11].
On this page 12 sections
  1. What is a VPN and how does it work?
  2. What does a VPN hide, and from whom?
  3. What can a VPN not protect you from?
  4. Do you need a VPN on public Wi-Fi?
  5. Which VPN protocols are safe?
  6. How do you choose a trustworthy VPN?
  7. Are VPNs legal everywhere?
  8. Are business VPNs different?
  9. Common mistakes
  10. Frequently asked questions
  11. Glossary
  12. Sources

What is a VPN and how does it work?

A virtual private network (VPN) is a service that routes all of your device's internet traffic through an encrypted tunnel between your device and a VPN server; the traffic then leaves that server for its final destination [1]. Encryption scrambles data so that only someone with the right key can read it. Because your requests appear to come from the VPN server, the VPN masks your IP address, the numerical address that indicates your general location and can be used to identify you [1].

Cloudflare describes the connection in four steps: the VPN client (the app on your device) connects through your internet service provider (ISP) using an encrypted connection; the ISP passes that connection to the VPN server; the VPN server decrypts the data and connects to the website on your behalf; and the encrypted link between the client and server is what is called the VPN tunnel [2]. Web servers then log only the IP address of the VPN server [2].

What happens on the device?

Technically, a VPN client creates a virtual network interface, a software-only network adapter, and uses it to encrypt and decrypt traffic before handing it to the real Wi-Fi or Ethernet hardware [3]. If all traffic goes through the tunnel it is called a full-tunnel VPN; if some traffic, such as local network traffic, is allowed to bypass it, it is called a split-tunnel VPN [3].

What are VPNs used for?

The Electronic Frontier Foundation (EFF), a digital-rights group, says VPNs are best suited for one thing, routing your connection through a different network, which is useful in two situations: getting around censorship on a network that blocks sites, and connecting to an office network from elsewhere [1]. Cloudflare adds protection on public Wi-Fi and getting around location-based content restrictions to the list of common uses [2].

Bundles of fibre optic cables running through an overhead tray in a data centre, glowing tips catching the light

What does a VPN hide, and from whom?

A VPN hides your outgoing traffic from your ISP and from the owner of the local network, such as a coffee shop or hotel [1]. Because the tunnel passing through the ISP is encrypted, the ISP cannot see what you are doing inside it [2]. From a website's point of view, you appear to be wherever the VPN server is [1].

The trade-off is simple and often missed: while a VPN hides your browsing from the ISP, all of it is visible to the VPN provider [1]. EFF notes that a provider could sell that information, just as an ISP could [1]. Cloudflare's own explainer says users can only feel secure with a VPN if they trust the VPN provider, because a dishonest provider could sell user information or leave users open to attacks [2].

A VPN also does not protect your data from the operator of the private network you join. On a corporate VPN, whoever runs the corporate network sees your traffic; on a commercial VPN, whoever runs the service does [1]. In short, a VPN moves trust from one company (your ISP or Wi-Fi owner) to another (the VPN provider); it does not remove the need for trust.

What can a VPN not protect you from?

Advertising for VPNs often claims they stop criminals, malware, government surveillance and online tracking; EFF says these advertisements vastly oversell the benefits [1]. The main limits are:

  • Tracking. A VPN is not a tool for anonymity. Companies can still track you through GPS, web cookies, tracking pixels or fingerprinting [1].
  • Accounts and history. A VPN does nothing to stop law enforcement from obtaining browsing history saved in your browser or in an account you are logged into [1].
  • Legal requests to the provider. VPN providers are themselves subject to law enforcement requests, and many save as much information as ISPs do [1]. The provider must follow the laws of the countries where it does business [1].
  • Payment links. Paying by credit card links your identity to the account, and the provider may still collect your IP address [1].

Can traffic leak out of a VPN?

Yes. In May 2024, Leviathan Security Group published TunnelVision (CVE-2024-3661), a technique that uses a built-in feature of DHCP, the protocol that hands out network settings, to force a user's traffic off the VPN tunnel so it is sent unencrypted [3]. The US National Vulnerability Database describes the issue: DHCP option 121 can add routes to a device's routing table, and an attacker on the same local network can read, disrupt or possibly modify traffic that was expected to be protected by the VPN [4].

In the researchers' tests, the VPN always continued to report as connected and the kill switch (a feature that blocks traffic if the VPN connection drops) never engaged [3]. Android was unaffected because it does not implement DHCP option 121 [3]. The researchers concluded that VPNs were not designed to mitigate attacks on the physical local network and that promising otherwise is dangerous [3].

What about speed?

Some users see slower connections, depending on the provider's server capacity, and a VPN server far from both the user and the website adds delay [2].

Do you need a VPN on public Wi-Fi?

Not always. EFF says it used to be standard advice to use a VPN on public Wi-Fi, but this is no longer as necessary for everyone because the majority of web traffic is now encrypted with HTTPS [1]. HTTPS is the padlock-protected version of the web protocol, which encrypts what you send and receive with a site.

HTTPS protects the content of communications, not the metadata [1]. On an HTTPS site, parties along the path can usually see the domain name (for example wikipedia.org) and when you visit it, plus the sizes of pages and files, but not the specific page, your login name or your messages [1]. A VPN could hide that metadata from someone listening on the local network, but the VPN provider would see it all [1].

EFF suggests a VPN may be useful when you must use a public network you do not trust and you have a VPN you do trust [1]. The US Federal Trade Commission (FTC) has likewise warned that free public Wi-Fi networks are often insecure, and its 2018 tips for VPN apps were framed around securing information sent over public Wi-Fi [5]. Note that an out-of-date VPN app may not protect you well even then; EFF cites TunnelVision as an example [1].

A traveller seen from behind using a laptop at an airport gate, planes visible outside the windows

Which VPN protocols are safe?

A protocol is the set of rules a VPN uses to build and encrypt the tunnel. If a VPN uses broken encryption such as the Point-to-Point Tunneling Protocol (PPTP), data flowing through it can be easily decrypted and viewed [1]. EFF points to OpenVPN and WireGuard as the two protocols that have become common for consumer services [1].

WireGuard's developers describe it as a simple, fast and modern VPN that uses state-of-the-art cryptography, such as the Noise protocol framework, Curve25519 and ChaCha20, and say it has been reviewed by cryptographers [7]. It is designed to be small enough to be comprehensively reviewed by one person, unlike much larger IPsec or OpenVPN codebases [7].

For organisations, the UK National Cyber Security Centre (NCSC) says the most widely used protocols are TLS and IPsec, recommends IPsec for VPN access because it is an open standard built into many operating systems, and notes that WireGuard seems promising but is yet to be proven in enterprise contexts [6]. The NCSC also warns that some third-party networks restrict or block IPsec traffic, while TLS VPNs can be more reliable through enterprise firewalls [6].

Apple's iCloud Private Relay is sometimes confused with a VPN. It is designed to protect browsing in Safari, sends requests through two separate relays so that no single party, not even Apple, sees both who you are and which sites you visit, and is not available in all countries or regions [10].

How do you choose a trustworthy VPN?

The FTC's four checks before using a VPN app are: research the app before you get it, review its permission requests, make sure it encrypts your information, and check whether it shares your information with third parties [5]. EFF adds further questions [1]:

  1. Read the privacy policy. A provider might log your data if it does not specifically rule that out, and a claim of no logging is not a guarantee [1].
  2. Ask how it makes money. Some VPNs are free but sell your data; others use freemium data caps or recurring subscriptions [1].
  3. Look for public audits. Independent security audits are a good sign, but practices can change after an audit [1].
  4. Find out who runs it. Be sceptical of a VPN that no one stakes their reputation on, and check its about page for founders or staff [1].
  5. Check the country. The provider is bound by the laws where it operates, including rules on government data requests [1].

Is an app store listing enough?

No. EFF warns not to assume a VPN app is safe because it is in Google Play or the Apple App Store [1]. Apple's App Review Guidelines say VPN apps may not sell, use or disclose data to third parties for any purpose [9]. Yet the Tech Transparency Project reported on 1 April 2025 that 20 of the top 100 free VPNs in the US App Store during 2024 were owned by Chinese companies, none of which clearly disclosed that ownership, and that those apps had been downloaded more than 70 million times [8]. Google Play shows a Verified badge for some VPNs, which EFF describes as a small glimpse into the app's security promises rather than a replacement for research [1].

Are VPNs legal everywhere?

No. EFF advises keeping up to date on specific countries' VPN policies, including bans, and notes that streaming platforms increasingly block devices that appear to use a VPN [1]. Apple requires developers who offer a VPN app in a territory that requires a VPN licence to provide that licence information [9]. This is general information, not legal advice; check the law where you live.

What is the situation in Iran?

Freedom House's Freedom on the Net 2024 report says many Iranians rely on VPNs to reach international services blocked by the authorities [11]. In February 2024 the Supreme Council for Cyberspace prohibited the use of unlicensed VPNs and said individuals would need to apply to purchase licensed VPNs with government approval [11]; analysts quoted in the report say it criminalised not only the distribution and sale but also the use of VPNs [11]. The same report says the ICT Ministry announced in October 2022 that anyone selling or using illegal VPNs could be charged under Article 753 of the penal code, and that services such as NordVPN, Proton VPN and TunnelBear were inaccessible during its coverage period [11]. Freedom on the Net 2025 adds that a near-total, nationwide internet shutdown was imposed in June 2025 [12].

A busy Tehran street at dusk, people walking and checking their phones, shopfronts softly blurred

Are business VPNs different?

Yes. A business VPN connects staff to internal systems rather than masking their location. The NCSC notes that VPN services are part of an organisation's internet-exposed attack surface and must be updated swiftly when security patches are released [6]. It also says there is little benefit in a VPN for an organisation that has fully adopted a zero-trust approach, in which no device is trusted by default [6].

Cloudflare, which sells such alternatives, argues that traditional VPNs can lead to a castle-and-moat model where anything inside the network is automatically trusted, and says many businesses have moved to secure access service edge (SASE) designs instead [2]. For individuals, EFF's view is that for many people a VPN is not the most important security step; it lists end-to-end encrypted messaging among more impactful measures [1].

Who can see what when you visit an HTTPS website, with and without a VPN
PartyWithout a VPNWith a VPN
Local Wi-Fi owner or someone listening nearbyDomain names, visit times and data sizes, but not page content [1]Encrypted traffic to the VPN server; metadata can be hidden from local listeners [1]
Internet service providerDomain names and when you visit them [1]Outgoing traffic hidden; the tunnel is encrypted [1][2]
VPN providerNot involvedAll of your browsing data is visible [1]
Websites you visitYour IP address, which indicates general location [1]The VPN server's IP address [1][2]; tracking by cookies, pixels or fingerprinting still works [1]
Accounts you are logged intoYour activity in that accountUnchanged; a VPN does not protect saved account or browser history [1]
Common VPN protocols and what official or developer sources say about them
ProtocolWhat sources sayTypical use
PPTPBroken encryption; data can be easily decrypted [1]Avoid; fallen out of use because of security concerns [6]
OpenVPNOne of two protocols that have become common; heavy enterprise use [1]Consumer and business VPNs [1]
WireGuardModern cryptography, reviewed by cryptographers, small auditable code [7]Consumer VPNs; not yet proven in enterprise contexts according to the NCSC [6]
IPsecOpen standard, built into many operating systems; recommended by the NCSC [6]Organisations; some networks block it [6]
TLS VPNsCan pass NAT devices and firewalls more reliably; vendors rarely interoperate [6]Organisations using one vendor's client and server [6]

Common mistakes

  • Believing a VPN makes you anonymous online.

    Fix: Treat a VPN as a way to change who sees your traffic. Cookies, pixels, fingerprinting and logged-in accounts still identify you [1].

  • Picking a free VPN without asking how it makes money.

    Fix: Read the privacy policy and business model; some free VPNs sell user data [1].

  • Trusting a VPN because it is in an official app store.

    Fix: Research ownership and audits; a 2025 investigation found undisclosed Chinese ownership among top free VPNs on the US App Store [8][1].

  • Trusting the app's 'connected' indicator as proof that every packet is protected.

    Fix: Keep the VPN app and operating system updated; TunnelVision leaked traffic while apps still showed as connected [3].

  • Using an old protocol such as PPTP.

    Fix: Choose a service that uses OpenVPN or WireGuard [1].

Frequently asked questions

What is a VPN in simple terms?

It is a service that sends your internet traffic through an encrypted tunnel to a server run by the provider, so websites see the server's IP address instead of yours [1].

Does a VPN hide my browsing from my internet provider?

Yes, it hides your outgoing traffic from the ISP and the local network owner, but the VPN provider can see all of it [1].

Can I be tracked while using a VPN?

Yes. EFF says a VPN is not an anonymity tool, and companies can still track you through GPS, cookies, tracking pixels or fingerprinting [1]. For stronger anonymity EFF points to Tor, where no single server sees your browsing data [1].

Are free VPNs safe?

Some are not. The FTC has said consumers should check whether a VPN app encrypts data and shares information with third parties [5], and EFF notes that some free VPNs sell your data [1].

Is iCloud Private Relay a VPN?

Not in the usual sense. It protects browsing in Safari by sending requests through two relays, one run by Apple and one by a third party, so no single party sees both who you are and which sites you visit [10].

Is using a VPN illegal?

It depends on the country. In Iran, the Supreme Council for Cyberspace prohibited unlicensed VPNs in February 2024 [11]. This is general information, not legal advice.

Glossary

VPN (virtual private network)
A service that routes traffic through an encrypted tunnel to a server, masking the user's IP address [1].
IP address
A numerical address that indicates a device's general location and can be used to identify it [1].
HTTPS
The encrypted form of the web protocol; it protects content but not metadata such as domain names [1].
Kill switch
A VPN feature that locks down traffic when the connection to the VPN control channel is lost [3].
Split tunnelling
A setup in which some traffic uses the VPN while other traffic connects directly [6].
WireGuard
A modern VPN protocol designed to be simple, fast and easy to audit [7].

Sources

  1. Choosing the VPN That's Right for You (Surveillance Self-Defense) Electronic Frontier Foundation; last reviewed 28 July 2026 · 2026-07-28
  2. What is a VPN? Cloudflare Learning Center; retrieved 2026-11-03
  3. TunnelVision (CVE-2024-3661): How Attackers Can Decloak Routing-Based VPNs For a Total VPN Leak Leviathan Security Group · 2024-05-06
  4. CVE-2024-3661 Detail US National Institute of Standards and Technology, National Vulnerability Database · 2024-05-06
  5. FTC Provides Tips for Using VPN Apps US Federal Trade Commission · 2018-02-22
  6. Device security guidance: Virtual Private Networks (VPNs) UK National Cyber Security Centre; reviewed 13 May 2025 · 2021-06-29
  7. WireGuard: fast, modern, secure VPN tunnel WireGuard project; retrieved 2026-11-03
  8. Apple Offers Apps With Ties to Chinese Military Tech Transparency Project · 2025-04-01
  9. App Review Guidelines (section 5.4 VPN Apps) Apple Developer; retrieved 2026-11-03
  10. About iCloud Private Relay Apple Support; retrieved 2026-11-03
  11. Iran: Freedom on the Net 2024 Country Report Freedom House
  12. Iran: Freedom on the Net 2025 Country Report Freedom House
Share this guide Telegram WhatsApp X
0 likes

Comments

Top comments

About the Pouyam Team Editorial policy

On Pouyam

Explore Pouyam

Guides are one corner of Pouyam. Here is where to go next.

Quick navigation