hwdsl2/docker-ipsec-vpn-server

Public

Docker image to run an IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2. Auto-generates server config and supports VPN client setup on Linux, Windows, macOS, iOS and Android.

  • Stars7.2k+3 tuần này
  • Forks1.5k
  • Watchers113
  • Issues1
  • Ngày tạo20/05/2016
  • Cập nhật gần nhất29/10/2026
  • Ngôn ngữShell
  • Giấy phép—
README.md38.5 KBRaw

English | 简体中文 | 繁體中文 | Русский

IPsec VPN Server on Docker

Build Status GitHub Stars Docker Stars Docker Pulls

Docker image to run an IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2.

Based on Alpine 3.23 or Debian 12 with Libreswan (IPsec VPN software) and xl2tpd (L2TP daemon).

An IPsec VPN encrypts your network traffic, so that nobody between you and the VPN server can eavesdrop on your data as it travels via the Internet. This is especially useful when using unsecured networks, e.g. at coffee shops, airports or hotel rooms.

Features:

  • Automatically generates VPN credentials and IKEv2 configuration on first start
  • Supports IKEv2 with strong and fast ciphers (e.g. AES-GCM)
  • Generates VPN profiles to auto-configure iOS, macOS and Android devices
  • Supports Windows, macOS, iOS, Android, Chrome OS and Linux as VPN clients
  • Includes a helper script to manage IKEv2 users and certificates
  • Automatically built and published via GitHub Actions
  • Persistent data via a Docker volume
  • Multi-arch: linux/amd64, linux/arm64, linux/arm/v7

Also available:

📘 Interested in self-hosted AI? The Self-Hosted AI Builder’s Guide is a practical guide to building, securing, and operating your own private AI stack.

Quick start

Use this command to set up an IPsec VPN server on Docker:

docker run \
    --name ipsec-vpn-server \
    --restart=always \
    -v ikev2-vpn-data:/etc/ipsec.d \
    -v /lib/modules:/lib/modules:ro \
    -p 500:500/udp \
    -p 4500:4500/udp \
    -d --privileged \
    hwdsl2/ipsec-vpn-server

Your VPN login details will be randomly generated. See Retrieve VPN login details.

Alternatively, you may set up IPsec VPN without Docker. To learn more about how to use this image, read the sections below.

Community

Nội dung README thuộc về hwdsl2 và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/hwdsl2/docker-ipsec-vpn-server