1. Download “openvpn-install.sh” GitHub – angristan/openvpn-install: Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.
2. Have Amazon Lightsail activated with quota in AWS account.
* Credits to cyberciti for instructions and the scripts introduction Ubuntu 20.04 LTS Set Up OpenVPN Server In 5 Minutes – nixCraft (cyberciti.biz)
3. SSH keypair are created and added into your AWS account.
4. Make sure OpenVPN client is install on your computer OpenVPN Connect – Client Software For Windows | OpenVPN
Creating a Ubuntu AWS instance
1. Click on “Create Instance”
2. Select OS only, and choose your favorite Linux distro, in my case Ubuntu were chosen.
At the time of this blog post created, the openvpn install script works on both ubuntu 22.04 and 20.04
3. Proceed to choose the correct SSH keypair for your instance, keypair are needed to proceed further.
4. In this post, the lowest and most affordable instance are chosen.
5. Proceed to provide name for your instance. Then click on the “Create Instance” button.
6. Wait for the instance to be up and running, the process should take less than 1 minutes.
7. After wait is over it should show the instance is running, take note of the IP and its time to proceed to configure the firewall rule next.
Adding port of OpenVPN into
1. Click on the name of the instance “Ubuntu-OpenVPN” from the diagram of the previous step, the UI to manage the instance will be loaded.
2. Select the tab “Networking”, the add a new firewall rule “+ Add rule”
3. Add rules as Custom, UDP, 1194 as shown in the diagram below, then click create.
4. Check a new rule that is added application custom, protocol UDP, port range/code 1194.
5. You are now ready to run the openvpn install script
Installation of OpenVPN in the newly installed instance
1. Login to the remote SSH.
2. To install refer to the cyberciti instructions as it is very comprehensive
3. Ubuntu 20.04 LTS Set Up OpenVPN Server In 5 Minutes – nixCraft (cyberciti.biz)
Next download the ovpn file generated by the setup script, has it imported into your OpenVPN Client. Now you can connect to the internet using VPN paying substantially less.
Lastly, remember to terminate the instance after use to avoid getting charged. Terminating by deleting the instance.