Cloud
With our Cloud solution, you can install OpenVPN on a server from out of the box the following way:
Go to Cloud –> Marketplace, find the OpenVPN template and click on it. After that, you’ll be able to choose which type of server you’d like to create: Virtual or Baremetal Instance.
Another way is to choose the template from under the creation page of your server. Go to Cloud – Virtual Instances/Bare Metal, start creating the machine, under Image go to Marketplace and choose the OpenVPN template.
Once you finish the creation of your server, you will have the template pre-installed on it. All you need to do is go to http://ip, download the .ovpn file and import it into your openvpn client.
Hosting
Our Hosting machines do not come with pre-installed app templates, so you would have to configure the VPN yourself. Let’s look at how you can install OpenVPN on your VPS with Ubuntu 22.04 as an example.
First, make sure you run apt update&apt upgrade before we do anything.
There are two ways on how we can do it: install OpenVPN and dependencies from the scratch, or we can use a script. In our example, we're going to use the script (https://github.com/angristan/openvpn-install). We've checked the code and can confirm that it's safe to use, you can read the code itself and about the script on the link above.
Now, we can proceed. First we should download and run vpn script file (ubuntu-22.04-lts-vpn-server.sh). You can use any command to download the script, we will be using wget:
wget https://raw.githubusercontent.com/Angristan/openvpn-install/master/openvpn-install.sh -O ubuntu-22.04-lts-vpn-server.sh
Next, we need to setup permissions using chmod: chmod -v +x ubuntu-22.04-lts-vpn-server.sh
After, run ubuntu-22.04-lts-vpn-server.sh to install OpenVPN server: sudo ./ubuntu-22.04-lts-vpn-server.sh
All the installation questions are already pre-answered for you, so you can leave them as is if you do not require any special configurations of ports/protocols, etc. Make sure to not enable and use compression when prompted.
At some point you will be required to write a name for your client and set up a password for it. Once you’ve done it, the file will be saved to root directory of your server, and you’ll be free to download it to run with an OpenVPN client.
You can download .ovpn file to your device as you wish, to download it to Windows PC we will use 'scp' command as an example.
For that, you can use WinSCP utility which is more user-friendly than its CLI version. Simply, download the utility and run it. After you run it, you’ll be prompted with the window to fill in the information of your server and log in.
After you log in, you’ll see a window from which you’ll be able to download .ovpn file to your Windows computer.
Download the file and run it with an OpenVPN client. You’re done!
Comments
0 comments
Please sign in to leave a comment.