VPN connection: what is it and what is a VPN channel for? What is a VPN or how to protect a network VPN connection, what is it.

VPN connection: what is it and what is a VPN channel for?  What is a VPN or how to protect a network VPN connection, what is it.
VPN connection: what is it and what is a VPN channel for? What is a VPN or how to protect a network VPN connection, what is it.

How to create a single private network for everyone mobile employees and remote branches

What is a VPN?

Let's assume we have two offices in different points city, or in different cities or countries and each of them is connected to the Internet. For work, say, 1C in the form of a single corporate system we need to integrate them into a single local network. (Despite the fact that we offer solutions for 1C in the form of distributed databases. Sometimes it’s easier to create a single network and connect directly to 1C server as if the server is located on your premises)

You can, of course, buy a personal line between two cities, but this solution will most likely be extremely expensive.
The solution using a virtual private network (VPN - Virtual Private Network) invites us to organize this dedicated line by creating an encrypted tunnel over the Internet. The main advantage of a VPN over dedicated communication lines is saving the company money while the channel is completely closed.
From a consumer's point of view, VPN is a technology with which you can organize remote secure access through open Internet channels to servers, databases, and any resources of your corporate network. Let's say an accountant in city A can easily print an invoice on the printer of a secretary in city B to whom the client came. Remote employees connecting via VPN from their laptops will also be able to work on the network as if they were on the physical network of their offices.

Very often, clients encounter *brakes* cash registers when using Remote Desktop you come to the need VPN installations. This will allow you to get rid of sending data for the cash register back and forth to the server via virtual COM over the Internet and will allow the installation of a thin client at any point that communicates with the cash register directly, sending only necessary information through a closed channel. And broadcasting the RDP interface directly to the Internet exposes your company to very great risks.

Connection methods

Methods of organizing a VPN are most appropriate to highlight the following 2 main methods:

  • (Client - Network ) Remote access of individual employees to the organization’s corporate network via a modem or public network.
  • (Network - Network) Uniting two or more offices into a single secure virtual network via the Internet

Most manuals, especially for Windows, describe the connection according to the first scheme. At the same time, you need to understand that this connection is not a tunnel, but only allows you to connect to a VPN network. To organize these tunnels, we only need 1 white IP and not according to the number of remote offices, as many mistakenly believe.

The figure shows both options for connecting to main office A.

A channel has been established between offices A and B to ensure the integration of the offices into a single network. This ensures transparency of both offices for any devices located in one of them, which solves many problems. For example, organizing a single number capacity within one PBX with IP phones.

All services of office A are available to mobile clients, and if office B is located in a single virtual network, its services are also available.

In this case, the connection method mobile clients usually implemented by PPTP (Point-to-Point Tunneling Protocol) Point-to-point tunneling protocol, and the second IPsec or OpenVPN

PPTP

(Point-to-Point Tunneling Protocol bumagin-lohg) is a point-to-point tunneling protocol, the brainchild of Microsoft, and is an extension of PPP (Point-to-Point Protocol), therefore, using its authentication, compression and encryption mechanisms. The PPTP protocol is built into the remote Windows access XP. With the standard choice of this protocol, Microsoft suggests using the MPPE (Microsoft Point-to-Point Encryption) encryption method. You can transfer data without encryption in clear text. Data encapsulation using the PPTP protocol occurs by adding a GRE (Generic Routing Encapsulation) header and an IP header to the data processed by the PPP protocol.

Due to significant security concerns, there is no reason to choose PPTP over other protocols other than the device's incompatibility with other VPN protocols. If your device supports L2TP/IPsec or OpenVPN, then it is better to choose one of these protocols.

It should be noted that almost all devices, including mobile ones, have a client built into the OS (Windows, iOS, Android) that allows you to instantly set up a connection.

L2TP

(Layer Two Tunneling Protocol) is a more advanced protocol, born from the combination of the PPTP (from Microsoft) and L2F (from Cisco) protocols, incorporating all the best from these two protocols. Provides a more secure connection than the first option; encryption occurs using the IPSec protocol (IP-security). L2TP is also built into the Windows XP remote access client, moreover, when automatic detection type of connection, the client first tries to connect to the server using this protocol, as it is more preferable in terms of security.

At the same time, the IPsec protocol has such a problem as the coordination of the necessary parameters. Given that many manufacturers set their parameters by default without the possibility of configuration, hardware using this protocol will be incompatible.

OpenVPN

An advanced open VPN solution created by OpenVPN technologies, which is now the de facto standard in VPN technologies. The solution uses SSL/TLS encryption protocols. OpenVPN uses the OpenSSL library to provide encryption. OpenSSL supports a large number of various cryptographic algorithms such as 3DES, AES, RC5, Blowfish. As in the case of IPSec, CheapVPN includes an extremely high level of encryption - AES algorithm with a 256-bit key length.
OpenVPN is the only solution that allows you to bypass those providers who cut or charge fees for opening additional protocols other than WEB. This makes it possible to organize channels that, in principle, impossible to track And we have such solutions

Now you have some idea of ​​what a VPN is and how it works. If you are a manager, think about it, maybe this is exactly what you were looking for

An example of setting up an OpenVPN server on the pfSense platform

