How VPNs Work - Part 2: Protocols

Topics · Published 2019-10-31 · Revised 2026-11-23
Reviewed corrections applied locally; pre-review version preserved separately · Joomla source

3,533 Total views across this article’s versions; includes the historical baseline where available.

This article is Part 2 in a series of articles about how Virtual Private Networks (VPNs) work. Part 1 of the series, How VPNs Work outlined VPN functionality at a high level. Part 3 (Encryption and Authentication) in this series explores security and encryption pitfalls you should be aware of, including deprecated ciphers, how some VPN service providers conceal their use of lower level encryption methods, and explains Perfect Forward Secrecy and why it is important.

The purpose of this article (Part 2) is to clarify the difference between VPN protocols and VPN services. It explains the most prevalent VPN protocols to assist you in making an informed decision when choosing a sensible VPN platform that meets your needs.

Once a decision is made to use a Virtual Private Network (VPN), several important questions and decisions should follow:

  • Do you understand the difference between VPN protocols offered by a third-party VPN service provider?
  • Which one is best for you?
  • Why are there different types of VPNs? Why use one versus another?
  • Should I create my own VPN or use a 3rd party service provider?
  • Which VPN protocol should I use?
  • How do I set it up?
  • How do I use it?
  • Do you have a particular VPN service provider in mind?
  • Do you have a particular VPN protocol in mind?
  • Have you chosen a particular VPN service?

VPN Service Architecture

A VPN protocol defines how peers communicate; a VPN service combines software, infrastructure and operating policies. Topology is a separate choice. Common arrangements include individual peer links, hub-and-spoke networks and partial or full meshes. These are not two mutually exclusive protocol families. Hamachi's network-type guide illustrates several topologies within one product.

Traditional Client-Server VPNs

A gateway can serve many clients at once. Each client may have a separate connection to that gateway, while forwarding policy determines whether clients can reach each other or other networks. A two-ended tunnel does not limit the entire VPN to two devices. OpenVPN’s multi-client server mode is one example. OpenVPN 2.6 manual.

Mesh Networks

In a full mesh, every participating node has a direct connection to every other node; a partial mesh has fewer links. A mesh can still use centralized management. A one-to-many arrangement can instead be hub-and-spoke. Software such as tinc can create peer tunnels automatically; the tunnel protocol alone does not imply automatic discovery, routing or management.

VPN Protocols

Peers need compatible protocols and configurations. Sharing a cipher, port number or virtual-interface type is not enough. TUN and TAP are local operating-system interfaces: TUN exchanges IP packets, while TAP exchanges Ethernet frames. They are not competing network protocols alongside PPTP or SSTP. Linux TUN/TAP documentation.

Protocol or familyPayload and roleOuter transportProtection and qualifications
IKEv2Authenticates peers and negotiates IPsec SAs; does not carry application traffic.Usually UDP 500 and 4500.Negotiates protection; IKE and Child SAs have separate jobs.
IPsecProtects IP traffic using ESP or AH, in transport or tunnel mode.ESP is IP protocol 50; AH is 51. ESP NAT traversal uses UDP 4500.ESP can provide confidentiality and integrity; AH does not encrypt. IPsec is not TLS.
L2TP (v2)Tunnels PPP frames; Layer 2 encapsulation.Commonly UDP 1701.L2TP alone does not provide payload confidentiality. PPP authentication and IPsec protection are separate.
L2TP/IPsecL2TP traffic protected by IPsec.L2TP UDP traffic is inside IPsec; IKE and ESP/NAT-T have their own outer handling.IPsec supplies protection. It does not turn L2TP into TLS or require IKEv2 specifically.
OpenVPNCarries IP packets or Ethernet frames, depending on mode and platform.UDP or TCP; port 1194 is the default in the cited 2.6 manual.In TLS mode, TLS protects the control channel; a separate data channel protects VPN payloads.
PPTPTunnels PPP using enhanced GRE.TCP 1723 for control; GRE (IP protocol 47) for data.PPTP framing itself is not an encryption mechanism; historical PPP security must be assessed separately.
SSTPCarries PPP over HTTPS.TCP 443.TLS protects the connection; PPP authentication is a separate part of the protocol.
SSH / OpenSSH tunnelsSSH supplies a secure transport. OpenSSH supports port forwarding and, where available, tunnel devices.TCP; port 22 by default.An application proxy is not automatically a full routed VPN. OpenSSH tunnel support depends on platform and server policy.
WireGuardCarries IPv4 or IPv6 packets; Layer 3.UDP, with a configurable listening port; 51820 is a common example, not a fixed requirement.Fixed cryptographic suite with authenticated encryption; no native TCP transport.

Sources: IKEv2, IPsec architecture, ESP UDP encapsulation, L2TP, L2TP/IPsec, OpenVPN 2.6, PPTP, Microsoft SSTP, OpenSSH, and WireGuard configuration.

