Blog Logo

Create Your Own VPN to Any Country for the Cheapest Price

VPNs are the order of the day and everyone knows them

VPNs are the order of the day and everyone knows them, so much so that the IPs offered by providers are very well known since everyone uses them, and many times you try to use a VPN for a country, and the page where you want to enter detects it quickly.

Well that’s over. I’m going to reveal the trick that we software engineers use to have a secure, hard-to-detect VPN that is much cheaper than any VPN on the market. There is even a way to have it for free, but I will explain that later.

So without further ado, in today’s video I’m going to teach you how to create your own VPN using a VPS for the country you want. Stay in the video, I’m sure you’ll be interested!


What is a VPN really?

First of all, to understand this well, I am going to explain what a VPN really is.

Actually, in very basic words, what a VPN is, is a server in a country to which you connect and make your traffic go out through that server, that’s why web pages think you are in another country, because that traffic has to pass through that server.

The case, as I said, sometimes poses a problem, since those servers that the best-known VPN providers have are already flagged, since they share the same IPs for many clients, that’s why in today’s tutorial we are going to use a VPS.

And Edu what is a VPS? Well basically a server, a server in the country we want, which we are going to buy and on which we are going to configure this VPN connection, and I assure you that it is very simple, the technical knowledge is minimal.


VPS Providers: Options for all budgets

The first thing to do is look for a VPS provider, there are many, many, and no, I don’t collaborate with any unfortunately, but I have compiled a few, here goes each one with its price.

One thing I want to tell you is that the power here doesn’t matter much, since it hardly needs resources, so we will always look for the cheapest server.

Kamatera - For 4 dollars a month we have a server in Asia, Australia, Europe, the Middle East or America.

VPS Server - We have the same price 4 dollars a month.

Hetzner - We have it for €3.79 (this is one of my favorites).

IONOS - And the best offer I have seen is from IONOS, and I insist they do not sponsor me (although if you want you can sponsor me eh), where we have servers for €1 a month! One euro gentlemen, there is no VPN that offers you that.

Here you can select Spain, Europe, United States, Germany or United Kingdom.

And although it has a registration fee of €10, if you choose the annual payment it does not have that fee, it would still stay at €1.

If you are lazy and want to cancel whatever month without having taken 1 year, then you choose the next one of €3 per month and that’s it.

The FREE option

BUT if none of this convinces you and you don’t want to spend even €1, calm down, there is a free alternative, and there is a way to have a free VPS, without paying anything, but you have to follow a series of steps that I explain in this video here, and I assure you it works and they are also powerful servers with 24GB of RAM and 4 cores, which you can use for many more things.

The only thing I want you to keep in mind is that you can only do it once, so choose the country well because being free it has the limitation of not being able to change the country.

And all this that I show you is without permanence, the month you are no longer interested you cancel it and move on, and compared to VPN prices (which don’t sponsor me either ahem) the month can cost you up to €10 if you want it with monthly payment instead of annual…


Creating our server: Step-by-step tutorial

Seen the advantages and knowing the possibilities you have, let’s get into the details!

In my case, of all the options I told you, I am going to work with Hetzner, because for the tutorial it is the platform that seems most intuitive to me and gives me many freedoms.

Initial VPS configuration

With my account created I am going to create my server, and here it lets me choose countries. I’m going to put Germany for example, you can put whatever you want, and I’m always going to choose the most basic server option, as I told you before.

Important to select Ubuntu

And in SSH key we are going to create our SSH key to connect to the server later.

Generating SSH keys

Here each provider does it differently, some make you download it, others like Hetzner upload it, whatever it is we need that key to be able to connect, so it is super important that you do it.

To generate the key we open a terminal (which by the way I use this cool terminal here, called Warp, which if you are interested I leave link in the description):

ssh-keygen -t ed25519 -C "your-email@gmail.com"

We copy the public key and paste it in Hetzner. We create the server.

And now in a terminal we connect via SSH inside the server to be able to configure it:

ssh -i ssh_key root@91.98.137.221

Tailscale: The tool that makes everything easy

Now I am going to explain what we are going to use. We are going to use Tailscale.

Tailscale is a mesh VPN service that helps us create our own VPN network between different devices. It allows two devices from two different wifis to be easily connected. Something similar to what we did in this video, but instead of doing it ourselves by hand it is done super fast in a very very easy way and on top of that free if we only have 3 users and up to 100 devices.

It is difficult to exceed 100 devices, so let’s get to it!

Installation of Tailscale

To install this on our server, now that we are connected, it is very simple, with a single command we have it ready:

curl -fsSL https://tailscale.com/install.sh | sh

Server configuration

Once installed we have to enable IPv4 and in case you want to use it with IPv6 too.

This is done with these commands:

# Enable IPv4
echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

# Enable IPv6 (optional)
echo "net.ipv6.conf.all.forwarding = 1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Now we start it with:

sudo tailscale up --advertise-exit-node

And here a link appears to log in, we enter and create an account, and ready the device is added.


Final configuration: Connecting our devices

Now what remains is very simple, we already have our server configured, we only have to download Tailscale on the device we want to use it.

On mobile, on PC wherever it can be downloaded.

Once downloaded we miss one step, it is already started, but we want our IP to go out through the server node, for this we have to enable it on the Tailscale website.

Enabling the Exit Node

We enter our server, and in Exit Node we give Allow.

Now in Tailscale if we go to Exit Nodes we can select our server.

And if you notice, if we go to pages to see our IP, now the server IP appears!

We already have our home VPN!


Conclusion: Undetectable VPN at the price you want

As you can see the steps are very simple to follow, and as soon as you do this you will have your undetectable VPN in the country you want.

The advantages are clear:

  • Much cheaper than any commercial VPN
  • Hard to detect because you use your own IP
  • No bandwidth limits
  • Total flexibility to choose the country
  • No permanence - cancel whenever you want

I hope you have been able to follow the tutorial perfectly and that you have no problems. For my part this has been all, I appreciate a like, that you subscribe and that you leave me in comments if it has worked for you.

See you in the next post!


O que você achou?

Deixe sua opinião, pergunta ou sugestão. Os comentários são sincronizados com GitHub Discussions .

Voltar ao blog