Giter Site home page Giter Site logo

aws-transit-vpc's Introduction

Project deprecated

Unless you have very specific needs, you should use cross region VPC peering, which is cheaper and more reliable (see here and here and here).

Platform

  • Ubuntu 16.04.2 or later (anything with kernel 4.4+)
  • BIRD 1.6.3 or later
  • strongSwan 5.5.1 or later
  • Python 2.7
  • Boto3
  • xmljson 0.1.7

Design

          +---------------+                 +---------------+                              
          |               |                 |               |                              
          |   some VPC    |                 |   some other  |                              
          |               |                 |      VPC      |                              
          +-----+---+-----+                 +-----+---+-----+                              
                |VGW|                             |VGW|                                    
                |---\                             |---\                                    
               /     \                           /     \                                   
              /       \                         /       \                                  
              |        \                        |        \                                 
+------------/       +------------+  +---------/--+      +------------+                    
|   VPN #1   |       |   VPN #2   |  |   VPN #3   |      |   VPN #4   |                    
+------------+\      +------------\  +--/---------+      +--/---------+                    
               \                   \   /                   /                               
                \                   \ /                   /                                
                 \                   /                   /                                 
                  \                /- \                /-                                  
                   \              /    \              /                                    
                    \            /      \            /                                     
               +-----\----------/--------\----------/----+                                 
               |      \        /          \        /     |                                 
               |   +-------------+     +-------------+   |                                 
               |   |VPN server #1|     |VPN server #2|   |                                 
               |   +------|------+     +---|---------+   |                                 
               |          |      VPC       |             |                                 
               +----------|----------------|-------------+                                 
                          |                |                                               
                          |                |                                               
                          |                |                                               
                    +-----|------+   +-----|------+                                        
                    | VPN DC #1  |   | VPN DC #2  |                                        
                    +-----\------+   +--/---------+                                        
                           \           /                                                   
                            \         /                                                    
                             |      /-                                                     
                             \     /                                                       
                              \   /                                                        
                               \ /                                                         
                                ----+-----------+                                          
                                |VGW|  Direct   |                                          
                                +---|  Connect  |                                          
                                    +-----------+ 

Terraform

Tags used for VPN identification:

  • bird = True (static)
  • id = puiblic ip of VPN server [Elastic IP] (dynamic)

VPN server module

Deploys one or more linux based EC2 instances with IAM role attached, to allow describe regions and describe VPN connection. IAM role is required download VPN configuration from AWS API and elastic IP attached to keep CGW configuration consistent all the time. To provide HA, deploy at least two instances in two different AZs.

Direct Connect module

Creates one or more VPN connections with proper tags to designated VGW (eg. VGW used by Direct Connect).

Satellite module

Creates VPN with one more public subnets and one or more sets of CGW, VGW and VPN connection, all with proper tags.

Probe module

Deploys t2.nano instance in designated VPC and subnet.

#Ansible Ansible playbook has to be deployed and executed manually on each VPN server.

Common

Fixes DNS to standard AWS server, disables AppArmor and upgrades all packages in the system.

VPN config generator

Installs necessary Python libraries and executes Python script to download VPN configuration from related VPN connection and generate configuration file used in next steps.

strongSwan

Add custom strongSwan repo, consumes configuration file generated in previous step, deploys strongSwan and proper configuration

BIRD

Add custom BIRD repo, consumes configuration file generated in previous step, deploys BIRD and proper configuration

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.