Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Multi-user IPSec server docker image

License

NotificationsYou must be signed in to change notification settings

mobilejazz/docker-ipsec-vpn-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DockerIpSec

IPsec VPN Server on Docker

Build Status

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

Based onLin Song's IPsec VPN Server on Docker modified specially formultiple users.

Install Docker

Followthese instructions to get Docker running on your server.

How to use this image

Start the IPsec VPN server

Downloadthis repo,unzip it andcd 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 userjohn-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 accountfor 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 thejohn-ipad example):

./rmuser.sh john-ipad

Check server status

To check the status of your IPsec VPN server, you can passipsec 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, seeTroubleshooting.

Enjoy your very own VPN! ✨🎉🚀✨

Technical details

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

Clients are configured to useGoogle 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 executedbefore starting the VPN.

Backing up your VPN configuration

When using the start script a newetc 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.gitcd docker-ipsec-vpn-server/dockerdocker 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 byMobile Jazz, the Web and App development company for startups.

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp