blog.trnck.dev

Whitespace

+1 -1
+1 -1
_posts/2021-01-18-cloud-vpns.md
··· 15 15 16 16 Both of these problems can be addressed fairly easily with the help of a VPS and optionally a service like [Cloudflare](https://www.cloudflare.com/). The way you do this is fairly simple, you set up a VPN between the VPS and your local machine and forward a specific (or more) ports on the VPS to target the local computer. This is best done when both of these systems run Linux, I will specifically be using Ubuntu 20.04 LTS on both of my systems, but it will not be hard to change the config to work on any other version/distro. 17 17 18 - First things first prepare your VPS, this can be from a cloud provider ([Azure](http://), [GCP](https://cloud.google.com/), [AWS](https://aws.amazon.com/) or a VPS service like [DigitalOcean](https://www.digitalocean.com/), [Linode](https://www.linode.com/), and others. The other important thing to note is to make sure the port you want to forward is accessible through the firewall of the provider, this way your requests won't get blocked. A static IP is also a very useful thing in this scenario, but be aware this may cost you something, but not everywhere. After that make sure you can SSH into the VPS successfully and we shall begin with the process. 18 + First things first prepare your VPS, this can be from a cloud provider ([Azure](http://), [GCP](https://cloud.google.com/), [AWS](https://aws.amazon.com/) or a VPS service like [DigitalOcean](https://www.digitalocean.com/), [Linode](https://www.linode.com/), and others. The other important thing to note is to make sure the port you want to forward is accessible through the firewall of the provider, this way your requests won't get blocked. A static IP is also a very useful thing in this scenario, but be aware this may cost you something, but not everywhere. After that make sure you can SSH into the VPS successfully and we shall begin with the process. 19 19 20 20 First, we install [Zerotier](https://www.zerotier.com/) (you will need to have a Zerotier account for this), when you do, just make a new public network and take a note of the id. Paste the commands below in the terminal and change *mynetworkid* to your id. 21 21