Code Monkey home page Code Monkey logo

terraform-aws-vpn's Introduction

OpenVPN Server

Basic OpenVPN server using IAC(Terraform) & AWS.

License

Prerequisites

How to implement

  1. Clone the repo
  2. Make sure you have an AWS account and installed AWS CLI on your system. Follow this article for more info on how to create a credential file for your AWS CLI. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
  3. Update public key in 04-instance.tf aws_key_pair resource to use your own. Your Public key can be found via terminal using cat ~/.ssh/key_name.pub command.
  4. Open variables.tfvars and update the my_ip variable to use your own public IP address. To retrieve your public ip you can execute curl ifconfig.co via the terminal.
  5. Once all the variables have been updated execute make vpn from the terminal and once terraform asks for an input enter yes to let terraform build your environment.
  6. After your environment has been setup you can ssh into your ec2-instance using your private keyssh -i ~/.ssh/private_key.
  7. Once you successfully are able to access your instance please follow this article by OpenVPN as to how you want to configure your OpenVPN server. https://openvpn.net/vpn-server-resources/amazon-web-services-ec2-byol-appliance-quick-start-guide/. You can follow the steps of the OpenVPN server setup until your reach the Changing_Default_Timezone section as terraform does rest of the stuff.
  8. Once installed login with your local instance credentials username openvpn and to set the user password please execute sudo passwd openvpn to set a password for the user. After configuration is complete you can head over to https://your_ip:943/?src=connectto download your VPN profile for your system.
  9. To connect system to VPN you will need to download a VPN Client e.g. Tunnelblick or OpenVPN Connect (can be found in the profile page) as seen below. OpenVPN Connect App

To remove changes

  1. Execute make destory to remove all infrastructure

Want to Help?

Feel free to make an PR's or raise any issues ๐Ÿ˜€

terraform-aws-vpn's People

Contributors

sogyals429 avatar

Stargazers

Gayuru G avatar

Watchers

James Cloos avatar  avatar Gayuru G avatar

terraform-aws-vpn's Issues

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.