Verify evidence Search

Research publication Client security

VPNs on public Wi-Fi: real risks, captive portals and safe set-up

On public Wi-Fi, HTTPS protects page content, but the network still controls your DNS, routes and first connections, and sees which sites you visit. A VPN removes most of that visibility if it connects first and resists hostile routes. We cover the risks, captive portals and a safe set-up.

  • VPNL-R-2026-012
  • Version 1.0
  • Published
  • No revisions since publication
  • 7 min read
  • 16 references

Abstract

Advice about public Wi-Fi tends to swing between two extremes: that every hotspot is a trap, or that HTTPS has made the risk obsolete. Neither is accurate. Encryption of web traffic has removed the easiest attacks, but the network a device joins still assigns its address, chooses its DNS resolver and default gateway, can push routes, can impersonate a known network name and can intercept the first, unencrypted connections a device makes. This publication sets out what an operator or attacker controlling a public network can and cannot do against modern devices, what HTTPS and HSTS already protect, and what a correctly working VPN adds. It then examines captive portals — the sign-in pages of hotels, airports and cafés — which a VPN cannot pass through and a strict kill switch blocks, and the standards that aim to make them predictable. Finally it describes hostile-network attacks on VPN clients themselves, such as routes pushed by DHCP, and gives a practical configuration and verification checklist.

What a public network controls

Public Wi-Fi is any wireless network whose operator and other users you do not control — in hotels, airports, cafés, trains and conference venues. The risk is not the radio link alone but the network services the device accepts on joining.

When a device joins a network, it accepts configuration from it. DHCP supplies the device’s address, its default gateway and its DNS resolvers [1], and can also install additional routes [2]. Whoever operates the network — or an attacker who imitates it — therefore decides where the device’s packets go first and which resolver translates names into addresses. On many hotspots, other connected users can also reach the device directly, and an attacker can set up an access point with the same network name, an evil twin, to which devices may connect automatically.

Wi-Fi encryption is not what it seems

Three situations are common. On an open network, traffic between device and access point is not encrypted at the Wi-Fi layer. Opportunistic Wireless Encryption (OWE, marketed as “Enhanced Open”) encrypts open networks without a password and defeats passive eavesdropping, but does not authenticate the access point, so it does not stop an evil twin [3]. On a WPA2-Personal network with a shared password, anyone who knows the password and captures a device’s connection handshake can derive that device’s session keys; a password on the café wall protects against outsiders, not against other customers. WPA3-Personal removes that passive attack, but the network operator still sees all traffic leaving the access point.

What HTTPS already protects

Most web and app traffic now uses TLS. On a hostile network, TLS still keeps page content, passwords and cookies confidential and detects tampering, provided the application validates certificates [4]. HTTP Strict Transport Security (HSTS) tells browsers to refuse plain HTTP for sites that have opted in, which defeats attacks that try to downgrade a connection to unencrypted HTTP [5]. This is why much older public Wi-Fi advice is exaggerated.

What TLS does not hide is where you connect. Unless encrypted DNS is in use, DNS queries cross the network in clear text, and the TLS handshake usually carries the destination’s name in the server name indication field [6]. The network also sees destination IP addresses, timing and volume. And it can still interfere with anything not protected by TLS: plain-HTTP requests, including the ones operating systems make to detect captive portals, and applications that fail to validate certificates.

What a VPN adds — and what it does not

Table 1 — Public Wi-Fi threats with HTTPS alone and with a working VPN
ThreatHTTPS onlyHTTPS + working VPN
Reading page content and passwordsProtectedProtected
Seeing which sites you visitVisible via DNS, server name and IPHidden from the hotspot; visible to the VPN provider
Hostile DNS resolverExposed unless encrypted DNS is usedBypassed if DNS goes through the tunnel
Tampering with plain-HTTP trafficExposedProtected inside the tunnel
Direct attacks from other users on the networkDepends on device firewallDepends on device firewall and LAN-access settings
Fake sign-in page (phishing)Not protectedNot protected
Traffic before the VPN connectsExposedExposed unless traffic is blocked until connected

A VPN shifts what the hotspot can see to the VPN provider, and it does so only for traffic that actually enters the tunnel. Encrypted DNS — DoH or DoT — protects name lookups even without a VPN [7, 8], but it does not hide destination addresses or server names. Neither tool protects a user who types a password into a convincing fake page.

Captive portals