VPN Protocol Authentication and Encryption Libraries

Authentication, key agreement, encryption and implementation libraries have different roles. A hash is not an encryption cipher, a certificate is not a traffic cipher, and IKEv2 is not a cryptographic library. The historical ISAKMP, Oakley and SKEME designs are not three libraries invoked by IKEv2. Demystifying IKE/IKEv2 explains the distinction.

TermRoleWhat it does not establish
Encryption, such as AES or ChaCha20Protects confidentiality when used in an appropriate construction.Does not by itself authenticate a peer or guarantee integrity.
AEAD, such as ChaCha20-Poly1305 or AES-GCMCombines encryption with authentication of the protected message and associated data.Does not encrypt associated data, or supply an entire VPN identity-management system.
Hash / HMACA hash computes a digest; HMAC combines a hash with a secret key for message authentication.An unkeyed hash alone does not prevent an attacker from replacing both a message and its digest.
Diffie–Hellman / ECDHAllows peers to derive shared keying material.Key agreement alone does not establish who the peer is.
Signatures / certificates / pre-shared keysDifferent tools or credentials used for peer authentication, according to the protocol.A certificate, ECDSA signature or configured authentication secret is not interchangeable with a data-channel encryption key.
Forward secrecyLimits what later compromise of long-term credentials reveals about earlier session keys, under the protocol assumptions.Does not follow merely from using certificates, rekeying on a timer, or supporting a particular library.
OpenSSL, Mbed TLS and other crypto librariesSoftware implementing cryptographic operations and, often, TLS.Library support and enabled features must be checked for the exact program and build. A shared library does not imply VPN interoperability.

The roles above are described in TLS 1.3, ChaCha20-Poly1305 and HMAC. WireGuard’s protocol description documents its fixed choices. The OpenVPN manual distinguishes TLS settings from data-channel ciphers. For IPsec, consult the separate ESP/AH and IKEv2 algorithm guidance and subsequent updates; do not copy the old article’s undated cipher lists into a deployment.

VPN Server Protocol Support

A protocol specification is not a server program. Implementations may support one or several protocols, and some tools only configure other programs. The table below identifies those roles rather than treating every product name as a distinct wire protocol.

Software or serviceRole and compatibilityScope to check
OpenVPN Community Edition 2.xClient and server implementation of the OpenVPN protocol.TUN/TAP, transport, authentication and data-channel settings must agree; other VPN protocols are not interchangeable with OpenVPN.
OpenConnect / ocservOpenConnect is a multi-protocol VPN client; ocserv is a separate server implementing an AnyConnect-compatible protocol.Do not assume ocserv implements every protocol that the OpenConnect client supports.
strongSwan / OpenswanIPsec implementations, not alternative names for TLS.Supported IKE versions, credentials, kernel integration and features depend on the selected project and release.
SoftEther VPN ServerSupports its native protocol and compatibility functions including OpenVPN, SSTP, L2TP/IPsec, L2TPv3/IPsec and EtherIP/IPsec.Each compatibility function has its own limits. A product-level yes/no entry cannot stand in for the selected protocol and release.
tincPeer VPN software that can construct a mesh and work with IP or Ethernet interfaces.Control metadata uses TCP; data normally uses UDP. The 1.1 documentation distinguishes its SPTPS design from the legacy protocol; neither is simply TLS 1.2.
WireGuardA peer-to-peer tunnel protocol and implementations.A gateway can serve many configured peers; automatic mesh discovery, account management and address allocation are separate functions.
HamachiManaged VPN product with mesh, hub-and-spoke and gateway network types.Product features and management requirements are not generic properties of a new protocol family.
StreisandAutomation that installs and configures a selection of separate VPN and proxy services.The original repository was archived in June 2021. This is a historical example, not one server negotiating all listed protocols.
OpenSSH / sslhOpenSSH supplies SSH services and tunnels. sslh identifies supported traffic patterns and forwards connections to configured services.sslh does not translate incompatible VPN protocols or guarantee recognition of every possible protocol.

Sources: OpenConnect, strongSwan, Openswan, SoftEther specifications, tinc topology, tinc transport, tinc 1.1 security, WireGuard, Hamachi's guide, the original Streisand repository, and sslh.

The client initiates a connection using a particular protocol; the server must accept that protocol and its configuration. Within the protocol, negotiation succeeds only if both peers’ requirements can be met. There is no general rule that “the client wins” or can override a server’s security policy. For example, IKEv2’s responder selects an acceptable proposal or rejects the negotiation. RFC 7296, section 2.7.

Source scope: these tables describe protocol roles and documented product capabilities, not provider rankings, an exhaustive compatibility test or a current cipher configuration guide. IPv6 support must be checked separately for the inner traffic, outer transport and chosen client/server implementation. The linked versioned manuals preserve the basis of the comparison.