Giter VIP home page Giter VIP logo

aws-openvpn-solution's Introduction

AWS OpenVpn Solution

This is a deployment guide on how to get OpenVPN onto your AWS infrastructure, in order to quickly secure your infrastructure.

In this guide we will be using the OpenVpn Access Server instead of the community edition, which most engineers will be familiar with. This product comes with a nice GUI and several other features out to box allowing you to quickly spin up an ISO 27001 compliant VPN service.

The OpenVPN Access Server can be selected from the AWS Marketplace with different license options, based on concurrent users and size of ec2 instance.

How does the VPN solution work?

The OpenVPN client establishes connection to the VPN server using the UDP protocol. The virtual tunnel is established with a dynamic ip from the following range: 172.16.223.0/24. Internet traffic is not tunneled over the VPN connection for security reasons, splitting the VPN tunnel traffic. End user can only access internal servers & services on the private subnets, any other subnet or VPC is off-limits. The OpenVPN user access database controls the access privileges to the subnets, different rules can be applied to users. All config data is stored within the Mysql RDS instance. Internal DNS domains are forwarded from Route 53 by OpenVPN, allowing the client to query AWS for internal domain resolution.

Please see the diagram below:

Architecture

Notes from the diagram:

  • The RDS Mysql database provides greater redundancy than the original file based SQlite database.

How to deploy

There are several ways to deploy this solution. In this example we are using CloudFormation and bash in the userdata field to complete the setup process. We have included some Ansible playbooks which could be used instead during the deployment. However they will require the user to setup S3 buckets in their respective AWS accounts, we have also included a few short python scripts for that.

Once you have completed the CloudFormation deployment, please SSH onto the new ec2 instance and complete the OpenVPN initial installation wizard that is run the moment you SSH onto the instance. Hence this solution does require a bit of manual work before the solution is automated.

Post CF deployment tasks:

  1. Go through the OpenVPN wizard
    1. Set a IP range for VPN tunnel traffic
    2. Set which subnets the VPN should access
    3. Create users
  2. Migrate SQLite DB to RDS
  3. Restart application with the RDS connection enabled
  4. Deployment complete!

For more information on how to secure your AWS infrastructure. Please contact us on: [email protected]

aws-openvpn-solution's People

Contributors

richardgutkowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dheerajjoshi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.