VPN service for organizing a local network. VPN networks based on MPLS technology

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

What is a VPN?

Let's assume that we have two offices in different parts of the city, or in different cities or countries, and each of them is connected to the Internet. To operate, say, 1C as 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 in 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 point of view, VPN is a technology that allows you to 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, faced with *brakes* of cash registers when using Remote Desktop, come to the need to install a VPN. 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 the necessary information to the server over 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 method of connecting mobile clients is usually implemented by the PPTP protocol (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 tunnel 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 Windows XP Remote Access Client. 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 automatically determining the connection type, 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 different 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(server network interface 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 of the client's 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 VPN clients, specify the address space of that 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 an 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!

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.

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. To create a VPN, Microsoft uses the PPTP protocol, which is integrated into the Windows NT 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 NT-based VPN uses the NT 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

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. 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 NT 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 a 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 is expected, deployed based on the new second-level tunneling protocol Layer2 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 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.

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.

Recently, in the world of telecommunications there has been an increased interest in virtual private networks(Virtual Private Network - VPN). This is due to the need to reduce the cost of maintaining corporate networks by cheaper connection of 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 telephone 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 remote access is organized not through a 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 VPN networks, their construction

1.1 What is a VPN

VPN(English) VirtualPrivateNetwork– virtual private network) is a logical network created on top of another network, such as 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 same properties as a leased line, but it is deployed over a public network, such as the Internet. 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 using either software 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 is to encapsulate network protocol packets directly into a tunneling protocol (such as VTP), called Layer 3 tunneling.

No matter what protocols are used or what purposes

pursued when organizing a tunnel, the basic technique remains

practically 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:

· ProtectedVPNnetworks. 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.

· TrustedVPNnetworks. 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. By method of implementation:

· VPNnetworks 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.

· VPNnetworks in the form of a software solution. They use a personal computer with special software that provides VPN functionality.

· VPNnetworks with an integrated solution. VPN functionality is provided by a complex that also solves the problems of filtering 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. They are used to create a secure channel between a corporate network segment (central office or branch) and a single user who, working at home, connects to corporate resources from a 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 under TCP/IP, IPX And AppleTalk. But today there is a tendency towards a universal transition to the protocol TCP/IP, 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 running at the limit of its processor power, then adding VPN tunnels and applying encryption/decryption of information can stop the entire network due to the fact that the 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.

· Firewall-Based VPN

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.

An example of a firewall-based VPN is Check Point Software Technologies' FireWall-1. FairWall-1 uses a standard IPSec-based approach to build a VPN. Traffic entering the firewall is decrypted and standard access control rules are applied. FireWall-1 runs under the Solaris and Windows NT 4.0 operating systems.

· 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.

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 a 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. 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 make it possible to distinguish between packets arriving 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 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 transmission 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 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 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 traffic of IP packets.

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 - 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 responsible only 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 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 - TLS Record Protocol and 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. 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.

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 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 (EDS) 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 the recipient, who knows the public key of the sender's digital signature. 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 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. 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. 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: 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 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.


The ability to connect remote company offices with each other via secure communication channels is one of the most common tasks when building a distributed network infrastructure for companies of any size. There are several solutions to this problem:

Renting channels from a provider: A common and reliable option. The provider leases dedicated physical or logical communication channels. Such channels are often called “point-to-point”

Advantages:

  1. Ease of connection and use – maintenance of equipment and channels is entirely the responsibility of the provider;
  2. Guaranteed channel width – data transfer speed always corresponds to that stated by the provider;

Flaws:

  1. Security and control – the company cannot control the equipment on the provider’s side.

Building your own (physical) communication lines: A reliable and cost-effective solution, since the construction of a physical communication channel is entirely the responsibility of the company. With this solution, the company fully controls and services the constructed channels.

Advantages:

  1. Flexibility – the ability to deploy channels that meet all necessary requirements;
  2. Security and control – full control of the channel, since it belongs to the company;

Flaws:

  1. Deployment – ​​Building such private channels is a labor-intensive and expensive solution. Laying kilometers of optics along poles can cost a fortune. Even if you don’t take into account obtaining permits from all state authorities. authorities;
  2. Maintenance – channel maintenance is entirely the responsibility of the company, so the staff must have highly qualified specialists to ensure its performance;
  3. Low fault tolerance – external optical communication lines are often subject to unintentional damage (construction equipment, utilities, etc.). It may take several weeks for an optical link to be detected and corrected.
  4. Limited to one location - laying external optical communication lines is only relevant if objects are located within several tens of kilometers. Extending communications to another city hundreds and thousands of kilometers is not possible for reasons of common sense.

Building a secure channel over the Internet (VPN): This solution is relatively inexpensive and flexible. To connect remote offices, an Internet connection and network equipment with the ability to create VPN connections are sufficient.

Advantages:

  1. Low cost – the company pays only for Internet access;
  2. Scalability – to connect a new office you need the Internet and a router;

Flaws:

  1. Channel capacity – data transfer speed may vary (there is no guaranteed bandwidth);

This article will take a closer look at the last point, namely, what benefits VPN technology provides to businesses.
Virtual private network (VPN) is a set of technologies that provide a secure connection (tunnel) of two or more remote local networks through a public network (eg the Internet).

Unique advantages of geographically distributed VPN networks

Protection of transmitted traffic: it is safe to transmit traffic through the VPN tunnel using strong encryption protocols (3DES, AES). In addition to encryption, the integrity of the data and the authenticity of the sender are verified, eliminating the possibility of substitution of information and connection by an attacker.

