What is a VPN protocol?
VPN protocols represent the processes and sets of instructions (or rules) VPN clients rely on to establish secure connections between a device and a VPN server in order to transmit data.
VPN protocols are formed from a combination of transmission protocols and encryption standards.
Which VPN protocols are currently available?
Here are the main VPN tunnelling protocols you need to know about:
OpenVPN – Very Secure and Fast
OpenVPN is the industry gold standard VPN protocol and we recommend you use it whenever you can.
It’s one of the most secure and safe VPN protocols, and importantly is open-source, which means it’s completely transparent and continues to be publicly tested and improved.
OpenVPN is very configurable and, while it’s not supported natively by any platform, most VPN providers offer free apps that support it.
These custom VPN apps are available across most major platforms like Microsoft Windows, Apple MacOS, Android, Linux, and iOS.
Some providers also offer OpenVPN configuration files, meaning you can download the original OpenVPN client for your platform from https://openvpn.net/ and use it to connect to your chosen VPN service.
OpenVPN works on both UDP and TCP, which are types of communication protocols.
TCP (Transmission Control Protocol) is the most used connection protocol on the internet. The data that is being sent is transferred in chunks, typically made up of several packets.
TCP is designed to deliver the transferred data to the OpenVPN client in the order it was sent from the OpenVPN server (e.g. packets 1, 2, 3, 4, and 5 sent from OpenVPN are received by the OpenVPN client in the same order – 1, 2, 3, 4, 5).
To do this, TCP can delay the delivery of the packets it has received over the network to the OpenVPN Client until it has received all the packets expected and rearranged any out-of-order packets back into place.
TCP will re-request (and then wait to receive) packets that may have been lost in transmission between server and client, too.
This processing and wait time adds latency to the VPN connection, making the connection slower than UDP.
UDP (User Datagram Protocol) simply transmits data packets without requiring confirmation of arrival, and the UDP packet sizes are smaller than TCP.
By using OpenVPN UDP, the smaller packet size, lack of checks, and re-organization results in a faster connection.
So, which is better: TCP or UDP?
It depends on your desired outcome.
If you’re using a VPN to game, stream, or use VoIP services, then UDP is your best bet, as it’s quicker than TCP.
The downside is that you may experience some lost packets, which for example might mean on a VOIP call you hear the voice of the person you’re talking to cut out for a fraction of a second mid-speech.
However, you should switch to TCP if you experience connection problems. TCP port 443 is also useful for bypassing censorship, as this port is the default port for HTTPS, and so is less likely to be blocked by firewalls.
For encryption, OpenVPN uses the OpenSSL library, which supports a range of ciphers.
OpenVPN encryption is made up of several elements: data channel, control channel, server authentication, and HMAC authentication:
- Server authentication functions in the same was as TLS or HTTPS. OpenVPN can use certificates to verify that the server you are talking to is cryptographically trusted.
- The control channel is used in the initial phase, performing the TLS handshake to agree on the encryption parameters to securely transmit data, and authenticating the client to the server.
- The data channel is the layer that transmits information between your device and the OpenVPN Server. This layer is encrypted using a symmetric encryption scheme for performance, the key for which was obtained via the control channel.
- HMAC authentication is used to ensure that packets being sent have not been altered in transit by a man-in-the-middle attacker who has the ability to read or alter the data in real time.
Be aware that some VPN services don’t use anywhere near the same level of encryption on both channels.
Using weaker encryption on the data channel can be a cheap shortcut to a faster connection as better security comes at the expense of speed.
Unfortunately, a VPN is only as secure as its weakest element, so you should look for a VPN that’s as strong as possible in its encryption of both channels.
We’ll go into more detail about that in the sections below on ciphers and handshakes.
Now that you know what the safest VPN protocol is, you should know what the others are – plus which one to avoid at all costs.
PPTP – Weak Security, Avoid
The Point-to-Point Tunneling Protocol (PPTP) one of the oldest VPN protocols still in use today. It was developed by a Microsoft-funded team and published in 1999.
Despite being obsolete, PPTP does have some positives: it’s compatible with pretty much everything, it doesn’t need additional software as it’s included in modern operating systems, and it’s very fast.
The major problem is that it’s proven to be insecure and easy to crack (an attack would typically take between one minute and 24 hours).
PPTP is also simple to block as it relies on the GRE protocol, which is easily firewalled.
You should avoid using this protocol unless absolutely necessary to change your IP address for non-sensitive reasons. We consider PPTP to be insecure.
L2TP/IPsec – Secure, But Can Be Slow
Layer 2 Tunneling Protocol (LT2P) takes the best features of both Microsoft’s Point-to-Point Tunneling Protocol (PPTP) and Cisco’s Layer 2 Forwarding Protocol (L2F) and is used to create a tunnel between a client device and a server over the network.
L2TP can handle authentication, but does not provide any encryption capabilities.
Therefore, L2TP is typically implemented with the Internet Protocol Security (IPsec) to create secure packets that provide authentication, integrity, and encryption of data.
This is more commonly known as L2TP/IPsec, and data is usually encrypted using the AES cipher, which you can read more about here.
When connecting to a VPN server with L2TP/IPsec, IPsec is used to create a secure control channel between client and server.
Packets of data from your device application (like your web browser, for example) are encapsulated by L2TP. IPSec then encrypts this L2TP data and sends it to the server, which then performs the reverse process, decrypting and decapsulating the data.
In terms of speed, L2TP/IPsec’s double encapsulation (essentially a tunnel within a tunnel) should make it slower than OpenVPN.
However, it is actually theoretically faster because the encryption and decryption take place in the kernel, which can process packets efficiently with minimum overhead.
L2TP/IPsec is generally considered safe when used with the AES cipher.
But there have been suggestions that the protocol has been compromised by the NSA, and that IPsec was deliberately weakened during its creation.
There hasn’t been any official confirmation of this, though.
The main problem with L2TP/IPsec and its use in VPN services lies with those services that use pre-shared keys (also known as a shared secret) that can be downloaded from the VPN service websites and are therefore available to anyone.
While these keys are only used to authenticate the connection with the VPN servers, and the data itself remains encrypted via a separate key, it does open the door to potential MITM (Man in-the-middle) attacks.
This is where the attacker impersonates a VPN server in order to decrypt the traffic and eavesdrop on the connection.
L2TP/IPsec also uses a limited number of fixed ports, which makes it relatively easy to block.
Despite these issues, LT2P/IPsec is a solid choice given that it’s supported natively by so many platforms as long as pre-shared keys are not used.
SSTP – Closed Source with Potential Risks
Secure Socket Tunneling Protocol (SSTP) is a Microsoft-owned proprietary protocol that’s based on SSL 3.0, meaning that, like OpenVPN, it can use TCP port 443.
As SSTP is not open-source, it is impossible to disprove suggestions of backdoors or other vulnerabilities present in the protocol.
This risk far outweighs any benefits from its close integration with Windows.
Another red flag is that SSL 3.0 is vulnerable to a man-in-the-middle attack known as POODLE.
It has not been confirmed whether SSTP is affected, but in our view it’s not worth the risk.
IKEv2/IPSec – Very Fast, Secure, and Stable
Internet Key Exchange version 2 (IKEv2) is a newer VPN protocol, and another closed-source standard developed in collaboration between Microsoft and Cisco.
IKEv2 is natively supported by iOS, BlackBerry, and Windows versions 7 and later.
However, there are open-source versions of IKEv2 developed for Linux which don’t carry the same trust issues as the proprietary version.
Similarly to L2TP/IPsec, IKEv2 is used alongside IPsec when a part of a VPN solution, but offers more functionality.
IKEv2/IPSec can handle changing of networks through something called the MOBIKE protocol – useful for mobile users who are prone to their connection dropping, and is faster due to being programmed to make better use of bandwidth.
IKEv2/IPSec also supports a wider range of encryption ciphers than L2TP/IPSec.
IKEv2 often won’t cut it when you’re trying to connect out of a highly censored country, though. This is because IKEv2 uses specified ports that are very easy for the Great Firewall to block.
WireGuard – Promising New Protocol
Wireguard is a new tunneling protocol that aims to be faster and higher-performing than the current most popular protocol, OpenVPN.
WireGuard aims to tackle the issues often associated with OpenVPN and IPsec: namely complicated setup, plus disconnections (without additional configuration) and the associated long reconnection times that follow.
While OpenVPN+OpenSSL and IPsec have a large codebase (~100,000 lines of code for OpenVPN and 500,000 for SSL) and IPsec (400,000 lines of code), which makes it hard to find bugs, Wireguard currently weighs in at less than 5,000 lines in size.
But Wireguard is still under development.
While Wireguard benchmarks show that it is very fast, there are issues in the implementation that may make it unsuitable for use by a commercial VPN provider.
One of which is that it requires a non-public IP address to be assigned to each user, which adds an element of logging any serious VPN user would be uncomfortable with.
Because this non-public IP address can be used to identify you.
Work is underway to address this, though.
It’s still early days for WireGuard, and it has yet to fully prove itself – however, an increasing number of VPN providers are adding it to their clients for test purposes only, including IVPN and AzireVPN.
VPN protocols provide the framework for secure encryption, now let’s find out what role ciphers play and the varieties of ciphers available.