Giter Club home page Giter Club logo

docker-strongswan's Introduction

Couchbase strongSwan IPSEC VPN Container

To facilitate cross-datacenter relplication of your Couchbase buckets we add a requirement that a site-to-site VPN must connect the two sites. The reason is that the cluster operates in an overlay network with RFC1918 addresses, these are encoded into the cluster map thus a cluster in site A must have L3 connectivity to these addresses in site B.

This is a pure L3 routed solution, and daemon set containers must be installed on the Couchbase nodes which add a static route for the remote prefix or prefixes whose next hop is the VPN gateway. While we could just use SNAT within the VPN gateway to mitigate the requirement for static routes, we avoid this as it would add state to the system, and connection tracking tables are only a finite size. Therefore we sacrifice simplicity for reliability in that connections won't randomly get dropped.

Building

make

Configuration

STRONGSWAN_LEFTID
The local gateway's identity
STRONGSWAN_LEFTSUBNET
The local gateway's subnet(s) e.g. 10.0.0.0/16
STRONGSWAN_RIGHT
The remote gateway's public IP address
STRONGSWAN_RIGHTID
The remote gateway's identity
STRONGSWAN_RIGHTSUBNET
The remote gateways subnet(s) e.g. 10.10.0.0/16,10.16.0.0/24
STRONGSWAN_PSK
The pre-shared key to authenticate with

Running

docker run \
  -p 500:500/udp \
  -p 4500:4500/udp \
  -e STRONGSWAN_LEFTID=aws-us-west \
  -e STRONGSWAN_LEFTSUBNET=10.0.0.0/16 \
  -e STRONGSWAN_RIGHT=85.254.56.102 \
  -e STRONGSWAN_RIGHTID=aws-us-east \
  -e STRONGSWAN_RIGHTSUBNET=10.1.0.0/16 \
  -e STRONGSWAN_PSK=supersecret \
  --cap-add NET_ADMIN \
  couchbase/strongswan:1.0.0

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.