OpenVPN Server – AWS EC2

Elastic Cloud Instances are on demand virtual machines wtih pre-configured OS images. Some types of them are free of charge the first year such as the T2.micro (1vCPU, 1GB of RAM etc.)

The first step is to create a AWS account and link a payment method.

Then navigate to EC2 and create a new instance.

It is possible to install the pre-configured OpenVPN Server instance directly or on top of a generic Linux OS.

A good choice can be Amazon Linux (you can expect to be the best optimized one) or a more generic Ubuntu 18 LTS but every Linux distribution will be fine.

To facilitate the installation of the OpenVPN Server are out there open source projects that use a script to automate the whole process.

Once done with the installation the next step consists in exporting the OpenVPN Server certificate to the client machine and be sure the OpenVPN Server port chosen previously has been opened on AWS EC2 firewall (adding an inboud rule to allow traffic).

That’s it, we can install the certificate in our laptops or mobile devices using the OpenVPN official application and we are ready to go.

Note: The same process can be replicated on premises (for example a Virtual Machine or a RaspberryPi) to have a local OpenVPN server if the goal is to access our home/office resources.