Unlocking Secure Connections: A Guide to Setting Up Your Own Private VPN for FREE[Pt.1]
A Virtual Private Network (VPN) serves as a secure tunnel between your device and the internet, encrypting your online data and protecting your privacy from prying eyes. By routing your internet traffic through remote servers located across the globe, VPNs cloak your IP address and location, allowing you to browse the web anonymously and access Geo-restricted content.
In this guide we are gonna set up a simple VPN server in AWS using Wireguard.
Step 1: Prerequisite
- AWS Account
- That’s it
Step 2: Setting Up AWS
- Go to EC2 and select the region for VPN
- Then Launch instance
- Give a name, Select Latest Ubuntu, Instance type — free tier
- Create a key
- In Network Settings, Click on Edit [top right]
- Change Security Group name
- Add security group rule
- Now Launch Instance
- SSH into the Instance
ssh -i VPN-Key.pem ubuntu@<Instance Public IP>
- Adding User [Optional]
sudo adduser vpn
sudo usermod -aG sudo vpn
sudo hostnamectl set-hostname wireguard
sudo reboot
- SSH again
ssh -i VPN-Key.pem ubuntu@<Your Instance IP>
su vpn
cd
sudo apt update
sudo apt upgrade
- We’re good to go
Step 3: Install and Config - Server
git clone https://github.com/angristan/wireguard-install.git
cd wireguard-install
chmod +x wireguard-install.sh
sudo ./wireguard-install.sh
- Copy your Instance Public IP and Paste it here
- Rest, can leave as default
- Provide a Client Name
- Now copy open, mentioned file and copy it👇
nano /home/vpn/wg0-client-Win1.conf
- Now paste that in your Computer and Save as Name.conf
For Linux :
nano Win1.conf
- Paste it, Then Ctrl+X
- Click Y, Then Enter to Save
For Windows :
- Open Notepad
- Paste the content and save as Name.conf
Step 4: Install & Config - Client
For Linux :
sudo apt install wireguard
sudo apt install resolvconf
For Windows :
- Download and Install Wireguard-Client
Step 5: It’s VPN time
For Linux :
- Enter the directory which contains the conf file
- Then to start VPN,
sudo wg-quick up ./Win1.conf
For Windows :
- Open Wireguard and Load the Conf file
- And Activate
Your now Connected via your own VPN.
You can use this for Accessing Geo-restricted contents and more. Here, we demonstrated the setup using Wireguard, but there are others as well. Like OpenVPN. You can do research and get on with one you are comfortable with. Thank you
And By the Way, In Part 2, we’ll be covering Much more secured and advanced VPN setup with option to switch regions. See you then. Bye