Setting up your own VPN L2TP/IPsec server in a few minutes

172
views

Still searching for a secure VPN? Then try L2TP/IPsec! In this article we will thoroughly tell you how to set up L2TP/IPsec on your server.

Read also:

  • Espionage for Android and iOS
  • Learn someone else’s IP
  • How to hack a Wi-Fi network and protect it
  • Creating a SOCKS5 server
  • Creating a VPN:
  • Streisand
  • Softether VPN
  • Algo VPN
  • OpenVPN
  • PPTP
  • L2TP / IPsec
  • Route all the traffic through TOR
  • Turning Chrome into Tor

Creating VPN L2TP/IPsec server

As servers are provided by hosting providers, you need first to sign up for them to know who they are dealing with.

Signing up at hosting provider

The DigitalOcean provider is the most stable and efficient and has the most favourable tariffs. Click the link (get 10$ for free)  and sign up:

  • Enter your email address
  • Create and enter a passwordSetting up your own VPN L2TP/IPsec server
  • Click Create an Account

  • Get into your email account and complete registration by clicking a link in the confirmation emailSetting up your own VPN L2TP/IPsec server

The registration is completed. The next step is adding a bank card.

Adding a debit/credit card

After registration you have to enter payment information. You need to have a debit/credit card which is accepted for online payments.Setting up your own VPN L2TP/IPsec server

Use English while entering the data.

Then, we move on to the third step – choosing and creating a server.

Creating a personal server

Let’s get down to how to create a personal server (you can also create a website or personal cloud drive like Yandex disk or DropBox on this server). The DigitalOcean provider calls them Droplet.

Click Create Droplet and then you will be redirected to the page for creating server configurations:

  • In Choose an image section choose the Ubuntu distribution (16.04×64 recommended)
  • Choose a tariff of 5$ per month or 0,007 cents per hour

    Setting up your own VPN L2TP/IPsec server

  • Choose a datacenter region, which in the future will emulate your location (if you select the US city, the IP will be American). Moreover, it should be noted that the closer to the server you are, the faster you will load pages and files

    Setting up your own VPN L2TP/IPsec server

  • At the end click CREATE to create Droplet (a server)

    Setting up your own VPN L2TP/IPsec server

    Creating takes 2-5 minutes. Then you will receive an email with the server’s IP address, login (usually root), and a password.

    You can also learn IP on the main Droplet control page.

Setting up your own VPN L2TP/IPsec server

Let’s move on to creating from a regular server in the VPN.

Creating a VPN server

Further we will tell how to connect to the server and what packages need to be installed to make it work!

Connecting to the server

In order to somehow manage the server (command line), you need a tool. In our case it’s the PuTTY utility, which you need to download and install.

After installation, run PuTTY, specify the IP address and click OPEN.

Setting up your own VPN L2TP/IPsec server

  1. Then you need to enter your login (root)
  2. You are required to change the received password immediatelySetting up your own VPN L2TP/IPsec server

    ATTENTION! WHILE ENTERING THE PASSWORD, THE LINE REMAINS EMPTY AS IF YOU ENTER NOTHING

    • password – “old”, current password
    • (Curent) UNIX password – confirm password
    • Enter new UNIX password – enter a new password
    • Retype new Unix password – confirm a new password

Configuring VPN L2TP/IPsec server

Update the Ubuntu server software:

sudo apt-get update && sudo apt-get upgrade -y

Download and set up L2TP/IPsec on the server:

wget https://git.io/vpnsetup -O vpnsetup.sh && sudo sh vpnsetup.sh

Download and set up L2TP/IPsec on the server:

IPsec VPN server is now ready for use!

Connect to your new VPN with these details:

Server IP: 167.99.135.217
IPsec PSK: HTnSr943UuCRGcWM
Username: vpnuser
Password: EEH6V3RAPrhzokDC

Write these down. You'll need them to connect!

Important notes:   https://git.io/vpnnotes
Setup VPN clients: https://git.io/vpnclients

Checking/configuring:Создание своего сервера VPN L2TP/IPsec

Any questions left? Post them in comments and tell whether you’ve succeed or failed.

That’s it! More useful articles and instructions can be found in the articles section and Linux Hacks. Stay with the Android + 1! It will be even more interesting!