When it comes to VPN, it may b important for your infrastructure to use, since you may have to serve private content without publicly exposing services on the internet.
For example: internal portals for employees typically need to be accessible only via a private network.
Thanks to AWS Community AMIs since it provides a verified AMI for the OpenVPN server.
In this article we will demonstrate how to setup an OpenVPN server on AWS EC2 instance and how to access it.
Below are mainly the features of OpenVPN server:
OpenVPN Access Server delivers the enterprise VPN to your business.
Protect your data communications and provide encrypted remote access to on-premise, hybrid, and public cloud resources.
Access Server provides you with a powerful and easy-to-use web-based admin site that makes VPN management and configuration in a simple way.
Access Server integrates OpenVPN server capabilities, enterprise access management, OpenVPN Client software packages works on different operating environments:
Windows.
MAC.
Linux, and mobile OS (Android and iOS) environments.OpenVPN offers different licensing model on AWS starting from 2 concurrent connection with no cost other than the AWS hardware costs
Solution Pre-requisites
- AWS Account.
- VPC with Public subnet to host the EC2 instance on it.
- OpenVPN deployed on EC2 (Can be deployed from Marketplace).
- A router supports VPN.
High Level Design
Implementation Steps
- Login into AWS console with your credentials.
- Search in the address for VPC and select VPC service
- Create a VPC any name you want with 1 public and 0 private subnet.
- Search for EC2 instance service and select it to start launching a new EC2 which will be working as VPN access server.
- Here we will select Browse AMI and search for OpenVPN
- Search for OpenVPN and select AWS Marketplace AMI
- Create a new key and select it then launch the instance in the provisioned VPC and public subnet
- After the instance is ready press connect and select SSH Client, I used Gitbash to connect to it using the key created, make sure to chmod to 400 of the key as per the instructions in SSH client tab.
- ssh -i “yourkey.pem" root@ecx-x-x-x-x.us-west-2.compute.amazonaws.com
- use sudo passwd openvpn to change the openvpn user password
- Navigate into your browser and paste the public ip of EC2 instance as below http://instance_public_ip:943/admin then enter username OpenVPN and password you created above
- Navigate on Configuration VPN Settings and make sure the client internet traffic to be routed through the VPN option is true.
- Press Update Running Server to reflect the configuration.
- Navigate into http://instance_public_ip:943/ and login into the page you will be redirect into this for me it will be windows.
- Enter your server configuration in the OpenVPN connect.
Top comments (0)