umma.dev

How To Build Your Own VPN

Short guide on how to set up a VPN with AWS.

Set Up with AWS

Navigate to EC2 and launch an instance.

When choosing an Amazon Machine Image (AMI), select AWS Marketplace and search for open vpn. Select OpenVPN Access Server with the Free tier eligible option.

When it comes to the instance type, you need to select t2.micro.

Launch the instance and create a new key pair. Remember to download the keys, so you can SSH into the server.

SSH into your server as the root user:

ssh -i "<your-key-pair>" root@<your-public-instance-domain>

Now SSH as an openvpnas user:

ssh -i "<your-key-pair>" root@<your-public-instance-domain>

Create a password for the openvpnas user:

sudo passwd openvpn

Now copy the public DNS or IP address for you instance and paste the following into your browser:

http://<your-instance-public-DNS or IP address>:943/admin

Enter your credentials and navigate to VPN settings. Scroll down to routing and enable should client Internet traffic be routed through the VPN. Save settings.

Go the following url:

http://<your-instance-public-DNS or IP address>:943/

Now you can log in again and select the operating system for the VPN.