AWS Bootcamp - Q3 - Setup Pritunl VPN in AWS EC2

Setup Pritunl VPN using AWS EC2 instance

In this third task, you are going to setup Pritunl VPN and allow access to private network only through the VPN.

Pritunl VPN - https://pritunl.com/

Pritunl VPN source - https://github.com/pritunl/pritunl

Difficulty Level - Intermediate

Days to complete - 3 days

Architecture

Pritunl VPN server setup

Objectives

  1. Should understand networking concepts in AWS such as VPC, Private & Public Subnet, Internet Gateway, NAT Gateway

  2. Understand basics of VPN and why it is used

  3. Learn how to setup Pritunl VPN in AWS EC2 instance and attach the domain to it

  4. Learn how to access private resources using VPN and route only specific CIDR through it.

AWS Services / Technologies

Networking

VPC, Private & Public Subnet

Pritunl VPN

IG, NAT Gateway

OpenVPN

Route53

High level Tasks

  1. Create a new VPC with 1 public subnet and 1 private subnet

  2. Make sure you attach proper IG, NAT Gateway in the Route tables

  3. Create an EC2 instance in the public subnet and setup the Pritunl VPN server

  4. Configure VPN to route only the traffic of VPC's CIDR to flow through private network

  5. Setup a custom domain in this format - vpn-.ezyinfra.dev using Route53 (Optional step. Skip it if you don't have the domain). Contact Prasanna to add the DNS records.

  6. Finally, create a profile for testuser and connect to Pritunl VPN using OpenVPN client.

  7. SSH into the EC2 instance using Private IP Address and it should allow. If you are not connected to VPN, you should not be allowed to SSH.

Reference material

You can use any reference - AI, AWS Docs, Youtube videos. But the objective is you should able to complete the task and should able to explain what you did clearly.

Blog to setup Pritunl VPN

Video Solution

Coming Soon

Share this post

Want to discuss about DevOps practices, Infrastructure Audits or Free consulting for your AWS Cloud?

Prasanna would be glad to jump into a call
Loading...