Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
Being able to access AWS resources directly in secure way can be very useful. To achieve this you can:
- Setup a dedicated connection with AWS Direct Connect
- Use a Network Appliance
- Use a Software Defined Private Network like OpenVPN
In this post, I will walk you through how to create an OpenVPN server on AWS, to connect securely to your VPC, Private Network resources and applications from any device anywhere.
To get started, sign in to your AWS Management Console and launch an EC2 instance from the OpenVPN Access Server AWS Marketplace offering:
For demo purpose, choose t2.micro:
Use the default settings with the exception of âEnable termination protectionâ as we dont want our VPN being terminated on accident:
Assign a new Security Group as below:
- TCPâââ22Â : Remote access to the instance.
- TCPâââ443Â : HTTPS, this is the interface used by users to log on to the VPN server and retrieve their keying and installation information.
- TCPâââ943Â : OpenVPN Admin Web Dashboard.
- UDPâââ1194Â : OpenVPN UDPÂ Port.
To ensure our VPN instance Public IP address doesnt change if itâs stopped, assign to it an Elastic IP:
For simplicity, I added an A record in Route 53 which points to the instance Elastic IP:
Once the AMI is successfully launched, you will need to connect to the server via SSH using the DNSÂ record:
ssh openvpnas@openvpn.slowcoder.com -i /path/to/key.pem
On first time connecting, you will be prompted and asked to setup the OpenVPNÂ server:
Setup a new password for the openvpn admin user:
sudo passwd openvpn
Point your browser to https://openvpn.slowcoder.com, and login using openvpn credentials
Download the OpenVPN Connect Client, after your installation is complete, click on âImportâ then âFrom serverâ :
Then, type the OpenVN DNSÂ name:
Enter your openvpn as the username and enter the same password as before and click on âconnectâ:
After you are connected, you should see a green check mark:
To verify the client is connected, login to OpenVPN Admin Dashboard on https://openvpn.slowcoder.com/admin :
Finally, create a simple web server instance in a private subnet to verify the VPN is working:
If you point your browser to the webserver private address, you should see a simple HTMLÂ page:
AWS OpenVPN Access Server was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.