Why do we need a VPN server? A VPN (Virtual Private Network) server is a network server that allows users to create a secure and encrypted connection to another network over the internet. Here are some reasons why we need a VPN server:
First, we need a Virtual Machine to host the VPN server. For this demo, we will create a Virtual Machine instance on Google Cloud (follow this video to create a VM on Google Cloud step by step) and pick a region close to the location of your client machines. Here I chose us-west2:
Choose your OS for your server. For security and stability, I chose Ubuntu 20.04 Pro:
In a few seconds, your Ubuntu VM will be running. Now, SSH into the server through the “SSH” button on the right:
A SSH-in-browser will pop out like this:
Now, login as root:
sudo su
Update your OS:
apt-get update
Install pip:
apt-get install python3-pip
Install Shadowsocks
pip install shadowsocks
Create a configuration file for your Shadowsocks to configure the Shadowsocks server
vi /etc/shadowsocks.json
Add the following content to your config JSON file:
{
"server":"0.0.0.0",
"server_port":8000,
"local_port":1080,
"password":"Your_Password",
"timeout":600,
"method":"chacha20"
}
Start the server
ssserver -c /etc/shadowsocks.json -d start
If you want to stop the server
ssserver -c /etc/shadowsocks.json -d stop
If you want to re-start the server
ssserver -c /etc/shadowsocks.json -d restart
Now you successfully created a running Shadowsocks server on Google Cloud, you can connect to it through a Shadowscocks Client.
Download the Shadowsocks Client to your local machine.
From https://github.com/nojsja/shadowsocks-electron/releases/tag/v1.2.3, choose the version suitable for your personal computer. I downloaded the Mac version and then installed it.
After I successfully installed the client, I add the server in the Client UI:
The Server Address is the IP address of my server in Google Cloud. You can find the IP address in your GCP console. For more information about the Shadowsocks client, check out this github repo: https://github.com/nojsja/shadowsocks-electron.
Click “SAVE” and you are all set. Enjoy your own VPN!
You’ve recently installed VMware Workstation on your Ubuntu system and encountered the frustrating “Could not…
Have you ever found yourself staring at a terminal full of 404 errors while trying…
One particularly frustrating error that many users face when trying to upgrade from Ubuntu 18.04 …
In the world of containerization, time synchronization issues can create unexpected roadblocks when working with…
If you’ve recently upgraded to Ubuntu 23.04 or newer, you might have encountered a frustrating…
Canonical announces the General Availability of Ubuntu for the NVIDIA® Jetson Orin™ for edge AI…