Introduction

A Virtual Private Network (VPN) creates an encrypted tunnel between two or more network endpoints over a public or untrusted network (typically the internet), allowing private communications to traverse the public infrastructure securely. The "virtual" in VPN refers to the fact that the private network is created through software rather than dedicated physical links -- the tunnel exists logically on top of the existing network infrastructure.

VPNs serve two primary purposes:

  • Network extension: Connecting geographically separated private networks (branch offices, data centers, cloud environments) as if they were a single local network -- the site-to-site VPN
  • Remote access: Allowing individual users to securely access a private network from any location over the internet -- the remote access VPN

From a security perspective, a VPN provides confidentiality (encryption prevents eavesdropping), integrity (tampering is detected), and authentication (only authorized parties can establish the tunnel). These properties are provided by the underlying cryptographic protocols -- IPsec, TLS, or protocol-specific cryptography (WireGuard's Noise Protocol).

"A VPN does not make you anonymous on the internet. It changes who can see your traffic -- from your ISP and local network to the VPN provider. Choose your VPN provider with the same scrutiny you would apply to any entity you entrust with your data." -- Bruce Schneier, security technologist

History and Evolution

The concept of virtual private networking emerged in the mid-1990s as organizations sought alternatives to expensive leased lines (dedicated point-to-point circuits) for connecting branch offices. The development of IPsec in 1995 provided the first standardized framework for encrypting IP traffic over the internet, enabling secure site-to-site connections at a fraction of the cost of leased lines.

EraTechnologyKey Characteristics
Pre-1990sLeased lines, Frame Relay, ATMDedicated physical circuits; expensive, reliable, inherently private
Mid 1990sPPTP (Microsoft, 1996)First widely used VPN protocol; integrated into Windows; weak security
Late 1990sIPsec VPNStandardized, strong encryption; complex configuration; dominant for site-to-site
Early 2000sSSL VPN (clientless)Browser-based remote access; no client software needed; portal-based
2001OpenVPN releasedOpen-source, SSL/TLS-based, highly flexible, cross-platform
2010sCommercial VPN services proliferateConsumer privacy VPNs; subscription-based; hundreds of providers
2016-2020WireGuard developed and mainlinedModern, minimal, high-performance; merged into Linux kernel 5.6 (2020)
2020sZero Trust Network Access (ZTNA)Application-level access replacing network-level VPN; identity-centric

VPN Types

Site-to-Site VPN

A site-to-site VPN (also called a gateway-to-gateway VPN) connects two or more entire networks through an encrypted tunnel between their respective VPN gateways (routers or firewalls). All traffic between the connected networks is automatically encrypted and decrypted at the gateways -- individual hosts on either network require no VPN software or configuration and are typically unaware that a VPN exists.

Use cases:

  • Connecting branch offices to headquarters
  • Linking data centers across geographic regions
  • Connecting on-premises networks to cloud VPCs (AWS VPN, Azure VPN Gateway)
  • Establishing partner-to-partner connectivity (extranet VPN)

Site-to-site VPNs most commonly use IPsec in tunnel mode, which encapsulates the entire original IP packet inside an encrypted ESP payload with new gateway-to-gateway IP headers. This hides the internal network topology from anyone observing traffic on the internet.

For organizations with many branch offices, hub-and-spoke (all branches connect to a central hub) and full mesh (every site connects to every other site) topologies are common. DMVPN (Dynamic Multipoint VPN), a Cisco technology, allows dynamic tunnel creation between spokes without manual configuration, simplifying large-scale deployments.

Remote Access VPN

A remote access VPN allows individual users (employees, contractors, administrators) to connect to a private network from a remote location over the internet. The user runs VPN client software that establishes an encrypted tunnel to the organization's VPN gateway. Once connected, the user's device is logically "on" the private network and can access internal resources as if physically present.

Authentication methods for remote access VPNs:

  • Username and password: Basic authentication, often combined with a second factor
  • Certificate-based: Client certificates stored on the device or in a hardware token
  • Multi-factor authentication (MFA): Combining something the user knows (password) with something they have (TOTP, hardware token, push notification)
  • SAML/SSO integration: Federated authentication through the organization's identity provider

The COVID-19 pandemic (2020) dramatically accelerated remote access VPN adoption as organizations rapidly transitioned to remote work. This surge exposed scalability limitations of traditional VPN architectures and drove interest in Zero Trust Network Access (ZTNA) as an alternative or complement to VPNs.

VPN Protocols Compared

IPsec

IPsec is the dominant protocol for site-to-site VPNs and is also used for remote access (particularly with IKEv2). It operates at the network layer (Layer 3), encrypting all IP traffic between endpoints. IPsec's strength lies in its comprehensive security model, standardized architecture (RFCs), and universal support across network equipment vendors.

Advantages: Standardized and interoperable; hardware acceleration widely available; strong security model with IKEv2; transparent to applications; kernel-level implementation for high performance.

Disadvantages: Complex configuration; difficult to troubleshoot; UDP ports 500 and 4500 (or IP protocols 50/51) may be blocked by restrictive firewalls; NAT traversal adds complexity.

OpenVPN

OpenVPN, released in 2001 by James Yonan, is an open-source VPN solution that uses TLS for key exchange and can use a variety of ciphers for data encryption (AES-256-GCM is standard). It operates in userspace rather than the kernel, which simplifies deployment but can limit throughput compared to kernel-based solutions.

OpenVPN supports both UDP (preferred for performance -- avoids TCP-over-TCP issues) and TCP (useful for traversing restrictive firewalls -- can run on port 443, indistinguishable from HTTPS traffic). This firewall-traversal capability is one of OpenVPN's greatest practical advantages.

Advantages: Open-source and audited; runs on virtually all platforms; highly configurable; TCP port 443 bypasses most firewalls; strong community and documentation.

Disadvantages: Userspace implementation limits throughput (typically 100-500 Mbps depending on hardware); complex configuration file syntax; single-threaded in most configurations.

WireGuard

WireGuard, created by Jason Donenfeld, is a modern VPN protocol designed to be simpler, faster, and more secure than IPsec and OpenVPN. Its entire codebase is approximately 4,000 lines of code (compared to hundreds of thousands for IPsec or OpenVPN), making it easier to audit and less likely to contain vulnerabilities.

WireGuard was merged into the Linux kernel in version 5.6 (March 2020), giving it native kernel-level performance. It uses a fixed set of modern cryptographic primitives:

  • ChaCha20 for symmetric encryption
  • Poly1305 for authentication
  • Curve25519 for key exchange (ECDH)
  • BLAKE2s for hashing
  • Noise Protocol Framework for handshake

Advantages: Extremely fast (kernel-level, multi-threaded); minimal attack surface (4,000 lines); simple configuration; low latency; built-in roaming support (seamless IP address changes).

Disadvantages: No cipher negotiation (fixed cryptographic choices -- requires protocol update to change); does not support TCP (UDP only, may be blocked by some firewalls); limited logging by design (privacy feature that complicates troubleshooting); relatively new (less battle-tested than IPsec/OpenVPN).

Other Protocols

  • PPTP (Point-to-Point Tunneling Protocol): Developed by Microsoft in 1996. Extremely fast but has known, critical security vulnerabilities in its authentication protocol (MS-CHAPv2). Must not be used for any purpose requiring security.
  • L2TP/IPsec: Layer 2 Tunneling Protocol combined with IPsec for encryption. More secure than PPTP but adds overhead and complexity. Largely superseded by IKEv2/IPsec.
  • IKEv2/IPsec: Modern IPsec with IKEv2 key exchange. Excellent for mobile devices due to MOBIKE support (seamless reconnection when switching between Wi-Fi and cellular). Built into iOS, macOS, Windows, and Android.
  • SSTP (Secure Socket Tunneling Protocol): Microsoft proprietary protocol using TLS over TCP port 443. Good firewall traversal but limited to Windows.
ProtocolSpeedSecurityFirewall TraversalComplexityBest For
IPsec/IKEv2HighStrong (with proper config)Moderate (UDP 500/4500)HighSite-to-site, mobile devices
OpenVPNModerateStrongExcellent (TCP 443)ModerateRemote access, firewall bypass
WireGuardVery HighStrongLimited (UDP only)LowHigh-performance tunnels, mobile
PPTPVery HighBrokenGoodLowNever (insecure)
L2TP/IPsecModerateModeratePoor (multiple ports/protocols)ModerateLegacy compatibility

Split Tunneling

Split tunneling is a VPN configuration that allows some network traffic to pass through the VPN tunnel while other traffic goes directly to the internet through the user's local network connection. The alternative is full tunnel (also called forced tunnel), where all traffic is routed through the VPN, regardless of destination.

AspectSplit TunnelFull Tunnel
Internet TrafficGoes directly to internet (local breakout)Routed through VPN to corporate network, then to internet
Corporate TrafficGoes through VPN tunnelGoes through VPN tunnel
Bandwidth EfficiencyBetter (only corporate traffic uses VPN)Worse (all traffic consumes VPN bandwidth)
LatencyLower for internet traffic (direct path)Higher for internet traffic (backhauled through VPN)
Security VisibilityLower (internet traffic bypasses corporate security tools)Higher (all traffic passes through corporate security stack)
Data Loss PreventionWeaker (direct internet access available)Stronger (all traffic inspectable)

Split tunneling was historically discouraged by security teams because it creates a path from the internet to the corporate network through the user's machine. However, the practical demands of remote work -- streaming video, video conferencing, and large cloud application data consuming corporate VPN bandwidth -- have made split tunneling increasingly common, with compensating controls such as endpoint security, DNS filtering, and cloud-based security services.

Inverse split tunneling (also called exclude routing) is a variation where specific traffic is excluded from the tunnel while everything else goes through. For example, an organization might route all traffic through the VPN except Microsoft 365 and Zoom, which connect directly to optimize performance.

Kill Switch

A kill switch (also called a network lock) is a VPN client feature that blocks all network traffic if the VPN connection drops unexpectedly. Without a kill switch, a VPN disconnection causes the user's traffic to flow over the unprotected local network connection, potentially exposing sensitive data, leaking the user's real IP address, or sending unencrypted traffic over untrusted networks.

Kill switch implementations:

  • Application-level kill switch: The VPN client monitors its own connection state and modifies the system's routing table or firewall rules to block traffic when the VPN disconnects. Less reliable because it depends on the VPN application itself running correctly.
  • Firewall-based kill switch: Creates persistent firewall rules (iptables/nftables on Linux, WFP on Windows, pf on macOS) that block all traffic except through the VPN tunnel interface. More reliable because it works even if the VPN client crashes.
  • Network namespace isolation (Linux): Runs applications in a separate network namespace that has no network interfaces except the VPN tunnel. The most robust approach -- if the VPN disconnects, the namespace has no connectivity at all.

Kill switches are essential for users who require continuous VPN protection, such as journalists, whistleblowers, or anyone operating in adversarial network environments. Most commercial VPN clients include a kill switch option, but its reliability varies significantly between implementations.

Privacy Considerations

VPNs are widely marketed as privacy tools, but their privacy guarantees require careful examination:

What a VPN does:

  • Encrypts traffic between your device and the VPN server, preventing your ISP, local network operators, and local eavesdroppers from seeing your traffic content or destinations
  • Replaces your IP address with the VPN server's IP address, hiding your location from destination websites
  • Prevents your ISP from logging which websites you visit (they see only encrypted traffic to the VPN server)

What a VPN does NOT do:

  • Make you anonymous -- the VPN provider can see all your traffic (you are shifting trust from your ISP to the VPN provider)
  • Prevent tracking via cookies, browser fingerprinting, or account logins
  • Protect against malware, phishing, or application-layer attacks
  • Guarantee that the VPN provider does not log, sell, or share your data

"When you use a VPN, you are not eliminating the ability to monitor your traffic. You are simply choosing who does the monitoring -- your ISP or your VPN provider. The question is: which do you trust more?" -- Dan Guido, Trail of Bits

Evaluating VPN provider claims:

  • "No-logs" policies: Difficult to verify. Look for providers that have undergone independent security audits and whose no-logs claims have been tested in legal proceedings.
  • Jurisdiction: The legal jurisdiction of the VPN provider determines what data they can be compelled to provide to law enforcement. Providers in "Five Eyes" countries (US, UK, Canada, Australia, New Zealand) face the broadest surveillance obligations.
  • Protocol and implementation: Prefer providers that use open-source protocols (WireGuard, OpenVPN) and publish their client software as open source for independent review.
  • DNS leak protection: Ensure the VPN provider handles DNS queries through the tunnel to prevent DNS leaks that reveal browsing activity to your ISP.

Enterprise Deployment

Enterprise VPN deployment involves considerations beyond those of consumer VPN use:

  • Scalability: Enterprise VPN gateways must handle hundreds or thousands of concurrent connections. Hardware appliances (Cisco, Palo Alto, Fortinet) and cloud-based gateways (AWS Client VPN, Azure VPN Gateway) provide scalable solutions.
  • High availability: VPN gateways should be deployed in active/passive or active/active pairs with automatic failover. DNS-based or BGP-based load balancing distributes traffic across multiple gateways.
  • Integration with identity providers: Enterprise VPNs should authenticate against existing identity infrastructure (Active Directory, Okta, Azure AD) using RADIUS, LDAP, SAML, or OIDC. Multi-factor authentication should be mandatory.
  • Endpoint compliance: Before granting VPN access, verify that the connecting device meets security requirements (up-to-date OS, active endpoint protection, disk encryption, compliant configuration). This is often called Network Access Control (NAC) or posture assessment.
  • Logging and monitoring: Log all VPN connection events (connect, disconnect, authentication failures) and forward to the SIEM for security monitoring and compliance reporting.

Zero Trust Network Access (ZTNA) is increasingly adopted as a complement or replacement for traditional remote access VPNs. ZTNA provides application-level access rather than network-level access -- users are granted access to specific applications based on identity, device posture, and context, rather than being placed on the corporate network. This limits lateral movement if a user's device is compromised, addressing a fundamental weakness of traditional VPNs.

Best Practices

  • Use modern protocols: WireGuard or IKEv2/IPsec for performance; OpenVPN for maximum compatibility and firewall traversal. Never use PPTP.
  • Enforce multi-factor authentication for all remote access VPN connections
  • Enable kill switch functionality on all VPN clients to prevent traffic leaks during disconnections
  • Implement split tunneling thoughtfully: Balance bandwidth efficiency against security visibility; use compensating controls when split tunneling is enabled
  • Use strong encryption: AES-256-GCM or ChaCha20-Poly1305 for data encryption; ECDHE or Curve25519 for key exchange
  • Deploy DMZ architectures for VPN concentrators -- do not place VPN gateways directly on the internal network
  • Monitor VPN connections for anomalies: unusual login times, geographic impossibilities, excessive data transfer, connections from known-bad IP addresses
  • Implement certificate-based authentication for site-to-site VPNs rather than pre-shared keys
  • Plan for scalability: Size VPN infrastructure for peak concurrent connections with growth headroom
  • Evaluate ZTNA as a complement to or replacement for traditional remote access VPNs, especially for cloud-first organizations

For deeper understanding of VPN foundations, explore IPsec, SSL/TLS, firewalls, and symmetric encryption.

References

  • Frankel, S., et al. (2005). NIST SP 800-77: Guide to IPsec VPNs.
  • Frankel, S., et al. (2008). NIST SP 800-113: Guide to SSL VPNs.
  • Donenfeld, J. A. (2017). "WireGuard: Next Generation Kernel Network Tunnel." Network and Distributed System Security Symposium (NDSS).
  • Feilner, M. (2006). OpenVPN: Building and Integrating Virtual Private Networks. Packt Publishing.
  • Kaufman, C., et al. (2014). RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2). IETF.
  • NIST (2020). SP 800-207: Zero Trust Architecture.
  • Schneier, B. (2019). "Thinking About VPN Security." Schneier on Security (blog).
  • Electronic Frontier Foundation (2023). "Choosing the VPN That's Right for You." EFF Surveillance Self-Defense.
  • Consumer Reports (2023). "VPN Testing Methodology and Results." Consumer Reports Digital Lab.
  • Gartner (2022). "Market Guide for Zero Trust Network Access." Gartner Research.