Coder Social home page Coder Social logo

ikev2_vpn's Introduction

StrongSwan IKEv2 VPN setup with IBM Kubernetes Service

IBM Cloud Kubernetes service --> initial connection to on-prem Strong Swan IPSEC

These scripts are based on this cool tutorial article: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-ikev2-vpn-server-with-strongswan-on-ubuntu-16-04 (thanks DigitalOcean!)

This Readme edited from the original fork to work with IBM cloud kubentes cluser IBM Cloud softlayer machine

Following the pattern mentioned below

https://developer.ibm.com/dwblog/2018/securing-containers-iks-kubernetes/

alt IPSEC with strongswan

Deploy with Pre Shared Key auth

This script would uuidgen a PSK and print it out to console, where you can copy and hit enter to continue.

After you ssh your_vpn_machine, just run this:

curl -L https://raw.githubusercontent.com/ahmadsayed/ikev2_vpn/master/ikev2-deploy-psk.sh -o ~/deploy.sh 

#Edit the deploy.sh and update the following 
# leftsubnet, with softlayer private subnet
# rightsubnet, append IKS workernodes private subnet
chmod +x ~/deploy.sh && ~/deploy.sh

Deploy Strongswan on IBM Cloud kubernetes Service

after starting your cluster run the following command download config.yaml file, and update the following

remote.gateway with softlayer public IP

remote.subnet with softlayer private subnet

local.subnet append IKS worker node private subnet privateIPtoPing with Softlayer machine private IP

helm install -f config.yaml --name=vpn ibm/strongswan

For detailes steps and trouble shooting follow the below URL https://console.bluemix.net/docs/containers/cs_vpn.html#vpn

To validate if everything went right

helm test vpn

Expected result should be

RUNNING: vpn-strongswan-check-state
PASSED: vpn-strongswan-check-state
RUNNING: vpn-strongswan-check-config
PASSED: vpn-strongswan-check-config
RUNNING: vpn-strongswan-ping-remote-ip-1
PASSED: vpn-strongswan-ping-remote-ip-1
RUNNING: vpn-strongswan-ping-remote-gw
PASSED: vpn-strongswan-ping-remote-gw
RUNNING: vpn-strongswan-ping-remote-ip-2
PASSED: vpn-strongswan-ping-remote-ip-2

Note: I find this website (https://mxtoolbox.com/subnetcalculator.aspx), it will be helful to calculate and convert subnet to CIDR

ikev2_vpn's People

Contributors

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