A captive portal holds a newly connected device in a restricted state until the user accepts terms, enters a room number or pays. Traditionally it works by intercepting the device’s first plain-HTTP requests and DNS queries and redirecting them to a sign-in page. Operating systems detect this by making a test request to a known address and checking whether the expected answer comes back; if not, they open a dedicated sign-in window.

The IETF has standardised a cleaner approach. RFC 8952 describes a captive-portal architecture [9]; RFC 8910 lets the network announce, through DHCP or IPv6 Router Advertisements, the address of a captive-portal API [10]; and RFC 8908 defines that API, which tells the device over HTTPS whether it is captive and where the user portal is [11]. Where networks and devices support it, the device no longer needs interception to discover the portal. Support is not universal, so interception-based portals remain common.

Why portals and kill switches collide

Until the portal is satisfied, the network blocks the VPN server, so the tunnel cannot start. A strict kill switch or an always-on VPN set to block connections without the VPN blocks the portal too [12, 13]. The result is a dead end that pushes users to disable protection entirely — often leaving it disabled afterwards.

The safer pattern is a narrow, temporary exception: allow only the portal sign-in window, outside the tunnel, for as long as sign-in takes, and restore full enforcement as soon as the tunnel connects. Exceptions are also where kill switches are most often bypassed, as Kill switches compared: firewall-based vs route-based enforcement (VPNL-R-2026-003) explains, so the exception should be limited to the portal’s traffic, not the whole local network. Do not use other apps or sign in to accounts while the exception is open, and treat the portal page itself as untrusted: provide only what it needs.

Hostile networks versus VPN clients

A network that controls DHCP and the local subnet can attack the VPN client’s own exceptions:

  • Pushed routes. DHCP option 121 installs routes more specific than the VPN’s. Clients that rely on routing alone then send traffic for those destinations outside the tunnel; this was published in 2024 as CVE-2024-3661 [2, 14]. Firewall-based enforcement drops such traffic instead.
  • Abused local-network exceptions. If “allow LAN access” trusts whatever subnet the network declares, a hostile network can declare public addresses as local and have them bypass the tunnel [15]. Limiting LAN exceptions to private ranges closes most of this [16].
  • Hostile DNS for the server name. If the client looks up its VPN server by name through the network’s resolver, the network can influence which address the tunnel exception covers [15].

DNS behaviour on such networks — including resolvers handed out by DHCP that the client fails to override — is analysed in How DNS leaks happen in VPN clients: a technical taxonomy (VPNL-R-2026-001).

A safe set-up for public Wi-Fi

  1. Connect the VPN automatically on untrusted networks, and block traffic without the VPN where the platform supports it.
  2. Disable local-network access in the VPN client on public networks, and use the operating system’s “public network” firewall profile.
  3. Turn off automatic joining for open networks you do not use regularly, and forget networks you no longer need, to reduce evil-twin exposure.
  4. Use the captive portal deliberately: sign in through the system’s portal window only, then confirm the VPN connects and the block is active again.
  5. Keep split tunnelling off on public networks unless you know exactly what each exclusion sends outside the tunnel.
  6. Verify: run the quick checks in How to test your VPN for leaks: a step-by-step guide (VPNL-R-2026-007) — public IP, DNS and IPv6 — after signing in, before using sensitive accounts.

Our leak-testing methodology includes hostile-network conditions of this kind for every client we examine.

Frequently asked questions

Is public Wi-Fi safe if every site uses HTTPS?

Much safer than it once was. Content and passwords are protected, but the network still sees which sites you use and controls DNS and routing, and phishing remains possible.

Do I need a VPN on hotel Wi-Fi?

It is useful when you want to hide your activity from the network operator and other guests, or when the network interferes with traffic. It does not replace care with sign-in pages and software updates.

Why does my VPN not connect until I sign in to the Wi-Fi?

The captive portal blocks all traffic, including traffic to the VPN server, until you accept its terms. Sign in through the portal window, then let the VPN connect.

Is a password-protected café network private?

Not from other people who know the password on WPA2-Personal networks, and never from the operator. Treat it as public.

Limitations

This publication describes attack classes and standards in general terms. Whether a particular device, operating system or VPN client is affected by a given attack must be established by testing that version; we make no claim about any specific product here.

References

