Git Product home page Git Product logo

aws-client-vpn's Introduction

aws-client-vpn

Requirements

  • python 3
  • boto3
  • docker

Scripts

client-vpn.py

  • generate the certicates using OpenVPN easy-rsa in the output directory
  • uploads the certificates to ACM and tags them
  • creates the vpn endpoint required resources using cloudformation
usage: client-vpn.py [-h] [--verbose] --server-cn SERVER_CN
                     [--client-cn CLIENT_CN] --name NAME --subnet-id SUBNET_ID
                     [--cidr CIDR]

optional arguments:
  -h, --help            show this help message and exit
  --verbose             increase output verbosity
  --server-cn SERVER_CN
                        common name for the server certificate
  --client-cn CLIENT_CN
                        common name for the server certificate
  --name NAME           stack and environment name the vpn
  --subnet-id SUBNET_ID
                        SubnetId to which the vpn will assocate with
  --cidr CIDR           CIDR the vpn will give to the clients

get-vpn-config.py

  • gets the id of the client vpn endpoint
  • downloads the client config file into the output directory
  • alters the hostname in the config with a random string
usage: get-vpn-config.py [-h] [--verbose] --name NAME [--region REGION]

optional arguments:
  -h, --help       show this help message and exit
  --verbose        increase output verbosity
  --name NAME      stack and environment name the vpn
  --region REGION  aws region the vpn exists

Setup

  1. Clone the repo

  2. Get the id of the subnet you wish to associate the vpn with

  3. Run the client-vpn.py script with the following required options

./client-vpn.py --server-cn=vpn.domain.tld --name ciinabox --subnet-id ${SubnetId}
  1. Run the get-vpn-config.py script to download the config file

  2. copy the config file and the client certificate and key to a local secure directory

  3. modify the config paths for the cert and key

  4. open the config in your favourite vpn client

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.