Creating a server

  • Interface: WAN (network interface server connected to the Internet)
  • Protocol: UDP
  • Local Port: 1194
  • Description: pfSenseOVPN(any convenient name)
  • Tunnel Network: 10.0.1.0/24
  • Redirect Gateway: Turn on(Disable this option if you do not want all client Internet traffic to be redirected through the VPN server.)
  • Local Network: Leave it blank(If you want the local network behind the pfSense server to be accessible to remote clients VPN, enter the address space of this network here. Let's say 192.168.1.0/24)
  • Concurrent Connections: 2 (If you purchased an additional OpenVPN Remote Access Server license, enter the number corresponding to the number of licenses purchased)
  • Inter-Client Communications: Turn on(If you don't want VPN clients to see each other, disable this option)
  • DNS Server 1 (2, etc.): specify the DNS servers of the pfSense host.(you can find out their addresses in the section System > General Setup > DNS Servers)

Next, we create clients and to simplify the configuration procedures for client programs, pfSense provides additional tool“OpenVPN Client Export Utility”. This tool automatically prepares installation packages and files for clients, eliminating the need to manually configure an OpenVPN client.

VPN connections between offices cover such business security requirements as:

  • Possibility of centralized access to information from offices, as well as from the main office
  • Unified corporate Information system
  • Enterprise databases with a single point of entry
  • Business email with single sign-on
  • Confidentiality of information transferred between offices

If you have any difficulties setting up or have not yet decided on VPN technology, call us!

Every year electronic communications are improving, and increasingly high demands are placed on information exchange for speed, security and quality of data processing.

And here we will look in detail vpn connection: what is it, what is a VPN tunnel for, and how to use a VPN connection.

This material is a kind of introductory word to a series of articles where we will tell you how to create a vpn on various operating systems.

VPN connection what is it?

So, a virtual private network vpn is a technology that provides a secure (closed from external access) connection of a logical network over a private or public one in the presence of high-speed Internet.

Such a network connection of computers (geographically distant from each other at a considerable distance) uses a “point-to-point” connection (in other words, “computer-to-computer”).

Scientifically, this connection method is called a VPN tunnel (or tunnel protocol). You can connect to such a tunnel if you have a computer with any operating system that has an integrated VPN client that can “forward” virtual ports using the TCP/IP protocol to another network.

What is a VPN for?

The main benefit of a vpn is that negotiaters need a connectivity platform that not only scales quickly, but also (primarily) ensures data confidentiality, data integrity, and authentication.

The diagram clearly shows the use of VPN networks.

Rules for connections over a secure channel must first be written on the server and router.

How VPN works

When a connection occurs via VPN, the message header contains information about the IP address of the VPN server and the remote route.

Encapsulated data passing over a shared or public network cannot be intercepted because all information is encrypted.

The VPN encryption stage is implemented on the sender's side, and the recipient's data is decrypted using the message header (if there is a shared encryption key).

After the message is correctly decrypted, a VPN connection is established between the two networks, which also allows you to work on a public network (for example, exchange data with a client 93.88.190.5).

Concerning information security, then the Internet is an extremely unsecured network, and a VPN network with OpenVPN, L2TP / IPSec, PPTP, PPPoE protocols is completely secure and in a safe way data transmission.

Why do you need a VPN channel?

VPN tunneling is used:

Inside the corporate network;

To unite remote offices, as well as small branches;

To serve digital telephony with a wide range of telecommunications services;

To access external IT resources;

For building and implementing video conferences.

Why do you need a VPN?

VPN connection is required for:

Anonymous work on the Internet;

Downloading applications when the IP address is located in another regional zone of the country;

Safe work in a corporate environment using communications;

Simplicity and convenience of connection setup;

Provisions high speed connections without interruptions;

Creating a secure channel without hacker attacks.

How to use VPN?

Examples of how VPN works can be given endlessly. So, on any computer in the corporate network, when you establish a secure VPN connection, you can use mail to check messages, publish materials from anywhere in the country, or download files from torrent networks.

VPN: what is it on your phone?

Access via VPN on a phone (iPhone or any other Android device) allows you to maintain anonymity when using the Internet in public places, as well as prevent traffic interception and device hacking.

A VPN client installed on any OS allows you to bypass many of the provider’s settings and rules (if the provider has set any restrictions).

Which VPN to choose for your phone?

Mobile phones and smartphones running Android OS can use applications from Google Playmarket:

  • - vpnRoot, droidVPN,
  • - tor browser for surfing networks, also known as orbot
  • - InBrowser, orfox (firefox+tor),
  • - SuperVPN Free VPN Client
  • - OpenVPN Connect
  • - TunnelBear VPN
  • - Hideman VPN

Most of these programs are used for the convenience of “hot” system setup, placing launch shortcuts, anonymous Internet surfing, and selecting the type of connection encryption.

But the main tasks of using a VPN on a phone are checking corporate email, creating video conferences with several participants, and holding meetings outside the organization (for example, when an employee is on a business trip).

What is VPN on iPhone?

Let's look at which VPN to choose and how to connect it on an iPhone in more detail.

Depending on the type of network supported, when you first start the VPN configuration on your iPhone, you can select the following protocols: L2TP, PPTP and Cisco IPSec (in addition, you can “make” a VPN connection using third-party applications).

All of the listed protocols support encryption keys, user identification using a password and certification are carried out.

Among additional functions When setting up a VPN profile on an iPhone, you can note: RSA security, encryption level, and authorization rules for connecting to the server.

For iPhone phone From the appstore you should choose:

  • - free application Tunnelbear, with which you can connect to VPN servers in any country.
  • - OpenVPN connect is one of the best VPN clients. Here, to launch the application, you must first import RSA keys via iTunes into your phone.
  • - Cloak is a shareware application, since for some time the product can be “used” for free, but to use the program after the demo period has expired, you will have to buy it.

VPN creation: selection and configuration of equipment

For corporate communications in large organizations or associations deleted friend from other offices use hardware equipment capable of supporting continuous, secure work on the network.

To implement VPN technologies, the role of a network gateway can be: Unix servers, Windows server, network router and network gateway on which VPN is installed.

A server or device used to create a VPN enterprise network or a VPN channel between remote offices must perform complex technical tasks and provide a full range of services to users both on workstations and on mobile devices.

Any router or VPN router must provide reliable operation on the network without freezes. And the built-in VPN function allows you to change the network configuration for working at home, in an organization or in a remote office.

Setting up VPN on a router

In general, setting up a VPN on a router is done using the router’s web interface. On “classic” devices, to organize a VPN, you need to go to the “settings” or “network settings” section, where you select the VPN section, specify the protocol type, enter the settings for your subnet address, mask and specify the range of IP addresses for users.

In addition, to secure the connection, you will need to specify encoding algorithms, authentication methods, generate negotiation keys, and specify the WINS DNS servers. In the “Gateway” parameters you need to specify the gateway IP address (your own IP) and fill in the data on all network adapters.

If there are several routers in the network, you need to fill out the VPN routing table for all devices in the VPN tunnel.

Here is a list of hardware equipment used to build VPN networks:

Dlink routers: DIR-320, DIR-620, DSR-1000 with new firmware or D-Link router DI808HV.

Routers Cisco PIX 501, Cisco 871-SEC-K9

Linksys Rv082 router with support for about 50 VPN tunnels

Netgear router DG834G and routers models FVS318G, FVS318N, FVS336G, SRX5308

Mikrotik router with OpenVPN function. Example RouterBoard RB/2011L-IN Mikrotik

VPN equipment RVPN S-Terra or VPN Gate

ASUS routers models RT-N66U, RT-N16 and RT N-10

ZyXel routers ZyWALL 5, ZyWALL P1, ZyWALL USG

An example of equipment for building VPN on routers is equipment from Cisco Systems. Since version software IOS 11.3, Cisco routers support L2TP and IPSec protocols. In addition to simple encryption of traffic, Cisco supports other VPN features such as authentication during tunnel connection and key exchange.

Can be used to improve router performance additional module ESA encryption. In addition, Cisco System has released a specialized device for VPN, which is called the Cisco 1720 VPN Access Router (VPN access router), intended for installation in small and medium-sized companies, as well as in branches of large organizations.

· Software-based VPN

The next approach to building a VPN is to purely software solutions. When implementing such a solution, specialized software is used that runs on a dedicated computer, and in most cases acts as a proxy server. The computer running this software may be located behind a firewall.

An example of such a solution is AltaVista Tunnel 97 software from Digital. When using this software, the client connects to the Tunnel 97 server, authenticates with it and exchanges keys. Encryption is based on 56 or 128 bit keys obtained during the connection establishment process. Next, the encrypted packets are encapsulated into other IP packets, which in turn are sent to the server. In addition, this software generates new keys every 30 minutes, which significantly increases the security of the connection.

The positive qualities of AltaVista Tunnel 97 are ease of installation and ease of management. The disadvantages of this system include its non-standard architecture (its own key exchange algorithm) and low performance.

· VPN based on network OS

We will look at solutions based on a network OS using the example of Microsoft's Windows NT system. For VPN creation Microsoft uses the PPTP protocol, which is integrated into Windows NT. This solution is very attractive for organizations using Windows as a corporate operating system. It should be noted that the cost of such a solution is significantly lower than the cost of other solutions. VPN in operation Windows based NT uses the NT user database stored on the Primary Domain Controller (PDC). When connecting to a PPTP server, the user is authenticated using the PAP, CHAP or MS-CHAP protocols. Transmitted packets are encapsulated in GRE/PPTP packets. To encrypt packets, a non-standard protocol from Microsoft Point-to-Point Encryption is used with a 40 or 128 bit key received at the time the connection is established. The disadvantages of this system are the lack of data integrity checking and the inability to change keys during the connection. The positive aspects are ease of integration with Windows and low cost.

· Hardware-based VPN

The option of building a VPN on special devices can be used in networks that require high performance. An example of such a solution is the IPro-VPN product from Radguard. This product uses hardware encryption of transmitted information, capable of transmitting a stream of 100 Mbit/s. IPro-VPN supports the IPSec protocol and the ISAKMP/Oakley key management mechanism. Among other things, this device supports network address translation tools and can be supplemented with a special card that adds firewall functionality

2. VPN protocols

VPN networks are built using data tunneling protocols through the public Internet communications network, and the tunneling protocols provide data encryption and carry out end-to-end transmission between users. As a rule, today the following levels of protocols are used to build VPN networks:

Data link layer

2.1 Link layer

At the data link layer, L2TP and PPTP data tunneling protocols can be used, which use authorization and authentication.

Currently, the most common VPN protocol is the Point-to-Point Tunneling Protocol (PPTP). It was developed by 3Com and Microsoft to provide secure remote access to corporate networks via the Internet. PPTP uses existing open TCP/IP standards and relies heavily on the legacy PPP point-to-point protocol. In practice, PPP remains the communication protocol of the PPTP connection session. PPTP creates a tunnel through the network to the recipient's NT server and transmits PPP packets from the remote user through it. Server and work station using a virtual private network and not paying attention to how secure or accessible it is global network between them. Server-initiated termination of a connection session, unlike specialized remote access servers, allows administrators local network do not allow remote users to leave the system Windows security NT Server.

Although the competence of the PPTP protocol extends only to devices operating under Windows control, it provides companies with the ability to interact with existing network infrastructures without compromising their own security systems. Thus, a remote user can connect to the Internet through a local ISP via an analogue telephone line or an ISDN link and establish a connection to the NT server. At the same time, the company does not have to spend large sums on organizing and maintaining a pool of modems that provides remote access services.

The following discusses the operation of the RRTR. PPTP encapsulates IP packets for transmission over an IP network. PPTP clients use the destination port to create a tunnel control connection. This process occurs at the transport layer of the OSI model. After the tunnel is created, the client computer and the server begin exchanging service packets. In addition to the PPTP control connection that ensures the link is operational, a connection is created to forward the data through the tunnel. Encapsulating data before sending it through a tunnel occurs somewhat differently than during normal transmission. Encapsulating data before sending it to the tunnel involves two steps:

1. First created information part PPP. Data flows from top to bottom, from the OSI application layer to the data link layer.

2. The received data is then sent up the OSI model and encapsulated by protocols upper levels.

Thus, during the second pass, the data reaches the transport layer. However, the information cannot be sent to its destination, since the OSI data link layer is responsible for this. Therefore, PPTP encrypts the payload field of the packet and takes over the second-layer functions typically associated with PPP, i.e. adds a PPP header and ending to the PPTP packet. This completes the creation of the link layer frame.

Next, PPTP encapsulates the PPP frame in a GenericRoutingEncapsulation (GRE) packet, which belongs to the network layer. GRE encapsulates network layer protocols such as IPX, AppleTalk, DECnet to allow them to be transported over IP networks. However, GRE does not have the ability to establish sessions and protect data from intruders. This uses PPTP's ability to create a tunnel control connection. Using GRE as an encapsulation method limits the scope of PPTP to IP networks only.

After the PPP frame has been encapsulated in a frame with a GRE header, encapsulation is performed in a frame with an IP header. The IP header contains the source and destination addresses of the packet. Finally, PPTP adds a PPP header and ending. Exhibit 3 shows the data structure for forwarding over a PPTP tunnel. [Appendix 3]

The sending system sends data through the tunnel. The receiving system removes all overhead headers, leaving only the PPP data.

In the near future, an increase in the number of virtual private networks deployed based on the new second-level tunneling protocol Layer2 Tunneling Protocol - L2TP is expected.

L2TP emerged as a result of combining the PPTP and L2F (Layer 2 Forwarding) protocols. PPTP allows PPP packets to be transmitted through the tunnel, and L2F packets SLIP and PPP. To avoid confusion and system interoperability problems in the telecommunications market, the Internet Engineering Task Force (IETF) recommended that CiscoSystems combine PPTP and L2F. By all accounts, L2TP combines the best features of PPTP and L2F. The main advantage of L2TP is that this protocol allows you to create a tunnel not only in IP networks, but also in such as ATM, X.25 and Frame Relay. Unfortunately, the Windows 2000 implementation of L2TP only supports IP.

L2TP uses UDP as a transport and uses the same message format for both tunnel control and data forwarding. L2TP as implemented by Microsoft uses UDP packets containing encrypted PPP packets as control messages. Delivery reliability is guaranteed by packet sequence control.

Functionality PPTP and L2TP are different. L2TP can be used not only in IP networks; service messages for creating a tunnel and sending data through it use the same format and protocols. PPTP can only be used on IP networks and requires a separate TCP connection to create and use a tunnel. L2TP over IPSec offers more levels security than PPTP and can guarantee almost 100 percent security of your organization's critical data. L2TP's features make it a very promising protocol to build virtual networks.

VPN networks are built using protocols for tunneling data through the public Internet, with tunneling protocols providing data encryption and end-to-end transmission between users. As a rule, today the following levels of protocols are used to build VPN networks:

  • Data Link Layer
  • Network layer
  • Transport layer.

1.1 Link layer

At the data link layer, L2TP and PPTP data tunneling protocols can be used, which use authorization and authentication.

VPN protocol - point-to-point tunneling protocol or Point-to-Point Tunneling Protocol - PPTP. It was developed by 3Com and Microsoft to provide secure remote access to corporate networks via the Internet. PPTP uses existing open TCP/IP standards and relies heavily on the legacy PPP point-to-point protocol.

In practice, PPP remains the communication protocol of the PPTP connection session. PPTP creates a tunnel through the network to the recipient server and transmits PPP packets from the remote user through it.

The server and workstation use a virtual private network and have no regard for how secure or accessible the WAN between them is. Server-initiated session termination, unlike specialized remote access servers, allows local network administrators to keep remote users within the security limits of Windows Server.

Although the PPTP protocol only applies to devices running Windows, it provides companies with the ability to interact with existing network infrastructures without compromising their own security systems.

RRTR work.

PPTP encapsulates IP packets for transmission over an IP network. PPTP clients use the destination port to create a tunnel control connection. This process occurs at the transport layer of the OSI model. After the tunnel is created, the client computer and the server begin exchanging service packets. In addition to the PPTP control connection that ensures the link is operational, a connection is created to forward the data through the tunnel. Encapsulating data before sending it through a tunnel occurs somewhat differently than during normal transmission. Encapsulating data before sending it to the tunnel involves two steps:

  1. First, the PPP information part is created. Data flows from top to bottom, from the OSI application layer to the data link layer.
  2. The received data is then sent up the OSI model and encapsulated by upper layer protocols.

Thus, during the second pass, the data reaches the transport layer. However, the information cannot be sent to its destination, since the OSI data link layer is responsible for this. Therefore, PPTP encrypts the payload field of the packet and takes over the second-layer functions typically associated with PPP, i.e. adds a PPP header and ending to the PPTP packet. This completes the creation of the link layer frame.

Next, PPTP encapsulates the PPP frame in a Generic Routing Encapsulation (GRE) packet, which belongs to the network layer. GRE encapsulates network layer protocols such as IPX, AppleTalk, DECnet to allow them to be transported over IP networks. However, GRE does not have the ability to establish sessions and protect data from intruders. This uses PPTP's ability to create a tunnel control connection. Using GRE as an encapsulation method limits the scope of PPTP to IP networks only.

After the PPP frame has been encapsulated in a frame with a GRE header, encapsulation is performed in a frame with an IP header. The IP header contains the source and destination addresses of the packet. Finally, PPTP adds a PPP header and ending.

The sending system sends data through the tunnel. The receiving system removes all overhead headers, leaving only the PPP data.

L2TP emerged as a result of combining the PPTP and L2F (Layer 2 Forwarding) protocols. PPTP allows PPP packets to be transmitted through the tunnel, and L2F packets SLIP and PPP. To avoid confusion and interoperability problems in the telecommunications market, the Internet Engineering Task Force (IETF) recommended that Cisco Systems combine PPTP and L2F. By all accounts, L2TP combines the best features of PPTP and L2F.

The main advantage of L2TP is that this protocol allows you to create a tunnel not only in IP networks, but also in such as ATM, X.25 and Frame Relay. Unfortunately, the Windows 2000 implementation of L2TP only supports IP.

L2TP uses UDP as a transport and uses the same message format for both tunnel control and data forwarding. L2TP as implemented by Microsoft uses UDP packets containing encrypted PPP packets as control messages. Delivery reliability is guaranteed by packet sequence control.

The functionality of PPTP and L2TP is different. L2TP can be used not only in IP networks; service messages for creating a tunnel and sending data through it use the same format and protocols. PPTP can only be used on IP networks and requires a separate TCP connection to create and use the tunnel. L2TP over IPSec offers more layers of security than PPTP and can guarantee nearly 100 percent security for your organization's critical data. The features of L2TP make it a very promising protocol for building virtual networks.

The L2TP and PPTP protocols differ from third-level tunneling protocols in a number of features:

  1. Providing corporations with the opportunity to independently choose the method of authenticating users and verifying their credentials - on their own “territory” or with an Internet service provider. By processing tunneled PPP packets, corporate network servers receive all the information necessary to identify users.
  2. Support for tunnel switching - terminating one tunnel and initiating another to one of many potential terminators. Tunnel switching allows you to extend the PPP connection to the required endpoint.
  3. Providing system administrators corporate network the ability to implement strategies for assigning access rights to users directly on the firewall and internal servers.

Because tunnel terminators receive PPP packets containing user information, they are able to apply administrator-defined security policies to individual user traffic. (Third-level tunneling does not allow distinguishing between packets coming from the provider, so security policy filters must be applied at the end workstations and network devices.) In addition, when using a tunnel switch, it becomes possible to organize a “continuation” of the second-level tunnel to directly broadcast the traffic of individual users to the corresponding internal servers. Such servers may be tasked with additional packet filtering.

MPLS technology can also be used at the data link level to organize tunnels.

From the English Multiprotocol Label Switching - multiprotocol label switching - a data transfer mechanism that emulates various properties of circuit-switched networks over packet-switched networks. MPLS operates at a layer that could be positioned between the data link layer and the third network layer of the OSI model, and is therefore commonly referred to as a data link layer protocol. It was designed to provide a universal data service for both circuit-switched and packet-switched network clients. MPLS can carry a wide variety of traffic, such as IP packets, ATM, SONET, and Ethernet frames.

Solutions for organizing VPN at the link level have a fairly limited scope, usually within the provider’s domain.

1.2 Network layer

Network layer (IP layer). The IPSec protocol is used, which implements data encryption and confidentiality, as well as subscriber authentication. The use of the IPSec protocol allows for full-featured access equivalent to physical connection to the corporate network. To establish a VPN, each participant must configure certain IPSec parameters, i.e. Each client must have software that implements IPSec.

IPSec
Naturally, no company would want to openly transmit financial or other confidential information to the Internet. VPN channels are protected by powerful encryption algorithms based on IPsec security protocol standards. IPSec or Internet Protocol Security - a standard chosen by the international community, the IETF - Internet Engineering Task Force, creates the basis for security for the Internet Protocol (IP / IPSec protocol provides security at the network level and requires support for the IPSec standard only from devices communicating with each other on both side of the connection. All other devices located between them simply provide IP packet traffic.

The method of interaction between persons using IPSec technology is usually defined by the term “secure association” - Security Association (SA). A secure association operates on the basis of an agreement between the parties, who use IPSec to protect information transmitted to each other. This agreement regulates several parameters: sender and recipient IP addresses, cryptographic algorithm, key exchange order, key sizes, key lifetime, authentication algorithm.

IPSec is a consistent set of open standards with a core that can be easily extended with new features and protocols. The core of IPSec consists of three protocols:

  • AH or Authentication Header - authentication header - guarantees the integrity and authenticity of the data. The main purpose of the AH protocol is that it allows the receiving side to ensure that:
    • the packet was sent by a party with which a secure association has been established;
    • the contents of the packet were not distorted during its transmission over the network;
      the packet is not a duplicate of an already received packet.

The first two functions are mandatory for the AH protocol, and the last one is optionally selected when establishing an association. To perform these functions, the AH protocol uses a special header.

Its structure is considered according to the following scheme:

  1. The next header field indicates the code of the higher-level protocol, that is, the protocol whose message is located in the data field of the IP packet.
  2. The payload length field contains the length of the AH header.
  3. The Security Parameters Index (SPI) is used to associate a packet with its intended security association.
  4. The Sequence Number (SN) field indicates the sequence number of the packet and is used to protect against spoofing (when a third party attempts to reuse intercepted secure packets sent by the actual authenticated sender).
  5. The authentication data field, which contains the so-called Integrity Check Value (ICV), is used to authenticate and check the integrity of the packet. This value, also called a digest, is calculated using one of the two computationally irreversible functions MD5 or SAH-1 that are required by the AH protocol, but any other function can be used.

ESP or Encapsulating Security Payload– encrypted data encapsulation – encrypts transmitted data, ensuring confidentiality, can also support authentication and data integrity;

The ESP protocol solves two groups of problems.

  1. The first includes tasks similar to those of the AH protocol - ensuring authentication and data integrity based on the digest.
  2. The second is the protection of transmitted data by encrypting it from unauthorized viewing.

The header is divided into two parts, separated by a data field.

  1. The first part, called the ESP header itself, is formed by two fields (SPI and SN), the purpose of which is similar to the fields of the same name in the AH protocol, and is placed before the data field.
  2. The remaining ESP protocol service fields, called the ESP trailer, are located at the end of the packet.

The two trailer fields - the next header and the authentication data - are similar to the fields of the AH header. The Authentication Data field is absent if a decision is made not to use the integrity capabilities of the ESP protocol when establishing a secure association. In addition to these fields, the trailer contains two additional fields– aggregate and aggregate length.

The AH and ESP protocols can protect data in two modes:

  1. in transport – transmission is carried out with original IP headers;
  2. in a tunnel - the original packet is placed in a new IP packet and transmission is carried out with new headers.

The use of one mode or another depends on the requirements for data protection, as well as on the role played in the network by the node that terminates the secure channel. Thus, a node can be a host (end node) or a gateway (intermediate node).

Accordingly, there are three schemes for using the IPSec protocol:

  1. host-host;
  2. gateway-gateway;
  3. host gateway.

The capabilities of the AH and ESP protocols partially overlap: the AH protocol is only responsible for ensuring the integrity and authentication of data, the ESP protocol can encrypt data and, in addition, perform the functions of the AH protocol (in a stripped down form). An ESP can support encryption and authentication/integrity functions in any combination, that is, either the entire group of functions, authentication/integrity only, or encryption only.

IKE or Internet Key Exchange– Internet key exchange – solves the auxiliary task of automatically providing the endpoints of a secure channel with the secret keys necessary for the operation of authentication and data encryption protocols.

1.3 Transport layer

The transport layer uses the SSL/TLS or Secure Socket Layer/Transport Layer Security protocol, which implements encryption and authentication between the transport layers of the receiver and transmitter. SSL/TLS can be used to secure TCP traffic, but cannot be used to secure UDP traffic. To operate a VPN based on SSL/TLS, there is no need to implement special software since each browser and mail client equipped with these protocols. Due to the fact that SSL/TLS is implemented at the transport layer, a secure connection is established “end-to-end”.

The TLS protocol is based on the Netscape SSL protocol version 3.0 and consists of two parts - the TLS Record Protocol and the TLS Handshake Protocol. The differences between SSL 3.0 and TLS 1.0 are minor.

SSL/TLS includes three main phases:

  1. iA dialogue between the parties, the purpose of which is to select an encryption algorithm;
  2. Key exchange based on public key cryptosystems or certificate-based authentication;
  3. Transfer of data encrypted using symmetric encryption algorithms.

1.4 VPN Implementation: IPSec or SSL/TLS?

IT department managers are often faced with the question: which protocol to choose for building a corporate VPN network? The answer is not obvious since each approach has both pros and cons. We will try to analyze and identify when it is necessary to use IPSec, and when SSL/TLS. As can be seen from the analysis of the characteristics of these protocols, they are not interchangeable and can function both separately and in parallel, defining the functional features of each of the implemented VPNs.

The choice of protocol for building a corporate VPN network can be made according to the following criteria:

The type of access required for VPN users.

  1. Fully functional, always-on connection to the corporate network. The recommended choice is the IPSec protocol.
  2. Temporary connection, for example, of a mobile user or a user using a public computer, in order to gain access to certain services, For example, e-mail or database. The recommended choice is the SSL/TLS protocol, which allows you to organize a VPN for each individual service.

Whether the user is an employee of the company.

  1. If the user is an employee of a company, the device he uses to access the corporate network via IPSec VPN can be configured in some specific way.
  2. If the user is not an employee of the company to which the corporate network is being accessed, it is recommended to use SSL/TLS. This will limit guest access to certain services only.

What is the security level of the corporate network?

  1. High. The recommended choice is the IPSec protocol. Indeed, the level of security offered by IPSec is much higher than that offered by the SSL/TLS protocol due to the use of configurable software on the user side and a security gateway on the corporate network side.
  2. Average. The recommended choice is the SSL/TLS protocol, which allows access from any terminal.

The level of security of data transmitted by the user.

  1. High, for example, company management. The recommended choice is the IPSec protocol.
  2. Average, for example, partner. The recommended choice is the SSL/TLS protocol.
    Depending on the service – from medium to high. The recommended choice is a combination of the IPSec protocols (for services requiring a high level of security) and SSL/TLS (for services requiring a medium level of security).

What is more important: fast VPN deployment or future scalability of the solution?

  1. Quickly deploy a VPN network at minimal cost. The recommended choice is the SSL/TLS protocol. In this case, there is no need to implement special software on the user side as in the case of IPSec.
  2. VPN network scalability – adding access to various services. The recommended choice is the IPSec protocol, which allows access to all services and resources of the corporate network.
  3. Fast deployment and scalability. Recommended choice - a combination of IPSec and SSL/TLS: use SSL/TLS in the first stage to access necessary services followed by the introduction of IPSec.

2. Methods for implementing VPN networks

A virtual private network is based on three implementation methods:

  • Tunneling;
  • Encryption;
  • Authentication.

2.1 Tunneling

Tunneling ensures the transfer of data between two points - the ends of the tunnel - in such a way that the entire network infrastructure lying between them is hidden from the source and receiver of the data.

The transport medium of the tunnel, like a ferry, picks up packets of used network protocol at the entrance to the tunnel and delivers them unchanged to the exit. Building a tunnel is enough to connect two network nodes so that, from the point of view of the software running on them, they appear to be connected to the same (local) network. However, we must not forget that in fact the “ferry” with data passes through many intermediate nodes (routers) of an open public network.

This state of affairs poses two problems. The first is that information transmitted through the tunnel can be intercepted by attackers. If it is confidential (bank card numbers, financial statements, personal information), then the threat of its compromise is quite real, which in itself is unpleasant.

Even worse, attackers have the ability to modify the data transmitted through the tunnel so that the recipient will not be able to verify its authenticity. The consequences can be the most dire. Taking into account the above, we come to the conclusion that the tunnel in its pure form is suitable only for some types of network computer games and cannot claim to be used more seriously. Both problems are solved modern means cryptographic protection information.

To prevent unauthorized changes to be made to the data packet as it travels through the tunnel, an electronic digital signature(EDS). The essence of the method is that each transmitted packet is supplied with an additional block of information, which is generated in accordance with an asymmetric cryptographic algorithm and is unique to the contents of the packet and secret key Sender's digital signature. This block of information is the digital signature of the package and allows data authentication by the recipient who knows the open EDS key sender. Protection of data transmitted through the tunnel from unauthorized viewing is achieved by using strong encryption algorithms.

2.2 Authentication

Security is the main function of a VPN. All data from client computers passes through the Internet to the VPN server. Such a server may be located at a great distance from the client computer, and data on the way to the organization’s network passes through the equipment of many providers. How can I make sure that the data has not been read or modified? For this, various authentication and encryption methods are used.

PPTP can use any of the protocols used for PPP to authenticate users

  • EAP or Extensible Authentication Protocol;
  • MSCHAP or Microsoft Challenge Handshake Authentication Protocol (versions 1 and 2);
  • CHAP or Challenge Handshake Authentication Protocol;
  • SPAP or Shiva Password Authentication Protocol;
  • PAP or Password Authentication Protocol.

The best protocols are MSCHAP version 2 and Transport Layer Security (EAP-TLS), since they provide mutual authentication, i.e. The VPN server and client identify each other. In all other protocols, only the server authenticates clients.

Although PPTP provides a sufficient degree of security, L2TP over IPSec is more reliable. L2TP over IPSec provides authentication at the user and computer levels, and also performs authentication and data encryption.

Authentication is carried out either by an open test (clear text password) or by a challenge/response scheme. Everything is clear with the direct text. The client sends the server a password. The server compares this with the standard and either denies access or says “welcome.” Open authentication is almost never seen.

The request/response scheme is much more advanced. IN general view it looks like this:

  • the client sends the server a request for authentication;
  • the server returns a random response (challenge);
  • the client takes a hash from his password (a hash is the result of a hash function that converts an input data array of arbitrary length into an output bit string of a fixed length), encrypts the response with it and transmits it to the server;
  • the server does the same, comparing the received result with the client’s response;
  • if the encrypted response matches, authentication is considered successful;

In the first step of authenticating VPN clients and servers, L2TP over IPSec uses local certificates obtained from a certificate authority. The client and server exchange certificates and create a secure connection ESP SA (security association). After L2TP (over IPSec) completes the computer authentication process, user-level authentication is performed. For authentication, you can use any protocol, even PAP, which transmits the username and password in clear text. This is quite secure, since L2TP over IPSec encrypts the entire session. However, performing user authentication using MSCHAP, which uses different encryption keys to authenticate the computer and the user, can enhance security.

2.3. Encryption

PPTP encryption ensures that no one can access your data while it is being sent over the Internet. There are currently two supported encryption methods:

  • MPPE or Microsoft Point-to-Point Encryption is only compatible with MSCHAP (versions 1 and 2);
  • EAP-TLS can automatically select the length of the encryption key when negotiating parameters between the client and server.

MPPE supports keys with lengths of 40, 56 or 128 bits. Old OS Windows only supports encryption with a key length of 40 bits, so mixed Windows environment the minimum key length should be selected.

PPTP changes the encryption key value after each packet received. The MMPE protocol was designed for point-to-point communication links in which packets are transmitted sequentially and there is very little data loss. In this situation, the key value for the next packet depends on the results of decryption of the previous packet. When building virtual networks through networks public access these conditions cannot be met, since data packets often arrive at the recipient in a different order than they were sent. Therefore, PPTP uses packet sequence numbers to change the encryption key. This allows decryption to be performed regardless of previous received packets.

Both protocols are implemented as in Microsoft Windows, and outside it (for example, in BSD), VPN operating algorithms can differ significantly. In NT (and its derivative systems). Basic information is given in the table.

Thus, the “tunneling + authentication + encryption” combination allows you to transfer data between two points through a public network, simulating the operation of a private (local) network. In other words, the considered tools allow you to build a virtual private network.

An additional pleasant effect of a VPN connection is the possibility (and even necessity) of using the addressing system adopted in the local network.

The implementation of a virtual private network in practice looks like this: In local computer network A VPN server is installed at the company office. The remote user (or router, if connecting two offices) using VPN client software initiates the connection procedure with the server. User authentication occurs - the first phase of establishing a VPN connection. If the authority is confirmed, the second phase begins - the details of ensuring the security of the connection are agreed upon between the client and the server. After this, a VPN connection is organized, ensuring the exchange of information between the client and the server in the form when each data packet goes through encryption / decryption and integrity checks - data authentication.

The main problem with VPN networks is the lack of established standards for authentication and encrypted information exchange. These standards are still under development and therefore products from different manufacturers cannot establish VPN connections and automatically exchange keys. This problem entails a slowdown in the spread of VPNs, since it is difficult to force different companies to use the products of one manufacturer, and therefore the process of combining the networks of partner companies into so-called extranet networks is difficult.

Recently, in the world of telecommunications there has been an increased interest in virtual private networks (VPN). This is due to the need to reduce the cost of maintaining corporate networks due to cheaper connections remote offices and remote users via the Internet. Indeed, when comparing the cost of services for connecting several networks via the Internet, for example, with Frame Relay networks, you can notice a significant difference in cost. However, it should be noted that when connecting networks via the Internet, the question of data transmission security immediately arises, so it became necessary to create mechanisms to ensure the confidentiality and integrity of the transmitted information. Networks built on the basis of such mechanisms are called VPN.

In addition, very often a modern person, developing his business, has to travel a lot. These could be trips to remote corners of our country or to foreign countries. Often people need access to their information stored on their home or company computer. This problem can be solved by organizing remote access to it using a modem and line. Using a telephone line has its own characteristics. The disadvantages of this solution are that calling from another country costs a lot of money. There is another solution called VPN. The advantages of VPN technology are that the organization remote access not done through telephone line, but through the Internet, which is much cheaper and better. In my opinion, technology. VPN has the potential to become widespread around the world.

1. Concept and classification of VPN networks, their construction

1.1 What is a VPN

VPN(eng. Virtual Private Network - virtual private network) - a logical network created on top of another network, for example the Internet. Despite the fact that communications are carried out over public networks using insecure protocols, encryption creates information exchange channels that are closed from outsiders. VPN allows you to combine, for example, several offices of an organization into a single network using uncontrolled channels for communication between them.


At its core, a VPN has many of the properties of a leased line, but it is deployed within a public network, for example. With the tunneling technique, data packets are broadcast across the public network as if they were a normal point-to-point connection. A kind of tunnel is established between each data sender-receiver pair - a secure logical connection that allows data from one protocol to be encapsulated in packets of another. The main components of the tunnel are:

  • initiator;
  • routed network;
  • tunnel switch;
  • one or more tunnel terminators.

The principle of VPN operation itself does not contradict basic network technologies and protocols. For example, when establishing a remote access connection, the client sends a stream of standard PPP protocol packets to the server. In the case of organizing virtual leased lines between local networks, their routers also exchange PPP packets. However, a fundamentally new aspect is the forwarding of packets through a secure tunnel organized within a public network.

Tunneling allows you to organize the transmission of packets of the same protocol in a logical environment using a different protocol. As a result, it becomes possible to solve the problems of interaction between several different types of networks, starting with the need to ensure the integrity and confidentiality of transmitted data and ending with overcoming inconsistencies in external protocols or addressing schemes.

A corporation's existing network infrastructure can be prepared for VPN use either software-based or hardware. Setting up a virtual private network can be compared to laying a cable across a global network. Typically, a direct connection between a remote user and a tunnel end device is established using the PPP protocol.

The most common method for creating VPN tunnels is to encapsulate network protocols (IP, IPX, AppleTalk, etc.) in PPP and then encapsulate the resulting packets into a tunneling protocol. Usually the latter is IP or (much less often) ATM and Frame Relay. This approach is called second-level tunneling, since the “passenger” here is the second-level protocol.

An alternative approach of encapsulating network protocol packets directly into a tunneling protocol (such as VTP) is called Layer 3 tunneling.

No matter what protocols are used or what purposes pursued when organizing a tunnel, the basic technique remainspractically unchanged. Typically, one protocol is used to establish a connection with a remote node, and another is used to encapsulate data and service information for transmission through the tunnel.

1.2 Classification of VPN networks

VPN solutions can be classified according to several main parameters:

1. By type of environment used:

  • Secure VPN networks. The most common version of private private networks. With its help, it is possible to create a reliable and secure subnet based on an unreliable network, usually the Internet. Examples of secure VPNs are: IPSec, OpenVPN and PPTP.
  • Trusted VPN networks. They are used in cases where the transmission medium can be considered reliable and it is only necessary to solve the problem of creating a virtual subnet within a larger network. Security issues are becoming irrelevant. Examples of such VPN solutions are: MPLS and L2TP. It would be more correct to say that these protocols shift the task of ensuring security to others, for example L2TP, as a rule, is used in conjunction with IPSec.

2. According to the method of implementation:

  • VPN networks in the form of special software and hardware. The implementation of a VPN network is carried out using a special set of software and hardware. This implementation provides high performance and, as a rule, a high degree of security.
  • VPN networks as a software solution. Use Personal Computer with special software that provides VPN functionality.
  • VPN networks with an integrated solution. VPN functionality is provided by a complex that also solves filtering problems network traffic, organizing a firewall and ensuring quality of service.

3. By purpose:

  • Intranet VPN. They are used to unite several distributed branches of one organization into a single secure network, exchanging data via open communication channels.
  • Remote Access VPN. Used to create a secure channel between a segment of a corporate network ( central office or branch) and a single user who, working from home, connects to corporate resources with home computer or, while on a business trip, connects to corporate resources using a laptop.
  • Extranet VPN. Used for networks to which “external” users (for example, customers or clients) connect. The level of trust in them is much lower than in company employees, so it is necessary to provide special “lines” of protection that prevent or limit the latter’s access to particularly valuable, confidential information.

4. By protocol type:

  • There are implementations of virtual private networks for TCP/IP, IPX and AppleTalk. But today there is a tendency towards a general transition to the TCP/IP protocol, and the vast majority of VPN solutions support it.

5. By network protocol level:

  • By network protocol layer based on comparison with the layers of the ISO/OSI reference network model.

1.3. Building a VPN

There are various options for building a VPN. When choosing a solution, you need to consider the performance factors of VPN builders. For example, if a router is already operating at its maximum capacity, then adding VPN tunnels and applying encryption/decryption of information can stop the entire network due to the fact that this router will not be able to cope with simple traffic, let alone a VPN. Experience shows that it is best to use specialized equipment to build a VPN, but if there is a limitation on funds, then you can pay attention to a purely software solution. Let's look at some options for building a VPN.

  • VPN based on firewalls. Most firewall vendors support tunneling and data encryption. All such products are based on the fact that traffic passing through the firewall is encrypted. An encryption module is added to the firewall software itself. The disadvantage of this method is that performance depends on the hardware on which the firewall runs. When using PC-based firewalls, you must remember that such a solution can only be used for small networks with a small amount of information transferred.
  • Router-based VPN. Another way to build a VPN is to use routers to create secure channels. Since all information coming from the local network passes through the router, it is advisable to assign encryption tasks to this router.An example of equipment for building VPN on routers is equipment from Cisco Systems. Beginning with IOS software version 11.3, Cisco routers support L2TP and IPSec protocols. In addition to simple encryption of traffic, Cisco supports other VPN features such as authentication during tunnel connection and key exchange.To improve the performance of the router, an optional ESA encryption module can be used. In addition, Cisco System has released a specialized device for VPN, which is called the Cisco 1720 VPN Access Router (VPN access router), intended for installation in small and medium-sized companies, as well as in branches of large organizations.
  • Software-based VPN. The next approach to building a VPN is purely software solutions. When implementing such a solution, specialized software is used that runs on a dedicated computer, and in most cases acts as a proxy server. The computer running this software may be located behind a firewall.
  • VPN based on network OS.We will look at solutions based on a network OS using Microsoft's Windows OS as an example. To create a VPN, Microsoft uses the PPTP protocol, which is integrated into the Windows system. This solution is very attractive for organizations using Windows as a corporate operating system. It should be noted that the cost of such a solution is significantly lower than the cost of other solutions. Windows-based VPN uses a user base stored on the Primary Domain Controller (PDC). When connecting to a PPTP server, the user is authenticated using the PAP, CHAP or MS-CHAP protocols. Transmitted packets are encapsulated in GRE/PPTP packets. To encrypt packets, a non-standard protocol from Microsoft Point-to-Point Encryption is used with a 40 or 128 bit key received at the time the connection is established. The disadvantages of this system are the lack of data integrity checking and the inability to change keys during the connection. The positive aspects are ease of integration with Windows and low cost.
  • Hardware-based VPN. The option of building a VPN on special devices can be used in networks that require high performance. An example of such a solution is the IPro-VPN product from Radguard. This product uses hardware encryption of transmitted information, capable of transmitting a stream of 100 Mbit/s. IPro-VPN supports the IPSec protocol and the ISAKMP/Oakley key management mechanism. Among other things, this device supports network address translation tools and can be supplemented with a special card that adds firewall functions

2. VPN protocols

VPN networks are built using protocols for tunneling data through the public Internet, and the tunneling protocols provide data encryption and provide end-to-end transmission between users. As a rule, today the following levels of protocols are used to build VPN networks:

  • Data Link Layer
  • Network layer
  • Transport layer.

2.1 Link layer

At the data link layer, L2TP and PPTP data tunneling protocols can be used, which use authorization and authentication.

PPTP.

Currently, the most common VPN protocol is the Point-to-Point Tunneling Protocol - PPTP. It was developed by 3Com and Microsoft to provide secure remote access to corporate networks via the Internet. PPTP uses existing open TCP/IP standards and relies heavily on the legacy PPP point-to-point protocol. In practice, PPP remains the communication protocol of the PPTP connection session. PPTP creates a tunnel through the network to the recipient's NT server and transmits PPP packets from the remote user through it. The server and workstation use a virtual private network and have no regard for how secure or accessible the WAN between them is. Server-initiated session termination, unlike specialized remote access servers, allows local network administrators to keep remote users within the security limits of Windows Server.

Although the PPTP protocol only applies to devices running Windows, it provides companies with the ability to interact with existing network infrastructures without compromising their own security systems. Thus, a remote user can connect to the Internet through a local ISP via an analogue telephone line or an ISDN link and establish a connection to the NT server. At the same time, the company does not have to spend large sums on organizing and maintaining a pool of modems that provides remote access services.

The following discusses the operation of the RRTR. PPTP encapsulates IP packets for transmission over an IP network. PPTP clients use the destination port to create a tunnel control connection. This process occurs at the transport layer of the OSI model. After the tunnel is created, the client computer and the server begin exchanging service packets. In addition to the PPTP control connection that ensures the link is operational, a connection is created to forward the data through the tunnel. Encapsulating data before sending it through a tunnel occurs somewhat differently than during normal transmission. Encapsulating data before sending it to the tunnel involves two steps:

  1. First, the PPP information part is created. Data flows from top to bottom, from the OSI application layer to the data link layer.
  2. The received data is then sent up the OSI model and encapsulated by upper layer protocols.

Thus, during the second pass, the data reaches the transport layer. However, the information cannot be sent to its destination, since the OSI data link layer is responsible for this. Therefore, PPTP encrypts the payload field of the packet and takes over the second-layer functions typically associated with PPP, i.e. adds a PPP header and ending to the PPTP packet. This completes the creation of the link layer frame.

Next, PPTP encapsulates the PPP frame in a Generic Routing Encapsulation (GRE) packet, which belongs to the network layer. GRE encapsulates network layer protocols such as IPX, AppleTalk, DECnet to allow them to be transported over IP networks. However, GRE does not have the ability to establish sessions and protect data from intruders. This uses PPTP's ability to create a tunnel control connection. Using GRE as an encapsulation method limits the scope of PPTP to IP networks only.

After the PPP frame has been encapsulated in a frame with a GRE header, encapsulation is performed in a frame with an IP header. The IP header contains the source and destination addresses of the packet. Finally, PPTP adds a PPP header and ending.

The sending system sends data through the tunnel. The receiving system removes all overhead headers, leaving only the PPP data.

L2TP

In the near future, an increase in the number of virtual private networks is expected, deployed based on the new second-level tunneling protocol Layer 2 Tunneling Protocol - L2TP.

L2TP emerged as a result of combining the PPTP and L2F (Layer 2 Forwarding) protocols. PPTP allows PPP packets to be transmitted through the tunnel, and L2F packets SLIP and PPP. To avoid confusion and interoperability problems in the telecommunications market, the Internet Engineering Task Force (IETF) recommended that Cisco Systems combine PPTP and L2F. By all accounts, L2TP combines the best features of PPTP and L2F. The main advantage of L2TP is that this protocol allows you to create a tunnel not only in IP networks, but also in such as ATM, X.25 and Frame Relay. Unfortunately, the Windows 2000 implementation of L2TP only supports IP.

L2TP uses UDP as a transport and uses the same message format for both tunnel control and data forwarding. L2TP as implemented by Microsoft uses UDP packets containing encrypted PPP packets as control messages. Delivery reliability is guaranteed by packet sequence control.

The functionality of PPTP and L2TP is different. L2TP can be used not only in IP networks; service messages for creating a tunnel and sending data through it use the same format and protocols. PPTP can only be used on IP networks and requires a separate TCP connection to create and use the tunnel. L2TP over IPSec offers more layers of security than PPTP and can guarantee nearly 100 percent security for your organization's critical data. The features of L2TP make it a very promising protocol for building virtual networks.

The L2TP and PPTP protocols differ from third-level tunneling protocols in a number of features:

  1. Providing corporations with the opportunity to independently choose the method of authenticating users and verifying their credentials - on their own “territory” or with an Internet service provider. By processing tunneled PPP packets, corporate network servers receive all the information necessary to identify users.
  2. Support for tunnel switching - terminating one tunnel and initiating another to one of many potential terminators. Tunnel switching allows you to extend the PPP connection to the required endpoint.
  3. Enabling corporate network administrators to implement user access control strategies directly on the firewall and internal servers. Because tunnel terminators receive PPP packets containing user information, they are able to apply administrator-defined security policies to individual user traffic. (Third-level tunneling does not allow distinguishing packets coming from the provider, so security policy filters must be applied to end workstations and network devices.) In addition, if you use a tunnel switch, it becomes possible to organize a “continuation” of the tunnel second level for direct transmission of individual trafficusers to the corresponding internal servers. Such servers may be tasked with additional packet filtering.

MPLS

Also at the data link level, MPLS technology can be used to organize tunnels ( From the English Multiprotocol Label Switching - multiprotocol label switching - a data transfer mechanism that emulates various properties of circuit-switched networks over packet-switched networks). MPLS operates at a layer that could be positioned between the data link layer and the third network layer of the OSI model, and is therefore commonly referred to as a data link layer protocol. It was designed to provide a universal data service for both circuit-switched and packet-switched network clients. MPLS can carry a wide variety of traffic, such as IP packets, ATM, SONET, and Ethernet frames.

Solutions for organizing VPN at the link level have a fairly limited scope, usually within the provider’s domain.

2.2 Network layer

Network layer (IP layer). The IPSec protocol is used, which implements data encryption and confidentiality, as well as subscriber authentication. The use of the IPSec protocol allows for full-featured access equivalent to a physical connection to the corporate network. To establish a VPN, each participant must configure certain IPSec parameters, i.e. Each client must have software that implements IPSec.

IPSec

Naturally, no company would want to openly transfer Internet financial or other confidential information. VPN channels are protected by powerful encryption algorithms based on IPsec security protocol standards. IPSec or Internet Protocol Security - a standard chosen by the international community, the IETF - Internet Engineering Task Force, creates the security framework for the Internet Protocol (IP / IPSec protocol provides security at the network level and requires support for the IPSec standard only from devices communicating with each other on both side of the connection. All other devices located between them simply provide IP packet traffic.

The method of interaction between persons using IPSec technology is usually defined by the term “secure association” - Security Association (SA). A secure association operates on the basis of an agreement between the parties, who use IPSec to protect information transmitted to each other. This agreement regulates several parameters: sender and recipient IP addresses, cryptographic algorithm, key exchange order, key sizes, key lifetime, authentication algorithm.

IPSec is a consistent set of open standards with a core that can be easily extended with new features and protocols. The core of IPSec consists of three protocols:

· AN or Authentication Header - authentication header - guarantees the integrity and authenticity of the data. The main purpose of the AH protocol is that it allows the receiving side to ensure that:

  • the packet was sent by a party with which a secure association has been established;
  • the contents of the packet were not distorted during its transmission over the network;
  • the packet is not a duplicate of an already received packet.

The first two functions are mandatory for the AH protocol, and the last one is optionally selected when establishing an association. To perform these functions, the AH protocol uses a special header. Its structure is considered according to the following scheme:

  1. The next header field indicates the code of the higher-level protocol, that is, the protocol whose message is located in the data field of the IP packet.
  2. The payload length field contains the length of the AH header.
  3. The Security Parameters Index (SPI) is used to associate a packet with its intended security association.
  4. The Sequence Number (SN) field indicates the sequence number of the packet and is used to protect against spoofing (when a third party attempts to reuse intercepted secure packets sent by the actual authenticated sender).
  5. The authentication data field, which contains the so-called Integrity Check Value (ICV), is used to authenticate and check the integrity of the packet. This value, also called a digest, is calculated using one of the two computationally irreversible functions MD5 or SAH-1 that are required by the AH protocol, but any other function can be used.

· ESP or Encapsulating Security Payload- encrypted data encapsulation - encrypts transmitted data, ensuring confidentiality, can also support authentication and data integrity;

The ESP protocol solves two groups of problems.

  1. The first includes tasks similar to those of the AH protocol - ensuring authentication and data integrity based on the digest,
  2. The second is the transmitted data by encrypting it from unauthorized viewing.

The header is divided into two parts, separated by a data field.

  1. The first part, called the ESP header itself, is formed by two fields (SPI and SN), the purpose of which is similar to the fields of the same name in the AH protocol, and is placed before the data field.
  2. The remaining ESP protocol service fields, called the ESP trailer, are located at the end of the packet.

The two trailer fields - the next header and the authentication data - are similar to the fields of the AH header. The Authentication Data field is absent if a decision is made not to use the integrity capabilities of the ESP protocol when establishing a secure association. In addition to these fields, the trailer contains two additional fields - filler and filler length.

The AH and ESP protocols can protect data in two modes:

  1. in transport - transmission is carried out with original IP headers;
  2. in a tunnel - the original packet is placed in a new IP packet and transmission is carried out with new headers.

The use of one mode or another depends on the requirements for data protection, as well as on the role played in the network by the node that terminates the secure channel. Thus, a node can be a host (end node) or a gateway (intermediate node).

Accordingly, there are three schemes for using the IPSec protocol:

  1. host-host;
  2. gateway-gateway;
  3. host gateway.

The capabilities of the AH and ESP protocols partially overlap: the AH protocol is only responsible for ensuring the integrity and authentication of data, the ESP protocol can encrypt data and, in addition, perform the functions of the AH protocol (in a stripped down form). An ESP can support encryption and authentication/integrity functions in any combination, that is, either the entire group of functions, authentication/integrity only, or encryption only.

· IKE or Internet Key Exchange - Internet key exchange - solves the auxiliary task of automatically providing endpoints of a secure channel with the secret keys necessary for the operation of authentication and data encryption protocols.

2.3 Transport layer

The transport layer uses the SSL/TLS or Secure Socket Layer/Transport Layer Security protocol, which implements encryption and authentication between the transport layers of the receiver and transmitter. SSL/TLS can be used to secure TCP traffic, but cannot be used to secure UDP traffic. To operate a VPN based on SSL/TLS, there is no need to implement special software since every browser and email client is equipped with these protocols. Due to the fact that SSL/TLS is implemented at the transport layer, a secure connection is established “end-to-end”.

The TLS protocol is based on the Netscape SSL protocol version 3.0 and consists of two parts - the TLS Record Protocol and the TLS Handshake Protocol. The differences between SSL 3.0 and TLS 1.0 are minor.

SSL/TLS includes three main phases:

  1. Dialogue between the parties, the purpose of which is to select an encryption algorithm;
  2. Key exchange based on public key cryptosystems or certificate-based authentication;
  3. Transfer of data encrypted using symmetric encryption algorithms.

2.4 VPN Implementation: IPSec or SSL/TLS?

IT department managers are often faced with the question: which protocol to choose for building a corporate VPN network? The answer is not obvious since each approach has both pros and cons. We will try to conduct and identify when it is necessary to use IPSec, and when SSL/TLS. As can be seen from the analysis of the characteristics of these protocols, they are not interchangeable and can function both separately and in parallel, defining the functional features of each of the implemented VPNs.

The choice of protocol for building a corporate VPN network can be made according to the following criteria:

· Type of access required for VPN users.

  1. Fully functional, always-on connection to the corporate network. The recommended choice is the IPSec protocol.
  2. A temporary connection, for example, by a mobile user or a user using a public computer, in order to gain access to certain services, such as email or a database. The recommended choice is the SSL/TLS protocol, which allows you to organize a VPN for each individual service.

· Whether the user is an employee of the company.

  1. If the user is an employee of a company, the device he uses to access the corporate network via IPSec VPN can be configured in some specific way.
  2. If the user is not an employee of the company to which the corporate network is being accessed, it is recommended to use SSL/TLS. This will limit guest access to certain services only.

· What is the security level of the corporate network.

  1. High. The recommended choice is the IPSec protocol. Indeed, the level of security offered by IPSec is much higher than that offered by the SSL/TLS protocol due to the use of configurable software on the user side and a security gateway on the corporate network side.
  2. Average. The recommended choice is the SSL/TLS protocol, which allows access from any terminal.

· Security level of data transmitted by the user.

  1. High, for example, company management. The recommended choice is the IPSec protocol.
  2. Average, for example, partner. The recommended choice is the SSL/TLS protocol.

Depending on the service - from medium to high. The recommended choice is a combination of the IPSec protocols (for services requiring a high level of security) and SSL/TLS (for services requiring a medium level of security).

· What is more important, fast VPN deployment or future scalability of the solution.

  1. Quickly deploy a VPN network at minimal cost. The recommended choice is the SSL/TLS protocol. In this case, there is no need to implement special software on the user side as in the case of IPSec.
  2. VPN network scalability - adding access to various services. The recommended choice is the IPSec protocol, which allows access to all services and resources of the corporate network.
  3. Fast deployment and scalability. The recommended choice is a combination of IPSec and SSL/TLS: using SSL/TLS in the first stage to access the necessary services, followed by the implementation of IPSec.

3. Methods for implementing VPN networks

A virtual private network is based on three implementation methods:

· Tunneling;

· Encryption;

· Authentication.

3.1 Tunneling

Tunneling ensures the transfer of data between two points - the ends of the tunnel - in such a way that the entire network infrastructure lying between them is hidden from the source and receiver of the data.

The transport medium of the tunnel, like a ferry, picks up packets of the network protocol used at the entrance to the tunnel and delivers them unchanged to the exit. Building a tunnel is enough to connect two network nodes so that, from the point of view of the software running on them, they appear to be connected to the same (local) network. However, we must not forget that in fact the “ferry” with data passes through many intermediate nodes (routers) of an open public network.

This state of affairs poses two problems. The first is that information transmitted through the tunnel can be intercepted by attackers. If it is confidential (bank card numbers, financial statements, personal information), then the threat of its compromise is quite real, which in itself is unpleasant. Even worse, attackers have the ability to modify the data transmitted through the tunnel so that the recipient will not be able to verify its authenticity. The consequences can be the most dire. Taking into account the above, we come to the conclusion that the tunnel in its pure form is suitable only for some types of network computer games and cannot claim to be used more seriously. Both problems are solved by modern means of cryptographic information protection. To prevent unauthorized changes from being made to the data packet as it travels through the tunnel, the electronic digital signature method () is used. The essence of the method is that each transmitted packet is supplied with an additional block of information, which is generated in accordance with an asymmetric cryptographic algorithm and is unique for the contents of the packet and the secret key of the sender's digital signature. This block of information is the digital signature of the package and allows data to be authenticated by a recipient who knows public key Sender's digital signature. Protection of data transmitted through the tunnel from unauthorized viewing is achieved by using strong encryption algorithms.

3.2 Authentication

Security is the main function of a VPN. All data from client computers passes through the Internet to the VPN server. Such a server may be located at a great distance from the client computer, and data on the way to the organization’s network passes through the equipment of many providers. How can I make sure that the data has not been read or modified? For this, various authentication and encryption methods are used.

PPTP can use any of the protocols used for PPP to authenticate users

  • EAP or Extensible Authentication Protocol;
  • MSCHAP or Microsoft Challenge Handshake Authentication Protocol (versions 1 and 2);
  • CHAP or Challenge Handshake Authentication Protocol;
  • SPAP or Shiva Password Authentication Protocol;
  • PAP or Password Authentication Protocol.

The best protocols are MSCHAP version 2 and Transport Layer Security (EAP-TLS), since they provide mutual authentication, i.e. The VPN server and client identify each other. In all other protocols, only the server authenticates clients.

Although PPTP provides a sufficient degree of security, L2TP over IPSec is more reliable. L2TP over IPSec provides authentication at the user and computer levels, and also performs authentication and data encryption.

Authentication is carried out either by an open test (clear text password) or by a challenge/response scheme. Everything is clear with the direct text. The client sends the server a password. The server compares this with the standard and either denies access or says “welcome.” Open authentication is almost never seen.

The request/response scheme is much more advanced. In general it looks like this:

  • the client sends the server a request for authentication;
  • the server returns a random response (challenge);
  • the client takes a hash from his password (a hash is the result of a hash function that converts an input data array of arbitrary length into an output bit string of a fixed length), encrypts the response with it and transmits it to the server;
  • the server does the same, comparing the received result with the client’s response;
  • if the encrypted response matches, authentication is considered successful;

In the first step of authenticating VPN clients and servers, L2TP over IPSec uses local certificates obtained from a certificate authority. The client and server exchange certificates and create a secure connection ESP SA (security association). After L2TP (over IPSec) completes the computer authentication process, user-level authentication is performed. For authentication, you can use any protocol, even PAP, which transmits the username and password in clear text. This is quite secure, since L2TP over IPSec encrypts the entire session. However, performing user authentication using MSCHAP, which uses different encryption keys to authenticate the computer and the user, can enhance security.

3.3. Encryption

PPTP encryption ensures that no one can access your data while it is being sent over the Internet. There are currently two supported encryption methods:

  • MPPE or Microsoft Point-to-Point Encryption is only compatible with MSCHAP (versions 1 and 2);
  • EAP-TLS can automatically select the length of the encryption key when negotiating parameters between the client and server.

MPPE supports keys with lengths of 40, 56 or 128 bits. Older Windows operating systems only support 40-bit key length encryption, so in a mixed Windows environment you should choose the minimum key length.

PPTP changes the encryption key value after each packet received. The MMPE protocol was designed for point-to-point communication links in which packets are transmitted sequentially and there is very little data loss. In this situation, the key value for the next packet depends on the results of decryption of the previous packet. When building virtual networks through public networks, these conditions cannot be met, since data packets often arrive at the recipient in a different sequence than they were sent. Therefore, PPTP uses packet sequence numbers to change the encryption key. This allows decryption to be performed regardless of previous received packets.

Both protocols are implemented both in Microsoft Windows and outside it (for example, in BSD), the VPN operating algorithms may differ significantly.

Thus, the “tunneling + authentication + encryption” combination allows you to transfer data between two points through a public network, simulating the operation of a private (local) network. In other words, the considered tools allow you to build a virtual private network.

An additional pleasant effect of a VPN connection is the possibility (and even necessity) of using the addressing system adopted in the local network.

The implementation of a virtual private network in practice looks like this: A VPN server is installed in the local computer network of the company's office. The remote user (or router, if connecting two offices) using VPN client software initiates the connection procedure with the server. User authentication occurs - the first phase of establishing a VPN connection. If the authority is confirmed, the second phase begins - the details of ensuring the security of the connection are agreed upon between the client and the server. After this, a VPN connection is organized, ensuring the exchange of information between the client and the server in the form when each data packet goes through encryption/decryption and integrity check procedures - data authentication.

The main problem with VPN networks is the lack of established standards for authentication and encrypted information exchange. These standards are still under development and therefore products from different manufacturers cannot establish VPN connections and automatically exchange keys. This problem entails a slowdown in the spread of VPNs, since it is difficult to force different companies to use the products of one manufacturer, and therefore the process of combining the networks of partner companies into so-called extranet networks is difficult.

The advantages of VPN technology are that remote access is organized not through a telephone line, but through the Internet, which is much cheaper and better. The disadvantage of VPN technology is that VPN building tools are not full-fledged means of detecting and blocking attacks. They can prevent a number of unauthorized actions, but not all the possibilities that can be used to penetrate a corporate network. But despite all this, VPN technology has prospects for further development.

What can we expect in terms of VPN technology development in the future? Without any doubt, a unified standard for constructing such networks will be developed and approved. Most likely, the basis of this standard will be the already proven IPSec protocol. Next, manufacturers will focus on improving the performance of their products and creating user-friendly VPN management tools. Most likely, the development of VPN building tools will go in the direction of router-based VPNs, since this solution combines fairly high performance, integration of VPN and routing in one device. However, low-cost solutions for small organizations. In conclusion, it must be said that, despite the fact that VPN technology is still very young, it has a great future ahead of it.

Leave your comment!