# How To Configure IPSec On Windows | Start VPN Tunnel

**URL:** <https://onehack.st/t/how-to-configure-ipsec-on-windows-start-vpn-tunnel/91043>\
**Category:** Tutorials & Methods\
**Tags:** privacy, cracking, windows\
**Created:** [June 9, 2020, 1:32pm UTC](https://onehack.st/t/how-to-configure-ipsec-on-windows-start-vpn-tunnel/91043 "2020-06-09T13:32:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoBody](https://onehack.st/user_avatar/onehack.st/nobody/32/163880_2.png) [@NoBody](https://onehack.st/u/NoBody)\
**Post date:** [June 9, 2020, 1:32pm UTC](https://onehack.st/t/how-to-configure-ipsec-on-windows-start-vpn-tunnel/91043/1 "2020-06-09T13:32:09Z")

</div>

There are many applications which will implement authentication and encryption of network traffic through a separate third party program.

However, the Microsoft operating system can also implement this natively through the configuration of IPSEC. In this article we will look at what IPSEC is and a simple example of implementation.

## What is IPSEC?

Internet Protocol Security, or IPSEC is a protocol used to authenticate and encrypt IP communications. This is accomplished through mutual authentication between agents as well as the exchange of cryptographic keys at the beginning of a session.

 ![image](https://onehack.st/uploads/default/original/3X/c/2/c26d0b141c7838fe8f06efe9eed45b028eed0aa3.jpeg)

IPSEC will also allow the addition of IP restrictions and TCP/UDP level encryption to applications which might not otherwise support it. IPSEC utilizes IP Protocol 50 (ESP), IP Protocol 51 (AH), and UDP Port 500.

## Implementing IPSEC

In this example, we will set up IPSEC to encrypt communications between two windows machines. The first machine, a windows 2012 server will act as the VPN server.

The second machine, a Windows 10 client, will act as the VPN client. A LT2P IPSEC VPN can exchange either a pre-shared key or a certificate. In this example, we will exchange a pre-shared key.

## Setting up the VPN Server

On the Windows 2012 machine, we will need to install the routing and remote access features. To do so, go in to the Server manager, and **Add Roles and Features**. Choose a **role based or feature based installation**. Select the local server. Choose to install the following server roles.

**Network Policy and Access Services**

```
        Network Policy Server

```

**Remote Access**

```
        Direct Access and VPN (RAS)

        Routing

```

 ![image](https://onehack.st/uploads/default/original/3X/5/a/5a91dfa8ba469d0f06b1f240c2c8e84676e994c5.jpeg)

Once these new features are installed, you will require a snap in to manage them. Open mmc.exe as an administrator. Go to **File** | **Add/Remove Snap In**. Add the **routing and remote access** snap in.

This snap in allows the configuration of multi-protocol LAN-to-LAN, LAN-to-WAN, virtual private network (VPN), and network address translation (NAT) routing services.

In the mmc console, right click on routing and remote access and choose to add server. Choose the local machine. Next, right click on the newly created machine and choose **Configure and Enable Routing and Remote Access**. Choose the **Remote Access** **(Dial Up or VPN).**

Then check the VPN option **.** You must have at least two network cards for this to work. One of them can be a loopback. Specify a range of addresses to be provided for the incoming connection. Make sure they do not conflict with any other addresses allocated on your existing network. In this example, we will not be using a radius server.

 ![image](https://onehack.st/uploads/default/original/3X/b/3/b3a66026f184bced2d6d749dc775cd3620e8b5aa.jpeg)

Next, attempt to start the routing and remote access service. The following registry key may need to be deleted to start the service.

```auto
**HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteAccess\RouterManagers\Ipv6**

```

In the mmc.exe console, right click on the computer name and go to **Properties**. Modify those properties on the security tab.

 ![image](https://onehack.st/uploads/default/original/3X/f/b/fbade277c3bb0c8f867d81cac8a3fb28bc7ac3b0.jpeg)

Choose the authentication methods as shown below.

 ![image](https://onehack.st/uploads/default/original/3X/7/8/7812fd8c47c5d3d19e4e2f53e0633266855202ee.png)

Check the box to allow custom IPSEC policy for L2TP/IKEv2 connection. Add a pre-shared key.

Finally, you will need to modify a user to be allowed to access the VPN. Open **compmgmt.msc** , go to **Local Users and Groups** , and hit **properties** on the user that you wish to utilize for the VPN.

Go to the **Dial Up** tab. Choose **Allow Access** and hit **Apply**. A reboot will be required on your machine. After the reboot, you will be ready to test your first client.

## Setting up the Windows 10 machine

On the Windows 10 machine, open **Network and Internet Settings**. Choose **VPN** from the left panel and add a VPN connection. Edit the **advanced options**.

Place the IP address of your VPN server under server name or address. Choose the **L2TP/IPSEC with pre-shared key** option under VPN type. Add in the pre-shared key and username and password.

The security properties for the VPN will need to be modified under the network adapter. On the VPN adapter, choose properties, and go to the **Security** tab. Check the **EAP** radio button and choose **Microsoft: Secured password (EAP-MSCHAPv2)(encryption enabled)**.

 ![image](https://onehack.st/uploads/default/original/3X/9/e/9ec0c856cda1e6fcd1b3c524a7ec6f56f98e7448.png)

Finally, right click the adapter again to connect. Congratulations! You have created an IPSEC VPN tunnel.

 ![IPSEC6](https://onehack.st/uploads/default/original/3X/d/8/d8cb460df6e719a7e90fd7803888d59a82ef4a15.jpeg)

**That’s all. enjoy!**

_Source: thebackroomtech_

---

<div class="post-metadata">

**Author:** ![jmpinto](https://onehack.st/user_avatar/onehack.st/jmpinto/32/26546_2.png) [@jmpinto](https://onehack.st/u/jmpinto)\
**Post date:** [June 9, 2020, 3:52pm UTC](https://onehack.st/t/how-to-configure-ipsec-on-windows-start-vpn-tunnel/91043/2 "2020-06-09T15:52:57Z")

</div>

Hi,  
First of all thank you  
I like to learn about security, and this is something that I would like to see, but as I only have a single notebook with windows 10 I think that I will need others informations to see how I can use IPSEC.  
So I found something to start and maybe will be good for others.

> **[Windows 10 IPSec IKEv2 Setup Guide](https://www.ivpn.net/setup/windows-10-ipsec-with-ikev2/)**
>
> IPSec with IKEv2 setup guide for Windows 10 This guide will help you set up an IPSec connection using IKEv2
> Open the Control panel by clicking the start menu icon and typing control
> Click Network and Internet followed by Network and Sharing Centre

---

<div class="post-metadata">

**Author:** ![Abd\_Shk](https://onehack.st/user_avatar/onehack.st/abd_shk/32/25814_2.png) [@Abd\_Shk](https://onehack.st/u/Abd_Shk)\
**Post date:** [June 9, 2020, 8:27pm UTC](https://onehack.st/t/how-to-configure-ipsec-on-windows-start-vpn-tunnel/91043/3 "2020-06-09T20:27:35Z")

</div>

[https://www.vpngate.net/en/howto\_l2tp.aspx#windows](https://www.vpngate.net/en/howto_l2tp.aspx#windows)
