Virtual private network (VPN) is a
network architecture for virtually extending a
private network (i.e. any
computer network
A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
which is not the public
Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
) across one or multiple other networks which are either untrusted (as they are not controlled by the entity aiming to implement the VPN) or need to be isolated (thus making the lower network invisible or not directly usable).
A VPN can extend access to a private network to users who do not have direct access to it, such as an office network allowing secure access from off-site over the Internet.
This is achieved by creating a link between
computing device
A computer is a machine that can be programmed to automatically carry out sequences of arithmetic or logical operations ('' computation''). Modern digital electronic computers can perform generic sets of operations known as ''programs'', ...
s and computer networks by the use of network
tunneling protocols.
It is possible to make a VPN secure to use on top of insecure communication medium (such as the public internet) by choosing a tunneling protocol that implements
encryption
In Cryptography law, cryptography, encryption (more specifically, Code, encoding) is the process of transforming information in a way that, ideally, only authorized parties can decode. This process converts the original representation of the inf ...
. This kind of VPN implementation has the benefit of reduced costs and greater flexibility, with respect to dedicated communication lines, for
remote work
Remote work (also called telecommuting, telework, work from or at home, WFH as an initialism, hybrid work, and other terms) is the practice of work (human activity), working at or from one's home or Third place, another space rather than from ...
ers.
The term ''VPN'' is also used to refer to
VPN services which sell access to their own private networks for internet access by connecting their customers using VPN tunneling protocols.
Motivation
The goal of a virtual private network is to allow
network hosts to exchange network messages across another network to access private content, as if they were part of the same network. This is done in a way that makes crossing the intermediate network transparent to network applications. Users of a network connectivity service may consider such an intermediate network to be untrusted, since it is controlled by a third-party, and might prefer a VPN implemented via protocols that protect the privacy of their communication.
In the case of a
Provider-provisioned VPN, the goal is not to protect against untrusted networks, but to isolate parts of the provider's own network infrastructure in virtual segments, in ways that make the contents of each segment private with respect to the others. This situation makes many other tunneling protocols suitable for building PPVPNs, even with weak or no security features (like in
VLAN
A virtual local area network (VLAN) is any broadcast domain that is partitioned and isolated in a computer network at the data link layer ( OSI layer 2).IEEE 802.1Q-2011, ''1.4 VLAN aims and benefits'' In this context, virtual refers to a ...
).
Operation
How a VPN works depends on which technologies and protocols the VPN is built upon. A
tunneling protocol is used to transfer the network messages from one side to the other. The goal is to take network messages from applications on one side of the tunnel and replay them on the other side. Applications do not need to be modified to let their messages pass through the VPN, because the virtual network or link is made available to the OS.
Applications that do implement tunneling or
proxying features for themselves without making such features available as a network interface, are not to be considered VPN implementations but may achieve the same or similar end-user goal of exchanging private contents with a remote network.
Topology