All sources are publicly available primary documents. Numbers correspond to the bracketed citations in the text.

  1. 1Droms, R. (1997). Dynamic Host Configuration Protocol (RFC 2131). RFC Editor. https://www.rfc-editor.org/rfc/rfc2131
  2. 2Lemon, T., Cheshire, S., & Volz, B. (2002). The Classless Static Route Option for Dynamic Host Configuration Protocol (DHCP) version 4 (RFC 3442). RFC Editor. https://www.rfc-editor.org/rfc/rfc3442
  3. 3Harkins, D. (Ed.), & Kumari, W. (Ed.). (2017). Opportunistic Wireless Encryption (RFC 8110). RFC Editor. https://www.rfc-editor.org/rfc/rfc8110
  4. 4Rescorla, E. (2018). The Transport Layer Security (TLS) Protocol Version 1.3 (RFC 8446). RFC Editor. https://www.rfc-editor.org/rfc/rfc8446
  5. 5Hodges, J., Jackson, C., & Barth, A. (2012). HTTP Strict Transport Security (HSTS) (RFC 6797). RFC Editor. https://www.rfc-editor.org/rfc/rfc6797
  6. 6Eastlake 3rd, D. (2011). Transport Layer Security (TLS) Extensions: Extension Definitions (RFC 6066). RFC Editor. https://www.rfc-editor.org/rfc/rfc6066
  7. 7Hoffman, P., & McManus, P. (2018). DNS Queries over HTTPS (DoH) (RFC 8484). RFC Editor. https://www.rfc-editor.org/rfc/rfc8484
  8. 8Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., & Hoffman, P. (2016). Specification for DNS over Transport Layer Security (TLS) (RFC 7858). RFC Editor. https://www.rfc-editor.org/rfc/rfc7858
  9. 9Larose, K., Dolson, D., & Liu, H. (2020). Captive Portal Architecture (RFC 8952). RFC Editor. https://www.rfc-editor.org/rfc/rfc8952
  10. 10Kumari, W., & Kline, E. (2020). Captive-Portal Identification in DHCP and Router Advertisements (RAs) (RFC 8910). RFC Editor. https://www.rfc-editor.org/rfc/rfc8910
  11. 11Pauly, T. (Ed.), & Thakore, D. (Ed.). (2020). Captive Portal API (RFC 8908). RFC Editor. https://www.rfc-editor.org/rfc/rfc8908
  12. 12Google. (n.d.). VPN. Android Developers. https://developer.android.com/guide/topics/connectivity/vpn
  13. 13Apple Inc. (n.d.). includeAllNetworks — NEVPNProtocol. Apple Developer Documentation. https://developer.apple.com/documentation/networkextension/nevpnprotocol/includeallnetworks
  14. 14CVE Program. (2024). CVE-2024-3661. The MITRE Corporation. https://www.cve.org/CVERecord?id=CVE-2024-3661
  15. 15Xue, N., Malla, Y., Xia, Z., Pöpper, C., & Vanhoef, M. (2023). Bypassing Tunnels: Leaking VPN Client Traffic by Abusing Routing Tables. In 32nd USENIX Security Symposium (USENIX Security 23). USENIX Association. https://www.usenix.org/conference/usenixsecurity23/presentation/xue
  16. 16Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G. J., & Lear, E. (1996). Address Allocation for Private Internets (RFC 1918). RFC Editor. https://www.rfc-editor.org/rfc/rfc1918

Cite this publication

APA style

VPN Network Research Labs. (2026, November 17). VPNs on public Wi-Fi: Real risks, captive portals and safe set-up (Research Publication No. VPNL-R-2026-012, Version 1.0). https://vpn.com.de/research/vpn-on-public-wifi-and-captive-portals

BibTeX

@techreport{vpnl-r-2026-012,
  author      = {{VPN Network Research Labs}},
  title       = {{VPNs on public Wi-Fi: real risks, captive portals and safe set-up}},
  institution = {VPN Network Research Labs},
  type        = {Research Publication},
  number      = {VPNL-R-2026-012},
  year        = {2026},
  month       = nov,
  date        = {2026-11-17},
  version     = {1.0},
  url         = {https://vpn.com.de/research/vpn-on-public-wifi-and-captive-portals},
  langid      = {en},
  note        = {Version 1.0}
}

Cite the document ID and the version you read. Document IDs are permanent; substantive changes receive a new version number and an entry in the revision history below.

Revision history

Revision history of VPNL-R-2026-012
VersionDateChange
1.0 Initial publication.

Found an error? Write to support@vpn.com.de. Corrections are handled under our corrections and retractions policy and are never applied silently.

Methodology and definitions

Test records

This publication contains no results about specific products. Product tests, audits and their evidence are published in the Report Registry and the Evidence Database.