The ultime guide to privacy on web: a free enterprise grade VPN
Tags: cloud, vpn, security, privacy
Published: 2020-10-30 15:18:21


### In the world we live in, internet providers share your private data with advertisers. Aren’t you tired of it?

![Photo by [Tim Mossholder](https://unsplash.com/@timmossholder?utm_source=medium&utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)](https://cdn-images-1.medium.com/max/13200/0*_UySq2QkM729KpiD)

*“What do they know about me? How are they able to do it?”* Well, it’s pretty simple, the majority of the information shared online _flows unencrypted_ between your device and your ISP servers, making them aware of whatever you do online.
> # ISPs use your information to track your habits, your tastes, your interests and dreams, and even your deepest fears.

**“Do they care about me?” Absolutely not.** They simply sell all this information to advertisers, the ones who actually care-enough to buy your attention. In addition, they block you from viewing some particular sites and this is just censorship 101.

**“So do I just need a VPN provider and all my dreams and secrets will be safe?”** Well… let’s think about it for a second.

When you connect your device to a VPN, you establish an encrypted tunnel between your device and that server. Nobody can see what’s happening in the middle of this tunnel, not even your ISP.

*“Ok, so I just need to buy a VPN subscription right? I just have so many now, one more won’t make a difference…”*

**A VPN subscription doesn’t make you magically anonymous.** You’re just moving the risk down the VPN tunnel as the VPN company can now see all your internet traffic. In fact, many of them sell your data to scammers and advertisers already. If this wasn’t enough they get constantly hacked.

So let’s recap a little bit,
>  Do you want to let your ISP share your private data with advertisers?
>  Sure not.
>  Do you want to pay your VPN provider to sell your private data to advertisers?
>  Hell no!
>  Then welcome to a quick and easy guide on how to build your own VPN on the world’s most secure enterprise cloud. For free.

Already some years ago Woz was recommending everybody to create their own VPN with a Raspberry Pi in their own home but, as I explained in one of my previous articles, for many reasons a Cloud Free Tier can be better than a Raspberry Pi, and in this case, it is just way better.

![Stephen Wozniak’s tweet in 2017. With Steve Jobs they founded Apple in 1976.](https://cdn-images-1.medium.com/max/3808/1*D5eAiIQLom_yxuCzF5MBLA.png)

Another good advantage of this approach is that you can choose the country from which your connection will appear by choosing the Datacenter in which you will create your resource.

## **So how do we do this?**

In this tutorial, we are gonna use Oracle Cloud Free Tier, which just gives the greatest amount of resources available for free without any expiration limit, in this way you’ll have your free VPN up and running for free forever.

So here below you can find Oracle’s footprint in the world. Be aware that Always-free resources will be available only in your home region, the one that you choose when you sign up for the account, and your connection will appear as if it is from this country so choose carefully! You will not be able to change it later.

![Oracle regions around the world. Feel free to chose the country from which your location will appear.](https://cdn-images-1.medium.com/max/5752/1*VQm4ogsJS4iEXECa29bdVw.png)

So if you haven’t done it already, sign up for a free account on [cloud.oracle.com](http://cloud.oracle.com)

## **Step 1: Create a Virtual Cloud Network**

Once you have your account set up, just connect from the Oracle’s cloud home page and you will find Oracle Cloud Infrastructure’s home page.

![](https://cdn-images-1.medium.com/max/4616/1*uFVHTAJYwnAOHmZLMYGcLQ.png)

We first need a VCN (Virtual Cloud Network) in which our server will be created in. So, from the hamburger-menu on the top left chose **Networking -> Virtual Cloud Networks** as shown in the image above.

Use the Start Wizard button to let Oracle help you in creating the VCN and everything will be fine, just follow the steps as shown below.

![](https://cdn-images-1.medium.com/max/2912/1*xqo9qubndTmswsSqWR_hWQ.png)

In the first page of the configuration you can choose a name and leave default compartment. To fill the Configure VCN and Subnet section I advise you to follow the default hints provided (or you can fill as shown in the image).

![](https://cdn-images-1.medium.com/max/5748/1*rFQgrpkWlnywkudhZQQKTQ.png)

![](https://cdn-images-1.medium.com/max/5724/1*SPaalcPMbF7cHPtAmMMYzg.png)

On the second page you can review the settings and just click create. It will take some seconds and after you will receive a confirmation message. If some errors arise you can first try to click the “Re-try” button otherwise revise the steps you made and make sure to follow the screenshots above.

## **Step 2: Let’s open some ports**

Before we move on to create our server, we just need to do some quick modifications to the Security List. Security List acts as a firewall to block unauthorised access to your resources so be careful and open only the ports you REALLY need. In this case we will just open the port 51820 that we will use later.

To do this, from the Hambuger Menu go to **Networking -> Virtual Cloud Networks** and click on the VCN you just created to see the details as shown below.

Then, on the left you will need to click on **Security Lists** section and click on **Default Security List.**

![](https://cdn-images-1.medium.com/max/3264/1*UtDiIFzyjAUV_Rx5Sein4A.png)

![](https://cdn-images-1.medium.com/max/3992/1*NUlfeQZsrG87VY_cif0ySA.png)

By clicking on the blue button **“Add Ingress Rules”** you will find a window similar to the one below and make sure to fill it in the exact same way so our VPN will have Internet connectivity otherwise you won’t be able to navigate once you connected to the VPN.

![](https://cdn-images-1.medium.com/max/2876/1*tvRR2aTkZdxIVs0jXwEVsw.png)

## **Step 3: It’s time to create the server — we will use a Linux VM**

From the same hamburger menu you used at step 1, let go to **Compute-> Instances** and create a virtual machine that will host our VPN as shown here below.

![](https://cdn-images-1.medium.com/max/5760/1*_kKiWUWL7k-3-6puWKDS8Q.png)

Feel free to choose you preferred name and the same compartment you chose in step 1 and make sure you use **Canonical Ubuntu 18.04** image as shown below. If this is not automatically selected, use the *“Change Image”* button to select the correct image.

Also, make sure you are using the **VM.Standard2.E2.1.Micro** shape that represents the only shaope available under the Always Free resources. This way the machine will always be free.

![](https://cdn-images-1.medium.com/max/3472/1*5vv0-9Orxw2mvJi2QUXE3g.png)

It’s time to select the VCN you created at Step1 and make sure to select the Public Subnet and to select “Assign a Public IP Address” option otherwise you won’t be able to connect to the server in the next step.

![](https://cdn-images-1.medium.com/max/3880/1*xtqLE5hqYm_7iCaO1O44uQ.png)

It’s now time to choose your own SSH Key or choose one automatically generated. As shown you need to upload the Public one that ends with .pub

I wrote an extensive article showing how to do this so feel free to read it if you have any issue.

![](https://cdn-images-1.medium.com/max/3848/1*t42D1Daua1LMoQ7s8myHIQ.png)

By clicking create, the instance will be provisioned and once it will be ready you will see something like this, in which you will find the public-ip address in the upper right quadrant under **“Instance Access”**, the thing you will need to move forward to Step 4.

![](https://cdn-images-1.medium.com/max/5688/1*zvxhOH144m3wdtd8IKeUiw.png)

## **Step 4: Connect to the server and install the VPN software**

Ok, we created a machine and we need to connect to it. You can find endless of guides and tutorial that will show you how to connect to one. As I mentioned I already wrote one on how to connect to it from a Windows machine so now I will show you how to do it from a Mac/Linux terminal.

The command you need to use is shown below.

![](https://cdn-images-1.medium.com/max/3624/1*I58Oaeaebxd9s_BFeYUWoA.png)

The software we will use is called PiVPN, it is open source and very famous. It was meant at the beginning as a lightweight distribution to use on your Raspberry Pi but it turn out to be great on cloud machines as well.

It packs to different VPN software versions, WireGuard (preferred) and OpenVPN. They both work great but WireGuard is more gently on mobile device battery and I chose this one.

To start the installation just type the following command taken directly from PiVPN’s website.

![[https://www.pivpn.io](https://www.pivpn.io)](https://cdn-images-1.medium.com/max/3004/1*hEthg9wiUj-CfcLkuCS6oA.png)

After you hit enter, you will see the following message that will start the installation. Feel free to follow the subsequent steps.

**NOTE**: To change the default options, move with the Tab key and select the option using the Spacebar key.

![](https://cdn-images-1.medium.com/max/2780/1*y8u83A_4V-L0P_9q30DQXg.png)

![](https://cdn-images-1.medium.com/max/2700/1*Sow-N9RlXxCqlfeODxYExA.png)

![](https://cdn-images-1.medium.com/max/2728/1*jBkdpgXTSggJodD0NMog1w.png)

![](https://cdn-images-1.medium.com/max/2696/1*E8xdacOldrDIUFWAQhwWmA.png)

![Remember at step 2 we opened the port? Make sure is the same one!](https://cdn-images-1.medium.com/max/2644/1*ujRU0svBQw4D2E5L0d35yw.png)

![](https://cdn-images-1.medium.com/max/2824/1*IXUF66F0ITI_rn45_8TjgA.png)

The next step is really important, because you will need to choose your DNS provider, there are many options and you can search the one that suits you best but in most cases CloudFlare will be the best one.

![](https://cdn-images-1.medium.com/max/2664/1*TwkqAUrBg58C0b5JZiKvYA.png)

![](https://cdn-images-1.medium.com/max/2756/1*krg3WbBhUGfZwQ9bgCtAqw.png)

![](https://cdn-images-1.medium.com/max/2660/1*KUGmd4tpruuQ6UzjUJ4zJg.png)

![](https://cdn-images-1.medium.com/max/2664/1*ixBJUiOUJL8IDdCYUpamoA.png)

![](https://cdn-images-1.medium.com/max/2720/1*_o4BhBeNn8OXgjLfdAI09g.png)

After the reboot is complete (it will take some minutes) reconnect to it and run as advised the **“pivpn add”** command to create a certificate for the VPN connection.

By default the certificate will be created in the ~/config/ folder with the name you chose and the .conf extension.

You now need to bring this certificate to the device you want to connect with, so to copy the file to your current machine use the following command. In my case the certificate will appear on my Desktop.

![](https://cdn-images-1.medium.com/max/5760/1*KSwcGxTMSOY3piOKp3q-jA.png)

## **Step 5: Connect to the VPN and safely browse the web!**

Now it’s time you connect to the VPN and start browsing safely.

You just need to download WireGuard client on your device and load the certificate you just downloaded. If you are using a Mac you will find a screenshot similar to the one below so you just need to click the Import button and that’s it!

![](https://cdn-images-1.medium.com/max/3168/1*x6U8zp_OAfk6Gax1x9SOJQ.png)

## Final Thoughts

There are many options out there on how to build your own VPN, I chose Oracle Cloud because it offers you the greatest amount of free resources without any time expirations and it is the most secure cloud out there.

PiVPN has been chosen for many reasons, it is very easy to install and it can be configured easily with PiHole to get a Free VPN that also blocks annoying ads and lets you save data as well.

Stay tuned for the next article on how to configure PiHole on PiVPN and get a Network-level Ads blocker that allows you to block ads also in non-traditional places such as mobile apps and smart TVs.

## Resources

[5 Reason why Oracle Cloud free tier is better than your Raspberry Pi](https://medium.com/@roberto.di.bella/5-reasons-why-oracle-free-tier-is-better-than-your-raspberry-pie-277ac8cb37e3)

[Oracle Cloud Free Tier Signup](http://bit.ly/34OMntg)

[PiVPN](https://www.pivpn.io)

[PiHole](https://pi-hole.net)