How to setup OpenVPN on AWS

OpenVPN is one of the most popular VPN we have with us which is so easy to install on any server.

It works on highly secure SSL/TLS certificate.

Being open source it is completely free to use, but little bit tricky for new user to setup.

For setting VPN on AWS server, I suggest you taking t2.medium or t2.micro instance which will be sufficient for any individual VPN server to run.

Note** Pre configure AMI’s of different VPN server is also available in AWS MarketPlace but I suggest you comapare the price of VPN server from AWS MarketPlace and default price of t2.medium or t2.micro.

As OpenVPN is free, It will be easy for anyone to configure on the instance without thinking of any type of service charges.

Points to keep in mind while configuring OpenVPN :-

1) Create individual VPC for OpenVPN so that when your infrastructure will expand your networking configuration will never messup.
2) Create Two Security Group
a) VPN-Internal
b) VPN-External

Now, the inbound rule of VPN will be as below :
VPN-Internal : { TCP 22 } { open for sg-vpn-External }
VPN-External : { UDP 1194 } { }

So, what to do next, nothing as such attach VPN-Internal to your production instance and remove the ssh rules with any IP or CIDR and attach the IP address or CIDR of VPN.

To setup VPN on your VPN Server ( VPN Instance ) do,

and run this,

It will install the VPN on a new server, just follow the steps properly.
As soon as the scripts executed by you, it will ask a few of the input parameter, pas it properly.

Do comment and appreciate the contributors and creators of the script, it’s just awsome
Follow the link

Leave a Reply