Here’s how you can host your own VPN for 3.5$ a month

Internet censorship and whitelist IP

Here’s how you can host your own VPN for 3.5$ a month

Internet censorship and whitelist IP

I live in Viet Nam where medium is banned. The thing is, medium is not a bad platform, we just had some political issues with some posts here.

As a developer, i usually access medium to learn stuff and read about new technology. Moreover, it’s a big platform where i can share my knowledge and build my reputation, i don’t want to lose access to the site.

Basically, the ISP (Internet service provider) here just don’t allow us to resolve the DNS for medium.com. We could easily change the DNS resolver to Google’s DNS server (8.8.8.8) instead of using the ISP default DNS server to access to the site.

But, doing so is a tedious process, if i want to access medium from my phone, i will need to find a way to change the DNS server, too. If some site intentionally restrict Viet Nam’s ip, changing DNS server is useless.

From all of the above, i need to find a solution to fit all my needs.

AWS LightSail to the rescue.

AWS LightSail is a small VPS with a affordable price, we can use the cheapest option that they offer with only 3.5$/month. Additionally, it also has a static IP address and it’s always online.

We can SSH to the server, install WireGuard VPN on the server and setup the client on my machine to connect to the server.

In my case, i create a LightSail instance in Singapore. First, it could bypass the internet censorship in my country. Second, it’s near my country, the latency could be tolerable here. I don’t want to connect to some country in the other side of the globe in this case obviously.

There are many links on Google about configuring WireGuard, i followed the one from Digital Ocean here.

In order to make it work, we will also need to enable Firewall for the instance via LightSail instance’s network setting

You don’t need to allow all port here, just enable the port your WireGuard server listens on.

Once everything is set up. We can add our device’s public key to the server and enable WireGuard when we need to use the VPN.