Personal VPN in 3 minutes

Alex Ilies
5 min readApr 27, 2018

--

Setup a VPN usign your personal host.

Why?

If you search for VPN, you most likely want to secure your presence on the Internet, whether you have obvious reasons, or you are simply a simple Internet user. Whatever the reason — using a VPN is unavoidable, we immediately see why.

How many times have you used a public Wireless Network without any suspicion of risks or consequences?

Answer: Every time (most likely).
How small or how large is the risk of using a Public Wireless, depends on your actions that you made on the Internet while you were using that network. Such networks are most often vulnerable. There are dozens or hundreds of users who have direct access to that network, and the café, as a network owner, is usually not interested in network security. That’s why you do not want to lose your money on the card if you made an online purchase while you were connected to that network.

In addition to security and anonymity on the Internet, VPN gives you access to censored sites on your territory and other possible facilities of this kind.

How?

There are dozens of applications that offer VPN. The most obvious problems they have are price, the speed, anonymity, lack of control over your own traffic. The only service of this kind that I trust is TunellBear. I suggest to use it if the VPN is needed and the solution below isn’t feet you.

This service offers 500MB free, monthly and for unlimited traffic — the price is $10. We’ll see how we can get achieve a VPN with fewer resources.

! The solution below is for common users. It does not require knowledge in any field. It only requires the desire to protect yourself when using the Internet.

What we need:

- A DigitalOcean account
- A Droplet on DigitalOcean
- Set up the VPN on that Droplet.
- Configure your devices to use that VPN.

Let’s begin.

Create an account on DigitalOcean.

The most basic Droplet on DigitalOcean — costs us $5 / month. This has:

- RAM: 1GB
- Disk: 25GB SSD
- Transfer: 1TB
- CPU: 1 Core

What we are interested in here is the transfer capacity — 1 TB / month is often enough for an average user.

To receive 10 USD credit on registration, click here. It will give you 2 months of free access if you do not already have an account.

  1. Press on Create button.

2. Choose create new Droplet

3. Choose One-click apps

4. Choose the type

5. Select the resources

6. Choose the Droplet location

7. Chose a hostname

8. Access the console

9. After you changed the Droplet access password, write the next command in the console

CID=$(docker run -d — restart=always — privileged -p 1194:1194/udp -p 443:443/tcp jpetazzo/dockvpn)

You have to wait a little bit…. The console's output should look in this way:

10. Write the next terminal command:

docker run -t -i -p 8080:8080 — volumes-from $CID jpetazzo/dockvpn serveconfig

After execution, you should see in the console an IP address, something like:

0.0.0.0:8080 

11. Access this IP in your Browser.

When you will try to access this resource, normally the Browser should inform you that the resource isn’t secured. Just reject this message and download the file.

After download, rename the file to: vpn.ovpn.

12. Download the OpenVPN client for your platform, open the downloaded file using it and try to connect.

14. After a successful connection, test what is your address on whatismyipaddress.com. 😊

iOS VPN Client configuration.

  1. Install iOS OpenVPN client: OpenVPN Connect
  2. Open the application and introduce the Droplet IP address.

2. Open the .ovpn file using the OpenVPN application.

3. Install the certificate

4. Try to connect

Important

After you configure all your devices, go back to the Droplet console, and kill the last container which is running by pressing ctrl+c/cmd+c. Doing this, you will not be able to download the .ovpn file from this server. This is important in the case that any other knows your Droplet address.

How much does it cost?

You can use this approach on your own server(if you have one). Or, perhaps you already have such kind of resources which you already use. Just install Docker on it and follow the steps starting with the step number 9.

That’s it …

May the security be with you. 😋

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Alex Ilies
Alex Ilies

No responses yet

Write a response