GithubHelp home page GithubHelp logo

thbishop / aws-ec2-vpn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weavenet/aws-ec2-vpn

0.0 2.0 0.0 344 KB

Set up a VPN server on an AWS EC2 Instance via a self contained Cloud Formation template.

License: MIT License

Shell 100.00%

aws-ec2-vpn's Introduction

AWS EC2 VPN

Set up a VPN server on an AWS EC2 Instance via a single, self contained, Cloud Formation template.

See aws-ec2-vpn.json for raw template.

Setup via AWS Console

Follow the AWS Cloud Formation Guide to create a new Cloud Formation Stack from the aws-ec2-vpn.json template.

Setup via CLI

You must have the aws-cli as well as jq installed and available in your path.

Additionally, you must set your default AWS credentials to a user with permissions to setup a VPC and launch EC2 instances.

Clone down this repo and execute the setup.sh script with the following input.

$ bash setup.sh YOUR_VPN_PRE_SHARED_KEY YOUR_VPN_USERNAME YOUR_VPN_PASSWORD

Once the setup is complete, the script will return the persistent EIP of the Instance. For example:

$ bash setup.sh MySuperSecretPreSharedKey vpnuser TheVPNUserPassword
VPN Setup in progress.
VPN Setup complete. IP address is '35.164.187.145'.

Client Setup

MacOS

Under Sytem Preference / Network hit the + button to add a new connection.

Change the Interface to VPN.

Change the VPN Type to L2TP over IPSEC.

Ggive the VPN a name in Service Name.

Click Create.

image1

Add the IP address, which was output from the setup.sh script above, as the Server Address.

The user you specified, as YOUR_VPN_USERNAME in the script above, as the Account Name.

image2

Click on Authentication Settings.

Add the password you specified, as YOUR_PASSWORD in the script above, as the Password.

Add the pre shared key you specified, as YOUR_VPN_PRE_SHARED_KEY in the script above, as the Shared Secret.

Click OK.

image3

Click on Advanced Settings ensure that Send all traffic over VPN connection is checked.

Click OK.

image4

Click on Connect to connect to the VPN.

image5

Ensure your traffic coming from the VPN IP via What Is My IP.

image6

Costs

The only charge will be for the EC2 instance hours, currently set to t2.nano, and network bandwidth.

At the time of this writing the instance hours cost under $5.00 USD per month in us-west-2 if the VPN is ran continuously.

See AWS On Demand Pricing for current pricing.

aws-ec2-vpn's People

Contributors

weavenet avatar

Watchers

 avatar  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.