Home > Uncategorized > Install OpenVPN Server on Amazon AWS EC2 Ubuntu Instance

Install OpenVPN Server on Amazon AWS EC2 Ubuntu Instance

September 21, 2023

Before we begin, you will need to create an account on AWS account, you could get yours for free to use on your first year.

Let’s get started.

select free tier instance type, here we will use ubuntu

generate your own key-pair, we will use it for SSH later by using Putty

under Network settings, add new security group rule, custom UDP with port 1194, source type from anywhere.

here you would see that you have TCP 22 and UDP 1194

then you can try SSH to your instance by using Putty, locate the IP address, pair it with the key-pair you generated just now to login, your username is ubuntu

once you are inside,

just change the user by typing sudo -i

you are on root

let’s perform an apt-get update before everything

then we will use

curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh

chmod +x openvpn-install.sh

locate the sh file, run it by ./openvpn-install.sh

go through the setup by following the questions

then choose a profile name and i chose to use password instead of passless

you will see that ther is a new file created with extension ovpn

we will use winscp to copy out the ovpn file

download openvpn client and double click the ovpn file to continue the setup

enter the password you set, then you are in.

Categories: Uncategorized