How to Create a Simple VPN Server?
In this blog post, we’ll guide you through the simple process of creating your own VPN server using a Virtual Private Server (VPS) and OpenVPN. With just a few steps, you can enhance your online privacy and security by having your very own VPN.
TUTORIAL
How to create a simple VPN server?
This tutorial will use VPS and OpenVPN software to create a simple VPN server on Linux (Ubuntu 22.04) and access it from a Windows desktop.
How to Log in to a Linux VPS Server from a Windows Desktop
Termius is a free SSH client that is highly recommended as the most convenient and user-friendly way to manage your remote servers.
Select New Host.
Enter your VPS server IP
You are now ready to connect by entering your VPS password, and you should reach a point where the Linux Terminal is visible.
How to Install OpenVPN on a Linux Server (Ubuntu 22.04)
1) Run the following command to update and upgrade your server:
*You can paste the command into the Terminal using the shortcut Shift + Ctrl + V.
You have to enter “y” to accept continuing the process.
2) Run the following command to download the OpenVPN installation script:
3) Install OpenVPN by running the commands below:
Make sure to select your main server IP, UDP, and Google DNS during setup. Create your own Client Name, and you’ll be ready to go.
The successful output should state:“The client configuration is available in: /root/MyVPN.ovpn New clients can be added by running this script again.”
How to Download the OpenVPN File (MyVPN.ovpn) from Server to Windows Desktop
Termius is extremely helpful here, as you can connect via SFTP (Secure File Transfer Protocol) and drag and drop files directly from the server to your Windows desktop.
Alternatively, other SFTP software, such as WinSCP, FileZilla, CompleteFTP, etc., can also be used.
How to Run the .ovpn File on a Windows Desktop
You can download and install OpenVPN for Windows 10 and 11 from here: OpenVPN for Windows
After successful software installation, run the file MyVPN.ovpn and accept the VPN import.
How to Check if My Computer’s IP Has Changed
You can check your IP on websites such as WhatIsMyIPAddress or WhatIsMyIP.
To confirm that your computer’s IP has changed, you should see the VPS IP (the same one you used to connect to your VPS).
Useful Systemclt Commands for the Linux OpenVPN Server
What is a VPN used for?
A VPN (Virtual Private Network) server is widely used for privacy protection. In other words, it helps protect your identity by hiding your main IP address on the internet and using a server's IP address from a different country. This makes it more difficult for websites and advertisers to track your online activities.
Secondly, a VPN allows you to bypass geographical restrictions, especially when content or discount deals are only available in specific countries. For example, the price of airline tickets might differ for buyers in different geographical locations.
Important! A VPN is highly recommended for online activities, but it doesn’t mean that your home computer’s IP address cannot be traced. Governments and high-tech corporations can easily detect when you are using a VPN server to log in. It's strongly advised not to use a VPN for any illegal activities, as this could lead to serious consequences.