Connection reliability: leading equipment manufacturers are improving VPN connection technologies, ensuring automatic restoration of VPN tunnels in the event of a short-term failure of the connection to the public network.
Mobility and ease of connection: you can connect to the company’s local network from anywhere in the world and from almost any modern device (smartphone, tablet computer, laptop), and the connection will be secure. Most multimedia device manufacturers have added VPN support to their products.

Redundancy and load balancing: if you use two providers when connecting to the Internet (for balancing/failover), then it is possible to balance VPN tunnel traffic between providers. If one of the providers fails, the tunnel will use a backup connection.

Traffic prioritization: the ability to control traffic using QoS - prioritization of voice, video traffic in case of high load on the tunnel.

VPN networks in business

Unified network

Combining a company's geographically distributed local networks into a single network (connecting branches to the main office) significantly simplifies interaction and data exchange within the company, reducing maintenance costs. Any corporate systems require a single network space for employees to work. This could be IP telephony, accounting and financial accounting systems, CRM, video conferencing, etc.

Mobile access

Regardless of the employee’s location, if he has the Internet and a laptop/smartphone/tablet, the employee can connect to the company’s internal resources. Thanks to this advantage, employees have the opportunity to perform work and quickly solve problems while outside the office.

Consolidation of networks of different companies

It is often necessary to combine networks of business partners, and such a union can be organized both with and without restricting access to the internal resources of each company. This association simplifies interaction between companies.


Remote management of IT infrastructure

Thanks to secure remote access to the company’s IT infrastructure equipment, the administrator is able to quickly solve assigned tasks and respond to problems that arise.

Quality of service

Traffic from video conferencing, IP telephony and some other applications requires a guaranteed channel width. Thanks to the use of QoS in VPN tunnels, for example, you can combine IP telephony of a company’s local network and a remote office.


Areas of application of distributed VPN networks and corporate data networks (CDNs)

Having analyzed the requirements and objectives of organizations of various sizes, we have compiled a general picture of solutions for each of them. Below is a description of typical implementations of VPN technology in a company's network infrastructure.

Solutions for small businesses. Often, the requirements for such a solution are the ability to connect remote users (up to 10) to the internal network and/or combine the networks of several offices. Such solutions are simple and quick to deploy. For such a network, it is recommended to have a backup channel with a speed lower or the same as the main one. The backup channel is passive and is used only if the main one is disconnected (the VPN tunnel is automatically built over the backup channel). Redundancy of edge equipment for such solutions is rarely used and often unjustified.

Traffic transmitted through the tunnel – traffic of internal applications (mail, web, documents), voice traffic.

Requirement for channel reservation: average

Equipment redundancy requirement: low


Solutions for medium-sized businesses. Along with connecting remote employees (up to 100), the network infrastructure must provide connection to several remote offices. For such solutions, Internet channel reservation is mandatory, and the capacity of the backup channel must be comparable to the speed of the main channel. In many cases, the backup channel is active (load balancing between channels is carried out). It is recommended to reserve equipment for critical network nodes (eg the border router of the central office). VPN network topology – star or partial mesh.

Requirement for equipment redundancy: average

Solutions for large businesses, distributed network of branches. Such networks on a fairly large scale are difficult to deploy and support. The topology of such a network from the point of view of organizing VPN tunnels can be: star, partial mesh, full mesh (the diagram shows the full mesh option). Channel reservation is mandatory (more than 2 providers are possible), as is the reservation of equipment of critical network nodes. All or several channels are active. Networks of this level often use leased lines or VPN provided by providers. In such a network, it is necessary to provide maximum reliability and fault tolerance in order to minimize business downtime. Equipment for such networks is the flagship line of enterprise class or provider equipment.

Traffic transmitted through the tunnel – traffic of internal applications (mail, web, documents), voice traffic, video conferencing traffic.

Requirement for channel reservation: high

Equipment redundancy requirement: high

Educational institutions. It is typical for educational institutions to connect to a network management center. The traffic volume is most often not high. Reservation requirements are set in rare cases.

Medical institutions. For medical institutions, there is an acute issue of reliability and high fault tolerance of communication channels and equipment. All branches of a geographically distributed network use redundant channel-forming equipment and several providers.

Solutions for retail (chain of stores). Store chains are distinguished by their large number of locations (there can be thousands of stores) and relatively low traffic to the main office (data center). Reserving equipment in stores is most often not advisable. It is enough to reserve a connection to the provider (in the “second provider on hand” format). However, the requirements for the equipment located in the data center (head office) are high. Since this point terminates thousands of VPN tunnels. Constant monitoring of channels, reporting systems, compliance with security policies, etc. is required.

Implementation of distributed VPN networks and corporate data networks (CDNs)

Selecting the necessary equipment and correct implementation of the service is a complex task that requires high expertise from the contractor. The LanKey company has been carrying out complex projects for many years and has extensive experience in such projects.

Examples of some projects for the implementation of KSPD and VPN, implemented by LanKey

Customer Description of work performed

Equipment Manufacturer: Juniper
Solution: six remote branches of the company were connected to the main office using a star topology via secure communication channels.

Solution: we connected to the Internet and built VPN tunnels in offices located in Moscow and Geneva.

Equipment Manufacturer: Cisco
Solution: Remote offices are connected via a secure channel with fault tolerance across providers.