Giter Site home page Giter Site logo

terravpn's Introduction

TerraVPN

This is a Terraform project to build and start an OpenVPN server running within AWS EC2 instance of any region or size. In a single command, start up a new personal OpenVPN server in any region in AWS in less than a minute.

Disclaimer: This is very much a work-in-progress and an experiment.

Setup

  1. Setup AWS

    Create/Use an IAM Setting in your AWS configuration that can at a minimum manage EC2 and Security Groups. Set the configuration in your shell.

    export AWS_ACCESS_KEY_ID="<access id>"
    export AWS_SECRET_ACCESS_KEY="<access secret>"
  2. Install Terraform.

  3. Checkout this Repository.

  4. Run terraform init in the projects directory.

  5. Run terraform plan to validate the project on your machine.

Run

To create your own OpenVPN server: run terraform apply in the directory of this project, that's it.

This will do a few things:

  1. Creates a fresh SSH Key pair in the keys directory for this instance only.
  2. Creates a new Security Group and EC2 Instance in AWS.
  3. Installs and configures OpenVPN on new instance.
  4. Creates a client configuration file for your device. You will be presented with a download command on success to run via scp.

Options

To run your new setup in a separate region, pass -var "region=ca-central-1" or equivalent to terraform plan and terraform apply. To use a different instance size, pass -var "instance_size=t2.micro" or equivalent to terraform plan and terraform apply.

Destroy

To take down your already created VPN: run terraform destroy in the project directory.

Notes

Read more about setting up OpenVPN on Ubuntu with Digital Ocean's setup.

terravpn's People

Contributors

pjskennedy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

asmtal

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.