Coder Social home page Coder Social logo

kkerr2005 / terraformopenvpn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gudlyf/terraformopenvpn

0.0 0.0 0.0 48 KB

Terraform scripts to create a quick OpenVPN server in the cloud (AWS, Google, Azure, more-to-come!)

License: GNU General Public License v3.0

Shell 30.92% HCL 69.08%

terraformopenvpn's Introduction

TerraformOpenVPN

Terraform scripts to create a quick OpenVPN server in the cloud (AWS, Azure, Google (GCP), more to come). Can be trivially modified to work with other cloud providers.

Steps for use

  1. Download Terraform.

  2. For AWS, be sure your AWS profile is setup (i.e., $HOME/.aws/config).

  3. For GCP, be sure to generate your account.json from Google Application Default Credentials or, more easily, simply login with gcloud auth application-default login.

  4. For Azure, be sure you have the Azure CLI installed and complete an az login

  5. Create your SSH keys:

    cd TerraformOpenVPN

    ssh-keygen -N '' -f ./certs/ovpn

  6. Edit your own cert_details (use cert_details.sample as template)

  7. In the cloud provider you're using, edit the region in variables.tf as needed (default is Canada).

  8. For Azure it will restrict SSH and VPN to your public ip by default, if otherwise needed set variables 'restrict_vpn' or 'restrict_ssh' in variables.tf.

  9. For GCP, be sure you've created a new project and noted it in variables.tf.

  10. cd to the cloud provider directory and perform a terraform apply.

  11. The new .ovpn file will be copied from new instance into cert_details. Open with your OpenVPN client.

To Do

  • (AWS/GCP) Flag for "only allow this IP to connect" to either SSH and/or OpenVPN.
  • Finish fail2ban configuration.
  • Better use of variables and file hierarchy to allow for a single variables file and one place to execute the apply command.
  • Enable this repository to be used as a module.
  • Fix Azure implementation to use API/metadata to retrieve external IP.

terraformopenvpn's People

Contributors

dandill-eng avatar dandillatbigspoon avatar gudlyf avatar mcduffeek-dnb avatar

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.