Virtual private networks configurations can be classified depending on the purpose of the virtual extension, which makes different tunneling strategies appropriate for different topologies:
;Remote access
: A ''host-to-network'' configuration is analogous to joining one or more computers to a network to which they cannot be directly connected. This type of extension provides that computer access to
local area network
A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, campus, or building, and has its network equipment and interconnects locally managed. LANs facilitate the distribution of da ...
of a remote site, or any wider enterprise networks, such as an
intranet
An intranet is a computer network for sharing information, easier communication, collaboration tools, operational systems, and other computing services within an organization, usually to the exclusion of access by outsiders. The term is used in ...
. Each computer is in charge of activating its own tunnel towards the network it wants to join. The joined network is only aware of a single remote host for each tunnel. This may be employed for
remote work
Remote work (also called telecommuting, telework, work from or at home, WFH as an initialism, hybrid work, and other terms) is the practice of work (human activity), working at or from one's home or Third place, another space rather than from ...
ers, or to enable people accessing their private home or company resources without exposing them on the public Internet. Remote access tunnels can be either on-demand or always-on. Because the remote host location is usually unknown to the central network until the former tries to reach it, proper implementations of this configuration require the remote host to initiate the communication towards the central network it is accessing.
;Site-to-site
: A ''site-to-site'' configuration connects two networks. This configuration expands a network across geographically disparate locations. Tunneling is only done between gateway devices located at each network location. These devices then make the tunnel available to other local network hosts that aim to reach any host on the other side. This is useful to keep sites connected to each other in a stable manner, like office networks to their headquarters or datacenter. In this case, any side may be configured to initiate the communication as long as it knows how to reach the other.
In the context of site-to-site configurations, the terms ''
intranet
An intranet is a computer network for sharing information, easier communication, collaboration tools, operational systems, and other computing services within an organization, usually to the exclusion of access by outsiders. The term is used in ...
'' and ''
extranet'' are used to describe two different use cases. An ''intranet'' site-to-site VPN describes a configuration where the sites connected by the VPN belong to the same organization, whereas an ''extranet'' site-to-site VPN joins sites belonging to multiple organizations.
Typically, individuals interact with remote access VPNs, whereas businesses tend to make use of site-to-site connections for
business-to-business, cloud computing, and
branch office scenarios. However, these technologies are not mutually exclusive and, in a significantly complex business network, may be combined.
Apart from the general topology configuration, a VPN may also be characterized by:
* the tunneling protocol used to
tunnel
A tunnel is an underground or undersea passageway. It is dug through surrounding soil, earth or rock, or laid under water, and is usually completely enclosed except for the two portals common at each end, though there may be access and ve ...
the traffic,
* the tunnel's termination point location, e.g., on the customer
edge or network-provider edge,
* the security features provided,
* the
OSI layer they present to the connecting network, such as
Layer 2 link/circuit or
Layer 3 network connectivity,
* the number of simultaneous allowed tunnels,
* the relationship between the actor implementing the VPN and the network infrastructure provider, and whether the former trusts the medium of the former or not
A variety of VPN technics exist to adapt to the above characteristics, each providing different network tunneling capabilities and different security model coverage or interpretation.
Native and third-party support
Operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s vendors and developers do typically offer native support to a selection of VPN protocols. These are subject to change over the years, as some have been proven to be unsecure with respect to modern requirements and expectations, and others have emerged.
Support in consumer operating systems
Desktop, smartphone and other end-user device operating systems usually support configuring remote access VPN from their
graphical or
command-line tools. However, due to the variety of, often non standard, VPN protocols there exists many third-party applications that implement additional protocols not yet or no longer natively supported by the OS.
For instance,
Android lacked native
IPsec IKEv2 support until version 11, and users needed to install third-party apps in order to connect that kind of VPN. Conversely, Windows does not natively support plain IPsec IKEv1 remote access native VPN configuration (commonly used by
Cisco
Cisco Systems, Inc. (using the trademark Cisco) is an American multinational digital communications technology conglomerate corporation headquartered in San Jose, California. Cisco develops, manufactures, and sells networking hardware, s ...
and
Fritz!Box VPN solutions).
Support in network devices
Network appliances, such as firewalls, often include VPN gateway functionality for either remote access or site-to-site configurations. Their administration interfaces often facilitate setting up virtual private networks with a selection of supported protocols. In some cases, like in the open source operating systems devoted to firewalls and network devices (like
OpenWrt
OpenWrt (from ''open wireless router'') is an open-source project for embedded operating systems based on Linux kernel, Linux, primarily used on Embedded system, embedded devices to Router (computing), route network traffic. The main components ...
,
IPFire,
PfSense
pfSense is a firewall/ router computer software distribution based on FreeBSD. The open source pfSense Community Edition (CE) and pfSense Plus is installed on a physical computer or a virtual machine
In computing, a virtual machine (VM) is ...
or
OPNsense) it is possible to add support for additional VPN protocols by installing missing software components or third-party apps.
Commercial appliances with VPN features based on proprietary hardware/software platforms, usually support a consistent VPN protocol across their products but do not open up for customizations outside the use cases they intended to implement. This is often the case for appliances that rely on hardware acceleration of VPNs to provide higher throughput or support a larger amount of simultaneously connected users.
Security mechanisms
Whenever a VPN is intended to virtually extend a private network over a third-party untrusted medium, it is desirable that the chosen protocols match the following security model:
*
confidentiality
Confidentiality involves a set of rules or a promise sometimes executed through confidentiality agreements that limits the access to or places restrictions on the distribution of certain types of information.
Legal confidentiality
By law, la ...
to prevent disclosure of private information or
data sniffing, such that even if the network traffic is sniffed at the packet level (see network sniffer or
deep packet inspection
Deep packet inspection (DPI) is a type of data processing that inspects in detail the data (Network packet, packets) being sent over a computer network, and may take actions such as alerting, blocking, re-routing, or logging it accordingly. Deep ...
), an attacker would see only
encrypted data, not the raw data
* message
integrity
Integrity is the quality of being honest and having a consistent and uncompromising adherence to strong moral and ethical principles and values.
In ethics, integrity is regarded as the honesty and Honesty, truthfulness or of one's actions. Integr ...
to detect and reject any instances of tampering with transmitted messages,
data packets are secured by
tamper proofing via a
message authentication code (MAC), which prevents the message from being altered or
tampered without being rejected due to the MAC not matching with the altered data packet.
VPN are not intended to make connecting users anonymous or unidentifiable from the untrusted medium network provider perspective. If the VPN makes use of protocols that do provide those confidentiality features, their usage can increase user
privacy
Privacy (, ) is the ability of an individual or group to seclude themselves or information about themselves, and thereby express themselves selectively.
The domain of privacy partially overlaps with security, which can include the concepts of a ...
by making the untrusted medium owner unable to access the private data exchanged across the VPN.
Authentication
In order to prevent unauthorized users from accessing the VPN, most protocols can be implemented in ways that also enable
authentication
Authentication (from ''authentikos'', "real, genuine", from αὐθέντης ''authentes'', "author") is the act of proving an Logical assertion, assertion, such as the Digital identity, identity of a computer system user. In contrast with iden ...
of connecting parties. This secures the joined remote network confidentiality, integrity and availability.
Tunnel endpoints can be authenticated in various ways during the VPN access initiation. Authentication can happen immediately on VPN initiation (e.g. by simple whitelisting of endpoint
IP address
An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
), or very lately after actual tunnels are already active (e.g. with a
web captive portal).
Remote-access VPNs, which are typically user-initiated, may use
passwords,
biometrics
Biometrics are body measurements and calculations related to human characteristics and features. Biometric authentication (or realistic authentication) is used in computer science as a form of identification and access control. It is also used t ...
,
two-factor authentication, or other
cryptographic
Cryptography, or cryptology (from "hidden, secret"; and ''graphein'', "to write", or '' -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adversarial behavior. More gen ...
methods. People initiating this kind of VPN from unknown arbitrary network locations are also called "road-warriors". In such cases, it is not possible to use originating network properties (e.g. IP addresses) as secure authentication factors, and stronger methods are needed.
Site-to-site VPNs often use passwords (
pre-shared keys) or
digital certificates. Depending on the VPN protocol, they may store the key to allow the VPN tunnel to establish automatically, without intervention from the administrator.
Protocols

A virtual private network is based on a tunneling protocol, and may be possibly combined with other network or application protocols providing extra capabilities and different security model coverage.
*
Internet Protocol Security (
IPsec) was initially developed by the
Internet Engineering Task Force
The Internet Engineering Task Force (IETF) is a standards organization for the Internet standard, Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster ...
(IETF) for
IPv6
Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communication protocol, communications protocol that provides an identification and location system for computers on networks and routes traffic ...
, and was required in all standards-compliant implementations of IPv6 before RFC 6434 made it only a recommendation. This standards-based security protocol is also widely used with
IPv4
Internet Protocol version 4 (IPv4) is the first version of the Internet Protocol (IP) as a standalone specification. It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. ...
. Its design meets most security goals:
availability, integrity, and confidentiality. IPsec uses encryption,
encapsulating an IP packet inside an IPsec packet. De-encapsulation happens at the end of the tunnel, where the original IP packet is decrypted and forwarded to its intended destination. IPsec tunnels are set up by
Internet Key Exchange (IKE) protocol. IPsec tunnels made with IKE version 1 (also known as IKEv1 tunnels, or often just "IPsec tunnels") can be used alone to provide VPN, but have been often combined to the
Layer 2 Tunneling Protocol (L2TP). Their combination made possible to reuse existing L2TP-related implementations for more flexible authentication features (e.g.
Xauth), desirable for remote-access configurations. IKE version 2, which was created by Microsoft and Cisco, can be used alone to provide IPsec VPN functionality. Its primary advantages are the native support for authenticating via the
Extensible Authentication Protocol (EAP) and that the tunnel can be seamlessly restored when the IP address of the associated host is changing, which is typical of a roaming mobile device, whether on
3G or
4G LTE networks. IPsec is also often supported by network hardware accelerators, which makes IPsec VPN desirable for low-power scenarios, like always-on remote access VPN configurations.
*
Transport Layer Security
Transport Layer Security (TLS) is a cryptographic protocol designed to provide communications security over a computer network, such as the Internet. The protocol is widely used in applications such as email, instant messaging, and voice over ...
(
SSL/TLS) can tunnel an entire network's traffic (as it does in the
OpenVPN project and
SoftEther VPN project) or secure an individual connection. A number of vendors provide remote-access VPN capabilities through TLS. A VPN based on TLS can connect from locations where the usual TLS web navigation (
HTTPS
Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP). It uses encryption for secure communication over a computer network, and is widely used on the Internet. In HTTPS, the communication protoc ...
) is supported without special extra configurations,
*
Datagram Transport Layer Security (
DTLS) – used in Cisco
AnyConnect VPN and in
OpenConnect VPN to solve the issues
TLS has with tunneling over
TCP (SSL/TLS are TCP-based, and tunneling TCP over TCP can lead to big delays and connection aborts).
*
Microsoft Point-to-Point Encryption (
MPPE) works with the
Point-to-Point Tunneling Protocol and in several compatible implementations on other platforms.
* Microsoft
Secure Socket Tunneling Protocol (
SSTP) tunnels
Point-to-Point Protocol
In computer networking, Point-to-Point Protocol (PPP) is a data link layer (layer 2) communication protocol between two routers directly without any host or any other networking in between. It can provide loop detection, authentication, transmissio ...
(PPP) or Layer 2 Tunneling Protocol traffic through an
SSL/TLS channel (SSTP was introduced in
Windows Server 2008 and in
Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
Service Pack 1).
* Multi Path Virtual Private Network (MPVPN). Ragula Systems Development Company owns the registered
trademark
A trademark (also written trade mark or trade-mark) is a form of intellectual property that consists of a word, phrase, symbol, design, or a combination that identifies a Good (economics and accounting), product or Service (economics), service f ...
"MPVPN".
* Secure Shell (SSH) VPN –
OpenSSH offers VPN tunneling (distinct from
port forwarding) to secure remote connections to a network, inter-network links, and remote systems. OpenSSH server provides a limited number of concurrent tunnels. The VPN feature itself does not support personal authentication. SSH is more often used to remotely connect to machines or networks instead of a site to site VPN connection.
*
WireGuard is a protocol. In 2020, WireGuard support was added to both the Linux and Android kernels, opening it up to adoption by VPN providers. By default, WireGuard utilizes the
Curve25519 protocol for
key exchange and
ChaCha20-Poly1305 for encryption and message authentication, but also includes the ability to pre-share a
symmetric key between the client and server.
*
OpenVPN is a
free and open-source
Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
VPN protocol based on the TLS protocol. It supports perfect
forward-secrecy, and most modern secure cipher suites, like
AES,
Serpent,
TwoFish, etc. It is currently being developed and updated by OpenVPN Inc., a
non-profit
A nonprofit organization (NPO), also known as a nonbusiness entity, nonprofit institution, not-for-profit organization, or simply a nonprofit, is a non-governmental (private) legal entity organized and operated for a collective, public, or so ...
providing secure VPN technologies.
*Crypto IP Encapsulation (CIPE) is a free and open-source VPN implementation for tunneling
IPv4 packets over
UDP via
encapsulation. CIPE was developed for
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
operating systems by Olaf Titz, with a
Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
port
A port is a maritime facility comprising one or more wharves or loading areas, where ships load and discharge cargo and passengers. Although usually situated on a sea coast or estuary, ports can also be found far inland, such as Hamburg, Manch ...
implemented by Damion K. Wilson. Development for CIPE ended in 2002.
Trusted delivery networks
Trusted VPNs do not use cryptographic tunneling; instead, they rely on the security of a single provider's network to protect the traffic.
*
Multiprotocol Label Switching
Multiprotocol Label Switching (MPLS) is a routing technique in telecommunications networks that directs data from one node to the next based on labels rather than network addresses. Whereas network addresses identify endpoints, the labels iden ...
(MPLS) often overlays VPNs, often with quality-of-service control over a trusted delivery network.
* L2TP which is a standards-based replacement, and a compromise taking the good features from each, for two proprietary VPN protocols: Cisco's
Layer 2 Forwarding (L2F) (obsolete ) and Microsoft's
Point-to-Point Tunneling Protocol (PPTP).
From a security standpoint, a VPN must either trust the underlying delivery network or enforce security with a mechanism in the VPN itself. Unless the trusted delivery network runs among physically secure sites only, both trusted and secure models need an authentication mechanism for users to gain access to the VPN.
Mobile environments
Mobile virtual private networks are used in settings where an endpoint of the VPN is not fixed to a single
IP address
An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
, but instead roams across various networks such as data networks from cellular carriers or between multiple
Wi-Fi
Wi-Fi () is a family of wireless network protocols based on the IEEE 802.11 family of standards, which are commonly used for Wireless LAN, local area networking of devices and Internet access, allowing nearby digital devices to exchange data by ...
access points without dropping the secure VPN session or losing application sessions.
[Phifer, Lisa]
"Mobile VPN: Closing the Gap"
, ''SearchMobileComputing.com'', 16 July 2006. Mobile VPNs are widely used in
public safety
Public security or public safety is the prevention of and protection from events that could endanger the safety and security of the public from significant danger, injury, or property damage. It is often conducted by a state government to ensu ...
where they give law-enforcement officers access to applications such as
computer-assisted dispatch
Automation describes a wide range of technologies that reduce human intervention in processes, mainly by predetermining decision criteria, subprocess relationships, and related actions, as well as embodying those predeterminations in machine ...
and criminal databases, and in other organizations with similar requirements such as
field service management and healthcare.
[Cheng, Roger]
"Lost Connections"
, ''The Wall Street Journal'', 11 December 2007.
Networking limitations
A limitation of traditional VPNs is that they are point-to-point connections and do not tend to support
broadcast domain
A broadcast domain is a logical division of a computer network, in which all nodes can reach each other by broadcast at the data link layer. A broadcast domain can be within the same LAN segment or it can be bridged to other LAN segments.
In te ...
s; therefore, communication, software, and networking, which are based on
layer 2 and broadcast
packets, such as
NetBIOS used in
Windows networking, may not be fully supported as on a
local area network
A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, campus, or building, and has its network equipment and interconnects locally managed. LANs facilitate the distribution of da ...
. Variants on VPN such as
Virtual Private LAN Service (VPLS) and layer 2 tunneling protocols are designed to overcome this limitation.
See also
*
VPN service - list of VPN service providers
*
Anonymizer
*
Dynamic Multipoint Virtual Private Network
*
Ethernet VPN
*
Internet privacy
Internet privacy involves the right or mandate of personal privacy concerning the storage, re-purposing, provision to third parties, and display of information pertaining to oneself via the Internet. Internet privacy is a subset of data privacy. P ...
*
Mediated VPN
*
Opportunistic encryption
*
Provider-provisioned VPN
*
Split tunneling
*
Virtual private server
*
VPNLab
References
Further reading
*
{{DEFAULTSORT:Virtual Private Network
Network architecture
Internet privacy