Quick setup your own VPN server and clients

Quick setup your own VPN server and clients

Today I will tell you how in a couple of minutes to deploy your own VPN server and connect to it from any of your devices.I’ve been using my VPN server, whatever it is, I make decisions about anonymity. That to me is freedom. Set up a virtual private network I based on OpenVPN. The operating system on the server I choose Ubuntu, because my favourite Linux Mint built from Ubuntu (full compatibility).
Previously, the setup was long and tedious, but there are good people who made this process automatic, so now to me it’s a must have.

So, now I step by step, with pictures, describe a quick instruction. For those who already have a server, proceed to step 2, enter the command, and rejoice.

1. Choose a server
You can purchase the VPS (Virtual Private Server) in any company, the main condition for virtualization, should be — KVM. If you offer OpenVZ — do not buy!
I have been using the services proven — DigitalOcean. by the way, this website MintGuide, hosted there. Next, I will show how the process of creating a VPS server from this company. 
You can choose one of three operating systems — Debian, Ubuntu and CentOS.
So, buy the cheapest fare, I chose Ubuntu for 5. $

Quick setup your own VPN server

Now choose where to put server (from which country will you go online and to get traffic). It is advisable to choose a country that is geographically near your. Then the ping will be much faster.

Quick setup your own VPN server

Call VPS as you like, this is just for you

Quick setup your own VPN server

So, now received a letter with the data to access VPS server

Quick setup your own VPN server

To log in to the server, use the program Putty SSH Client

sudo apt install putty -y
Enter the IP address of the server and click Open

Quick setup your own VPN server

Accept Rsa key and login via root username. Copy the password and paste it with the middle mouse button, press Enter and you will be taken to the command line of the server. Don’t forget to change the password on your own if your server, if will not be asked to change your password, do it yourself

Quick setup your own VPN server

2. Use OpenVPN paranoid script
Special paranoid people can download the script yourself, get acquainted with its content and only after start it; this is the right solution for all that swinging from the Internet.
You just need to copy one command and execute it on the server

cd /tmp; wget https://raw.githubusercontent.com/cryptopunks/openvpn_paranoid_installer/master/openvpn_paranoid_installer.sh --no-check-certificate -O openvpn_paranoid_installer.sh; bash openvpn_paranoid_installer.sh
The installer will request the IP on which to hang OpenVPN, which port to use (I advise you to put non-standard or 443, if it’s not busy https), which DNS server to use (provide a choice of several options), the required size of the key password (if required), and then prompted for the name of the first client with the config file and keys (their size and password) and begin to install the needed packages and generate the keys.

Quick setup your own VPN server

The question Use password (server) I say No, because I’m not comfortable every time i connect to the VPN enter the password. It is more easy connect automatically without my participation.

Quick setup your own VPN server
Quick setup your own VPN server
Quick setup your own VPN server

The installation and setup is finished!
If you want to add more clients, you simply need to run this script another time!
Now need to download configuration file from the server. For these purposes I use FileZilla

sudo apt install filezilla -y

Quick setup your own VPN server

Enter the IP address of the server, username (root) and your password. When you connect, just download *.ovpn file to your computer.

3. How to connect your computer and smartphone
I use Linux Mint Cinnamon. Fortunately I do not need to install any third-party programs to run the VPN. 
Open Network Connections => click Add => choose *.ovpn file. Further all intuitively is clear, just do as I have in the screenshots.

Quick setup your own VPN server
Quick setup your own VPN server
Quick setup your own VPN server
Quick setup your own VPN server

It is very convenient to make automatic connection when using a wired or wireless connection, in the screenshot I showed on the example of wired connection.

Quick setup your own VPN server
Quick setup your own VPN server

Now just connect and you will see padlock on your connection. By the way you can check your IP address in the browser.
Smartphone Android

Don’t forget to connect simultaneously to multiple devices, you must create a second config OVPN file

I use Android smartphone and I find it very easy to connect. Just download in Google play OpenVPN Connect, open the program, import *. opvn file and click Connect. Also look in settings, there’s a lot of Goodies.

Quick setup your own VPN server and clients
Quick setup your own VPN server and clients
Quick setup your own VPN server and clients
Quick setup your own VPN server and clients

Smartphone Iphone
My friend has an Iphone and he says that there is no OpenVPN client for that device. In order to connect the IPhone to your server, you can use IPsec VPN Server Auto Setup Scripts
Install it on your server (same as before, just one command)

cd /tmp; wget https://git.io/vpnsetup -O vpnsetup.sh && sudo sh vpnsetup.sh
Wait a couple of minutes. At the end copy the data for the connection and run the following command to service start
systemctl enable ipsec.service
In iPhone settings VPN it is necessary to choose method of connection — IPSec l2tp. Key, login and password, which is copied at the last screenshot. That’s it!
May the Force be with you,
Good Luck!!!

Share to friends
Rate author
( 2 assessment, average 5 from 5 )
Notify of
Inline Feedbacks
View all comments