Overview:
In the age of digital privacy, having control over your internet traffic is paramount. One effective way to secure your online activities is by setting up your own Virtual Private Network (VPN) server. In this guide, I’ll walk you through the process of creating your own VPN server using an AWS EC2 instance and OpenVPN. This setup will ensure your data is encrypted and your internet usage is private.
Why Set Up Your Own VPN?
- Enhanced Security: Encrypt your internet connection to protect sensitive data.
- Privacy: Hide your online activities from ISPs and other prying eyes.
- Access Control: Manage who can connect to your VPN and ensure secure access to your network.
- Cost-Effective: Using AWS's free tier, you can have a powerful VPN server at minimal cost.
STEP-BY-STEP guide:
STEP 1: Launch an EC2 Instance
Please refer to the blog The Ultimate Guide to Setting Up a Virtual Machine on AWS with EC2 Instance, for detailed steps to creating EC2 Instance.
1. Log in to AWS Management Console: Navigate to the EC2 Dashboard.
2. Create a New Instance:
- Click on Launch Instance.
- Select the OpenVPN Access Server from the AWS Marketplace. This pre-configured AMI simplifies the setup process.
Note: It shows $0.023 / Hr price, It is for the EC2 Instance. If you are on free-tier of AWS, you can launch upto two instances for free and OpenVPN access server is free to use upto 2 Clients.
- Choose an instance type. For small-scale use,
t2.micro
is sufficient.
- Configure instance details. The default settings should work for most cases.
- Create a new pair of key and
download the key.
- Add storage. The default 8 GB is typically enough.
- Configure security group:
- Allow inbound rules for ports 22 (SSH), 443 (HTTPS), and 943 (Admin Web UI).
- Allow port 1194 (UDP) for OpenVPN connections.
- Review and launch the instance.
STEP 2: Access the Instance
STEP 3: OpenVPN Configuration- You need to configure the OpenVPN server using SSH client.
- Please enter 'yes' to indicate your agreement : Yes
- Will this be the primary Access Server node: Yes
- Please specify the Network interface and IP address to be used by the Admin Web UI : 1
- Just press enter for the above questions, It will take default settings.
- Please specify the port number for the Admin Web UI: 943
- Please specify the TCP port number for the OpenVPN Daemon: 443
- Should Client traffic be routed by default through the VPN: Yes
- Should Client DNS traffic be routed by default through the VPN: Yes
- Should private subnets be accesible to clients by default: yes
- Do you wish to login to the Admin Web UI as "openvpn" or specify: just press > Enter
Username is set as openvpn.
- Enter the password and confirm the password.
- Username: openvpn
- Password: That you set right now.
- Please specify your Activation key : Just Press > Enter.
- Wait for few minutes , until it finishes configuration.
STEP 5: Accessing the OpenVPN server through Web UI.
- Open the Admin UI : https://100.24.205.221:943/admin from previous STEP.
Note: IP Address might be different in your case.
Bye...
see you in the next blog..
0 Comments