Tutorial

How To Configure your own Secure VPN with OpenVPN

Introduce a new level of security to your internet precense, and gain high-speed private VPN access by creating your own Virtual Private Network.

Share this

Setting up a VPN on your own Virtual Private Server adds an extra layer of security to your online presence. Alongside providing blazing fast speeds for browsing, gaming, and more, this tutorial aims to guide you through a straightforward setup process for your own secure VPN.

We'll be utilizing OpenVPN to configure our VPN. OpenVPN stands as an open-source Virtual Private Network (VPN) project that establishes secure connections over the Internet.

The benefits of using a VPN are numerous. If you're fed up with the steep prices of various providers, setting up your own network offers a more cost-efficent solution! Nonetheless, many VPN providers boast excellent security if you prefer the simpler route.

1. Download Prequisities - There are a few things we need to download that will be utilized later in the setup.

1a. OpenVPN Connect - MobaXterm will be used to SSH into our VPS server and run commands. (Windows users only)
1b. MobaXterm - OpenVPN connect will be used to connect to your VPN config file.

2. VPS Server - For a high speed and secure connection with unmetered bandwith, we'll be using a Virtual Private Server (VPS) from black.host.

2a. Go to black.host and navigate to "VPS Hosting".

2b. Pick your plan, we'll be using a UNM Core.

2c. Create a hostname for your VPS (ex. ipspy-vpn).

2d. Choose a location nearest to you for best connectivity.

2e. Choose the operating system Ubuntu 20.04 or higher.

2f. For control panel choose "none".

3. Logging into VPS Server - We will use MobaXterm to SSH into our server, using the credentials sent to your email by black.host.

3a. Check your email to find the Virtual Private Server (VPS) credentials sent by black.host

3b. Open MobaXterm and choose "Session" then "SSH"

3c. In the hostname field, refer to the email containing your server credentials and input the "Main IP Address".

3d. Make sure the port is "22" and continue.

3e. It will prompt a login, in which you will login as: root and refer to the "Root Password" from your email to finish connecting.

3f. MobaXterm will prompt you to create a master password, this will be used to encrypt your server credentials.

4. Configuring the VPN - We will download and run the openvpn-install.sh script on your VPS for a quick configuration.

4a. Download openvpn-install.sh

$ curl -O https://raw.githubusercontent.com/
angristan/openvpn-install/master/openvpn-install.sh
$ chmod +x openvpn-install.sh

4b. Run the openvpn-install.sh script

$ ./openvpn-install.sh

4c. Now the script will prompt us with questions to configure, starting with IP Address. This is the "Main IP address" of your server, and should be answered by default. Press Enter.

4d. Now you can decide to enable IPv6 support, we are disabling IPv6 by inputting "n". Press Enter.

4e. We will be using the default OpenVPN port, 1194. Type "1" and Press Enter.

4f. We will be using UDP for better VPN speeds. Type "1" and Press Enter.

4g. We will be using AdGuard DNS to limit advertisements and trackers. Type "11" and Press Enter.

4h. We will not be using compression. Type "n" and Press Enter.

4i. OpenVPN using AES-256-GCM encryption by default, and we will not be customizing the encryption settings. Type "n" and Press Enter.

5. Creating the configuration file - We will create a user and their configuration file for connecting

5a. Create a client name, ours will be "ipspy".

5b. If you'd like to add a password do it here, otherwise type "1" and Press Enter.

6. Connecting to the VPN - We will use OpenVPN connect to connect to your newly created configuration file.

6a. Press the green refresh button in the directory of your servers MobaXterm SSH terminal. You should see your newly created configuration file with the clients name you created and .ovpn. Drag that file to your Desktop.

6b. Startup OpenVPN connect and navigate to the "Upload File" tab.

6c. Upload the .ovpn file you downloaded from your server into OpenVPN and press Connect!

Just like that you've introduced a new level of security to your internet precense! Now you can do some high-speed secure browsing, gaming, and more!

Read next

The Role of a VPN in Ensuring Your Privacy Online

Preserving your online privacy is important. Discover how VPNs serve as a shield against intrusive tracking, targeted advertisements...

ipSpy.io Apr 12 · 5 min read

Debunking Common VPN Myths and Truths

ipSpy.io in VPN
Apr 12 · 5 min read

Join our community! We love hearing from you.