📜 ⬆️ ⬇️

Implement an L2TP / IPsec VPN server using standard Windows 7/8 tools for connecting Windows / iOS / Android systems to an internal network

Recently, I was puzzled by the search for the possibility of creating an encrypted connection to my office using the L2TP / IPsec protocol. The task became more complicated when, apart from Windows clients, there was a need to launch more iOS and Android clients into the network. There are many articles on the Internet on how to do this on a Windows server with an “external” IP address. But I want to offer the community a standard implementation of the Windows 7/8 encrypted L2TP tunnel in the local network with a popular, in my opinion, topology.

Network structure

A small network of ten Windows 7/8 clients with a dedicated server based on Windows Server 2008 Std (we don’t pay attention to it yet) and with access to the Internet using a simple router. For the VPN server, I selected one of the machines on Windows 7 Pro. Next will be described two ways to raise the L2TP / IPsec server on Windows 7 Pro.

Windows 7 L2TP / IPsec AES 128-bit using certificate



Creating a client connection for this method


The results of this method

For Windows clients, this is a good way to implement L2TP / IPsec, but when it comes to iOS clients, the task expands. The problem is that iOS can connect via L2TP only with encryption using a Pre-prepared Key Phrase (Preshared Key), and the certificate can connect only to Cisco VPN. The second way will tell how to solve this problem.

Windows 7 L2TP / IPsec Preshared Key with ESP 3DES encryption and integrity control



Creating a client connection for this method


VPN server access


On the router, I used the service Dynamic DNS, because external ip dynamic. To be able to connect, it is necessary to do port forwarding (Port Forwarding) for UDP ports 1701 UDP 4500 UDP 500 to our VPN server. We got to the finish stage, where another big problem awaits us. The fact is that Windows 7/8 has a limit on the maximum number of connections for remote access, and it is equal to 1. There is no such restriction on Windows Server. Here the phrase “suggests why did you write all this here ?!” There are two ways to solve it. First: one good person did some big work and wrote a patch that removes the restriction for Windows 7 Pro SP1. Here the process of finding a solution is described in detail and a patch is present. Second: use Windows Server. But to use not in the way described in most articles, where it is said about assigning the Role “Routing and Remote Access” to the server and using special snap-ins in which the devil breaks his leg, but use the method described above. It works fine on Windows Server without assigning special roles and without restrictions on the number of connections.
')
Recycled material:

Source: https://habr.com/ru/post/210410/


All Articles