Virtual Private Network Protocols is an important topic when it comes to securely connect to a private network from a public network.
A Virtual Private Network (VPN) gives us the possibility to connect to a private network from the internet in a secure way. There are several VPN services on the internet and a common question is how to compare the existing VPN protocols to decide which one to use to create a VPN.
In this article, you will see a comparison based on the existing bibliography on the topic.
Table of Contents
- Introduction
- PPTP
- L2F
- L2TP
- IpSec
- SSL
- TLS
- Virtual Private Network Protocols Comparison
- VPN servers that implement these protocols
- Conclusions
Introduction
Virtual private network services allow safe browsing through the internet and perform tasks such as connecting remotely from home to workplace or connecting two networks that are in distant places in a secure way.
A virtual private network encrypts the traffic between the computers that are connected. This gives the feeling that everyone is on a local network when they may be miles apart. A VPN is deployed on an existing network such as the internet, which implies savings in terms of the purchase of technological infrastructure.
When you want to implement your own VPN or connect to an existing one, one of the main aspects to consider are the cryptographic protocols that are in place to protect information. Some protocols are briefly described below.
PPTP
Point-To-Point Tunneling Protocol (PPTP) is an encrypted communication protocol developed by Microsoft. It operates in the data link layer of the OSI Model and is an extension of the Point-To-Point protocol or (PPP) or point-to-point connection.
It has not been ratified as a standard by the IETF. The specification for PPTP was published by RFC 2637.
“PPTP has been the subject of many security analyses and serious security vulnerabilities have been found in the protocol. The known vulnerabilities relate to the underlying PPP authentication protocols used, the design of the MPPE protocol as well as the integration between MPPE and PPP authentication for session key establishment.” (source).
L2F
The L2F (Layer 2 Forwarding) protocol was developed by Cisco. This protocol does not depend on the IP protocol and is capable of working with services such as Frame Relay. It allows establishing tunnels that contain more than one connection (this one is a difference from the PPP protocol).
This protocol was designed to tunnel Point-to-Point Protocol (PPP) traffic (source).
L2TP
L2TP (Layer 2 Tunneling Protocol) was created by an IETF working group to correct the deficiencies of the PPTP and L2F protocols and combines characteristics of both.
Like PPTP, L2TP uses PPP to provide service through dial-up access and establish a tunnel through the internet. Based on L2F, it defines its own tunneling protocol.
It an IETF approved standard (RFC 2661).
Although L2TP offers inexpensive access, with multiprotocol support and access to remote local area networks, it does not have particularly robust cryptographic characteristics.
For instance, The authentication operation is only performed between the endpoints of the tunnel, but not for each of the packets that travel through it. This can lead to spoofing somewhere inside the tunnel.
Without checking the integrity of each packet, it would be possible to carry out a denial-of-service attack using bogus control messages that terminate the underlying L2TP tunnel or PPP connection.
L2TP does not initially encrypt user data traffic, which can cause problems when it is important to keep data confidential (source).
IpSec
IPsec is a standard that provides encryption and authentication to IP packets, working at the network layer. Rather than being a single protocol, IPsec is actually a set of protocols, defined in various RFCs mainly in 2401, aimed at providing authentication, confidentiality and integrity to IP communications.
Its mandatory nature within the IPv6 standard, will probably make the popularity of IPsec grow at the same rate as the implementation of the new version of the IP protocol (López, 2010).
IPsec protocols operate at the network layer, Layer 3 of the OSI model. Therefore, for an application to be able to use IPsec, we don’t have to make any changes. However, to use other higher-level protocols, we must modify the code of the applications.
IPsec can be used to protect one or more routes between two computers, a pair of security gateways —computers that act as intermediaries among others, and that implement the IPsec protocols— or a gateway and a computer (López, 2010).
Depending on the type of route to be protected, there are two modes of operation.
Tunnel mode: between two security gateways, so that these are in charge of creating a safe route between two computers connected to them, through which the packets travel.
In this way, it is possible to have, within a local network, a computer that performs the tasks of the gateway. Computers in the network will send the packets to the gateway, so that it applies the IPsec protocols to them before forwarding them to the recipient.
This mode allows computers that do not incorporate IPsec to be safely interconnected. The only condition is that there are security gateways in the local networks.
Transport mode: In this case, the cryptographic calculations related to the IPsec protocols are performed at each end of the communication.
SSL
The SSL (Secure Sockets Layer) protocol, originally developed by the Netscape company, allows you to establish secure connections over the Internet, in a simple and transparent way.
The SSL protocol is placed in the application layer directly above the TCP protocol, and although it can provide security to any application that runs on TCP, it is mainly used to provide security to the HTTP (web), SMTP (email) and NNTP (news) protocols.
This protocol is used in secure web servers’ connections. When you see that the URL begins with the prefix “https: //”, SSL is in use.
Its foundation consists of encoding the messages before sending them through the network. Once the communication has been established, when an application wants to send information to another computer, the SSL layer encrypts the data, and then sends it to its destination over the network.
Similarly, the SSL module of the other computer will decode the messages and send it to the recipient application as clear text.
SSL also incorporates an authentication mechanism that allows you to guarantee
the identity of the interlocutors. Typically, since this protocol was originally designed to establish web communications, the only one that is usually authenticated is the server, although mutual authentication can also be performed.
A communication through SSL involves three phases fundamentally (López, 2010):
- Establishment of the connection and negotiation of the cryptographic algorithms to be used in the communication, based on the set of algorithms supported by each of the interlocutors.
- Keys exchange using a public key mechanism, and authentication of the interlocutors from their digital certificates.
- Symmetric encryption of traffic.
TLS
TLS (described in document RFC 2246) is a protocol based on version 3.0 of SSL. Because it has several improvements on SSL 3, it is incompatible with it.
One of the advantages it provides over SSL is that it can be started from an existing TCP connection. This allows you to continue working with the same ports as the unencrypted protocols. Whereas SSL is a protocol incompatible with TCP.
This means that we cannot establish a connection from a TCP client to an SSL server or viceversa. Therefore, it is necessary to differentiate them using different port numbers (80 for a web server and 443 for a web server over SSL). With TLS, we can establish the connection through TCP and port 80, and then activate the TLS protocol on it (López, 2010: Cryptography and Computer Security).
TLS was updated, in RFC 5246 (August 2008) and in RFC 6176 (March 2011). It is based on the previous SSL specifications (1994, 1995, 1996).
Virtual Private Network Protocols Comparison
For the implementation of VPNs, several of the protocols studied can be combined. Below is a comparison of the described protocols.
Criteria | PPTP | L2TP/IPsec | SSL/TLS |
Security Level | Basic encryption | Strong encryption. In transport mode encapsulates the data twice. It has integrity check. | Encryption varies depending on the algorithms used. Authentications happen by using digital certificates. |
Speed | High speed due to the low level of encryption. | Requires more processing time and is slower. | Efficient. |
Stability | It works in most Wi-Fi access point. High stability. | Compatible NAT devices. | Very reliable, it works in routers and in Wi-Fi access points. |
Vulnerabilities | Very vulnerable. It has been broken. | Some vulnerabilities have been documented. | Vulnerabilities are detected and fixed constantly. |
Compatibility | Native in most operating systems. | Native in most operating systems. | Compatible with most operating systems. |
Implementation complexity | Easy to implement. | High learning curve because the number of protocols that uses. | Easy to implement and configure. |
Estandarization | It is not a standard for VPN implementation | It is a standard for VPN implementation | It is not a standard for VPN implementation |
Observations
The PPTP protocol is very fast and native to most operating systems but not very secure. It has been replaced by L2TP/IPsec. It is not a standard for VPN implementation.
SSL/TLS are widely used protocols for the security of websites, combining them with the HTTP protocol, giving rise to HTTPS. They are compatible with most web browsers and works very well on wireless network access points. During its evolution, a large number of vulnerabilities have been detected and corrected. It is not considered a standard for VPN implementation. It is compatible with most operating systems.
IPsec is a very secure protocol and is considered a standard for VPN development. It encapsulates the data twice in its transport mode. It works on the network layer of the OSI model whereas most of the protocols work on the transport layer. This means that it is not necessary to make changes to the applications for their use. Its performance may be slower due to double encapsulation. It is native to most operating systems.
VPN servers that implement these protocols
Below you can see a description of two servers for creating VPNs that implement the SSL/TLS and IPsec protocols.
OpenVPN is a free software based connectivity solution. It offers point-to-point connectivity with hierarchical validation of remotely connected users and hosts.
OpenVON is a very good option in Wi-Fi technologies (IEEE 802.11 wireless networks) and supports a wide configuration, including load balancing. Its licence is GPLv2, a free software license.
This software product was created by James Yonan in 2001 and has been improving ever since.
It is a multi-platform solution that has simplified the configuration of VPN’s compared to other older and difficult to configure solutions such as IPsec and making it more accessible for inexperienced people in this type of technology (source).
StrongSwan is a full IPsec implementation for Linux 2.6 and 3.x kernels. The aim of the project is to provide strong authentication mechanisms using X.509 public key certificates.
The project is being kept active by Andreas Steffen who is Professor of Communications Security at the University of Applied Sciences in Rapperswil, Switzerland.
It is a descendant of the FreeS/WAN project. It supports a certificate revocation lists and the Online Certificate Status Protocol (OCSP). A unique feature is the use of X.509 attribute certificates to implement access control schemes based on group membership.
StrongSwan interacts with other IPsec implementations, including various Mac OS X and Windows clients. The modular strongSwan 5.0 fully implements the Internet Key Exchange Protocol (IKEv2) defined by RFC 5996 (IETF, n.d.). (source)
Conclusions
After studying and comparing the protocols analyzed for the construction of a VPN, you can conclude that the best options are SSL/TLS or IPsec.
If you want to set up a VPN that allows access to the largest number of devices, including mobile devices and using wireless connections, SSL/TLS should be used.
These protocols guarantee great compatibility with web services and are implemented in most browsers regardless of the operating system being used. All traffic travels through a single port, making it easy to configure.
On the other hand, if what you want to set up is a VPN network where the priority is security and you want all the services installed on the computers to use the protocol, then IPsec should be used.
This protocol operates on the network level of the OSI model, which is why it encrypts all the traffic that travels through the network regardless of the software application. It performs a double encapsulation of the packet which increases the level of security. It also requires a higher level of processing.
The implementation and configuration is more complex than SSL due to the number of ports it uses to establish communication. It is considered a standard, so it is compatible with most operating systems.
Apart from the software that is described in the article, there is a great variety of free applications that are used for this purpose. An example is the Pfsense firewall that allows you to implement VPN tunnels through the TLS and IPsec protocols.