• This repository has been archived on 23/Mar/2023
  • Stars
    star
    397
  • Rank 108,561 (Top 3 %)
  • Language
    Shell
  • License
    Other
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Multi-user IPSec server docker image

DockerIpSec

IPsec VPN Server on Docker

Build Status

Docker image to run an IPsec VPN server, with support for both IPsec/L2TP and IPsec/XAuth ("Cisco IPsec").

Based on Lin Song's IPsec VPN Server on Docker modified specially for multiple users.

Install Docker

Follow these instructions to get Docker running on your server.

How to use this image

Start the IPsec VPN server

Download this repo, unzip it and cd into it.

Start a new Docker container with the following command:

./start.sh

Once you have the service up, you will need at least one user to use it.

Add a new user

Create a new VPN user with the adduser command. For example, create a user john-ipad like this:

./adduser.sh john-ipad

This will generate an individual password for this user (user specific, usually called "password") and also display the shared key of the server (same for all users, usually called "PSK" or "Pre-Shared Key").

The user will be available immediately, there is no need to restart the server.

IMPORTANT: Due to a limitation in the IPSec protocol design, several devices can not connect to the same server behind the same NAT router. We recommend creating a separate account for each device a user owns. This will also make revocation of credentials easier if a user lost a device.

List users in the system

You can list all VPNs with the command:

./lsusers.sh

Remove a user

You can remove a user like this (following the john-ipad example):

./rmuser.sh john-ipad

Check server status

To check the status of your IPsec VPN server, you can pass ipsec status to your container like this:

./status.sh

Next steps

Get your computer or device to use the VPN. Please refer to:

Configure IPsec/L2TP VPN Clients
Configure IPsec/XAuth ("Cisco IPsec") VPN Clients

If you get an error when trying to connect, see Troubleshooting.

Enjoy your very own VPN! 🎉🚀

Technical details

There are two services running: Libreswan (pluto) for the IPsec VPN, and xl2tpd for L2TP support.

Clients are configured to use Google Public DNS when the VPN connection is active.

The default IPsec configuration supports:

  • IKEv1 with PSK and XAuth ("Cisco IPsec")
  • IPsec/L2TP with PSK

The ports that are exposed for this container to work are:

  • 4500/udp and 500/udp for IPsec

Extending the configuration

The default configuration will work out of the box in most cases. However, you might want to tweak some little settings, like the routing table, or maybe something specific to your environment. If you mount a /pre-up.sh script, it will be executed before starting the VPN.

Backing up your VPN configuration

When using the start script a new etc directory will be created. You can back up this directory.

Build from source code

Advanced users can download and compile the source yourself from GitHub:

git clone https://github.com/mobilejazz/docker-ipsec-vpn-server.git
cd docker-ipsec-vpn-server/docker
docker build -t mobilejazz/docker-ipsec-vpn-server .

See also

License

This project is distributed with a Creative Commons Attribution and Share Alike license. See LICENSE.md file to read the complete license.

Made with ❤️ from Barcelona by Mobile Jazz, the Web and App development company for startups.

More Repositories

1

Motis

Easy JSON to NSObject mapping using Cocoa's key value coding (KVC)
Objective-C
252
star
2

NibWrapper

Nesting NIBs in other NIBs has never been this easy.
Objective-C
46
star
3

Colloc

Collaborative Localizations for iOS and Android using Google Documents
Kotlin
31
star
4

coltrane

An android file picker
Java
25
star
5

localname

Provide Secure Access to Your Local Development Server
Swift
12
star
6

Eixample

A flexbox grid made with love in Barcelona by Mobile Jazz.
CSS
12
star
7

harmony-kotlin

Harmony framework for Kotlin
Kotlin
12
star
8

mariadb-backup-s3

Shell
12
star
9

CacheIO

Caching system to persist objects.
Java
8
star
10

harmony-swift

Harmony framework for Swift
Swift
7
star
11

harmony-reference

JavaScript
7
star
12

harmony-php

Harmony framework for PHP
PHP
6
star
13

harmony-typescript

Harmony framework for TypeScript
TypeScript
6
star
14

Pompeu

Automatic xib and storyboard localizations for iOS
Objective-C
6
star
15

MJ-WP-Breadcrumb

A lightweight, customisable function to generate and display a breadcrumb for WordPress.
PHP
6
star
16

multi-apk-publisher

Simplify publishing android apps to Google Play Store when using multi-apk feature.
Python
5
star
17

BlueFish

Wrapper over Core Bluetooth with block-based APIs
Objective-C
4
star
18

KnockKnock-Android

Java
4
star
19

awsdns

DNS naming for your EC2 instances
Go
4
star
20

Hermod

User friendly HTTP client on top of AFNetworking
Objective-C
4
star
21

Vastra-android

Validation Strategies for Android
Java
4
star
22

cloudinary-backup

Back Up your Cloudinary files to your computer
Dart
3
star
23

harvest-invoice-export

Harvest invoice exporter
JavaScript
2
star
24

MJiOSCore

Objective-C
2
star
25

random-calls-bot

Bot to randomly pair people for a social talk in Slack
JavaScript
2
star
26

KnockKnock-iOS

Objective-C
2
star
27

Lleida.net-iOS

iOS client for Lleida.net services
Objective-C
2
star
28

yii2-mj-cms

CMS for Yii2
PHP
2
star
29

PlayThis

Sound management in Cocoa
Objective-C
2
star
30

MJGallery

Image viewer gallery
Objective-C
2
star
31

mobilejazz-android-memoryeater

A simple app that where the user can configure how much memory it should consume. This can be used to provoke low memory situations.
Java
2
star
32

Vastra-ios

Validation Strategies for iOS
Objective-C
2
star
33

MJCocoaCore

Objective-C
2
star
34

QuickCoder

Fast object coding & decoding
Objective-C
1
star
35

yii2-mj-cms-example

MobileJazz Yii2 CMS
PHP
1
star