All Projects → aliasmee → Alpine Ikev2 Vpn

aliasmee / Alpine Ikev2 Vpn

Licence: gpl-3.0
Small Simple Free runing container's IKEv2 VPN base alpine image.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Alpine Ikev2 Vpn

Docker Alpine
Docker containers running Alpine Linux and s6 for process management. Solid, reliable containers.
Stars: ✭ 574 (+166.98%)
Mutual labels:  alpine-linux, docker-container
docker-aws-s3-sync
Docker container to sync a folder to Amazon S3
Stars: ✭ 21 (-90.23%)
Mutual labels:  docker-container, alpine-linux
alpine-qbittorrent-openvpn
qBittorrent docker container with OpenVPN client running as unprivileged user on alpine linux
Stars: ✭ 230 (+6.98%)
Mutual labels:  docker-container, alpine-linux
Alpine Strongswan Vpn
Dockerfile and related configuration for setting up a roadwarrior IKEv2-based VPN
Stars: ✭ 74 (-65.58%)
Mutual labels:  alpine-linux, docker-container
Image Bootstrap
⛅️ Creates (chroots and) bootable virtual machine images; command line tool (Python 3)
Stars: ✭ 178 (-17.21%)
Mutual labels:  alpine-linux
Genealogy
Laravel 8 and Vue family tree and genealogy data processing website.
Stars: ✭ 153 (-28.84%)
Mutual labels:  docker-container
Docker Wordpress
WordPress container with Nginx 1.16 & PHP-FPM 7.3 based on Alpine Linux
Stars: ✭ 148 (-31.16%)
Mutual labels:  alpine-linux
Amazon Ecs Agent
Amazon Elastic Container Service Agent
Stars: ✭ 1,865 (+767.44%)
Mutual labels:  docker-container
Aws Containers Task Definitions
Task Definitions for running common applications Amazon ECS
Stars: ✭ 210 (-2.33%)
Mutual labels:  docker-container
Alpinewsl
Alpine Linux based WSL distribution. Supports multi-install. Lightest WSL distribution.
Stars: ✭ 203 (-5.58%)
Mutual labels:  alpine-linux
Docker Clion Dev
Debugging C++ in a Docker Container with CLion IDE
Stars: ✭ 172 (-20%)
Mutual labels:  docker-container
Drone Ssh
Drone plugin for executing remote ssh commands
Stars: ✭ 155 (-27.91%)
Mutual labels:  docker-container
Wflow
🐆 EXPERIMENTAL -- Runs GitHub Actions workflows locally (local) -- Don't run your YAML like a 🐪
Stars: ✭ 187 (-13.02%)
Mutual labels:  docker-container
Pieman
Script for creating custom OS images for single-board computers
Stars: ✭ 149 (-30.7%)
Mutual labels:  alpine-linux
Openwisp Radius
Administration web interface and REST API for freeradius 3 build in django & python. Supports captive portal authentication, WPA Enerprise (802.1x), freeradius rlm_rest, social login, Hotspot 2.0 / 802.11u, importing users from CSV, registration of new users and more.
Stars: ✭ 206 (-4.19%)
Mutual labels:  radius
Media Docker
all-in-one deployment and configuration for an all-in-one media server, running on docker.
Stars: ✭ 148 (-31.16%)
Mutual labels:  docker-container
Ha Dockermon
A NodeJS RESTful API which can be used with Home Assistant to report the state of Docker Containers
Stars: ✭ 171 (-20.47%)
Mutual labels:  docker-container
Allure Docker Service
This docker container allows you to see up to date reports simply mounting your "allure-results" directory in the container (for a Single Project) or your "projects" directory (for Multiple Projects). Every time appears new results (generated for your tests), Allure Docker Service will detect those changes and it will generate a new report automatically (optional: send results / generate report through API), what you will see refreshing your browser.
Stars: ✭ 194 (-9.77%)
Mutual labels:  docker-container
Docker Postfix
Simple SMTP server / postfix null relay host for your Docker and Kubernetes containers. Based on Alpine Linux.
Stars: ✭ 163 (-24.19%)
Mutual labels:  docker-container
Threagile
Agile Threat Modeling Toolkit
Stars: ✭ 162 (-24.65%)
Mutual labels:  docker-container

A runing IKEv2 VPN's container on alpine linux system

Overview

Let the IKEv2 vpn service run in the Docker container, do not need too much configuration, you just take the mirror on the Docker server, then run a container, the container generated certificate copy installed on your client, you can connect vpn The server. Welcome everyone's discussion!😊

Features

  • based on alpine image and Using supervisor to protect the IPSec process
  • StrongSwan provides ikev2 VPN service
  • In addition to Android and Linux, but other devices(Winodws 7+,Mac,iOS) by default comes with IKEv2 dial clients
  • When the container is run, the certificate file is dynamically generated based on the environment variable (last version)
  • Combined with Freeradius achieve Authentication, authorization, and accounting (AAA) (Done -> v0.1)

Prerequisites

  • The host can use physical machines, virtual machines, and VPS.
  • The host machines and containers must be opened within ip_forward (net.ipv4.ip_forward)
  • The host machines Install Docker engine.
  • Support eap authentication radius server(EAP-RADIUS)

Usage examples

Install From Script recommended approach

  1. As follows
# ./onekey_run_vpnserver.sh 'new_vpnuser' 'new_password'

$1: vpn user

$2: vpn password

WARNING: As root privileged running

Install From Git source

  1. Make a Image

[Method 1] Using git source code

# git clone https://github.com/aliasmee/alpine-ikev2-vpn.git

build image:

# cd alpine-ikev2-vpn/
# docker build -t ikev2 .

[Method 2] Using docker pull download images to the local from dockerhub

# docker pull hanyifeng/alpine-ikev2-vpn

After building the image, run docker run command.

  1. Start the service with the following command (Support radius AAA)
  • eap-mschapv2 mode
# docker run --restart=always -itd --privileged -v /lib/modules:/lib/modules -e HOST_IP='Your's Public network IP' -e VPNUSER=jack -e VPNPASS="jack&opsAdmin" -p 500:500/udp -p 4500:4500/udp --name=ikev2-vpn ikev2

HOST_IP: Public network must be your host IP

VPNUSER & VPNPASS : The function is to customize the user name and password to connect to the VPN service.[Optional env]

Defalut vpnuser is testUserOne,passwd is testOnePass

  • eap-radius mode
# docker run -itd --privileged -v /lib/modules:/lib/modules -e HOST_IP='Your's Public network IP' -e ACCOUNTING='yes' -e RADIUS_PORT='1812' -e RADIUS_SERVER='Your's radius server IP' -e RADIUS_SECRET='xxxxxxx' -e EAP_TYPE='eap-radius' -p 500:500/udp -p 4500:4500/udp --name=ikev2-vpn ikev2

ACCOUNTING: eap-radius mode Required.Value must be 'yes'

RADIUS_PORT: radius server running port. Required.

RADIUS_SERVER: radius server ip. Required.

RADIUS_SECRET: radius nas client psk. Required.

EAP_TYPE: ikev2 auth mode. Required.

  1. Use the following command to generate the certificate and view the certificate contents
# docker exec -it ikev2-vpn sh /usr/bin/vpn
net.ipv4.ip_forward = 1
ipsec: stopped
ipsec: started
Below the horizontal line is the content of the certificate. Copy the content to a file in the .cert suffix format. Such as: vpn.cert
______________________________________________________________
-----BEGIN CERTIFICATE-----
MIIDKjCCAhKgAwIBAgIIFsVYBZlPYyQwDQYJK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1. Copy this certificate to the remote client and name it xxx.cert or xxx.cert(Note:Windows need to modify the suffix pem for cer can be installed) example:

  2. Connect vpn it! Open the network settings, create a new IKEv2 protocol VPN, enter the default VPN account and password, or use the custom user that starts the container to connect to VPN.

Create new VPN method is not described here ^_^.

Other Tips

  1. If you want to add VPN users, you can run the following command to enter the container and edit the ipsec.secrets file.
# docker exec -it ikev2-vpn bash
bash-4.3# vi /usr/local/etc/ipsec.secrets

Pattern example:

testUserOne %any : EAP "testOnePass"
testUserxxx %any : EAP "testpass"
bash-4.3# ipsec rereadsecrets

Plan list

  • Dynamically generated based on the environment variable (Completed)
  • Support one-click installation (Completed)
  • AAA Integrate Radius provides centralized Authentication, Authorization, and Accounting (Completed)
  • Clients can connect without having to install a certificate
  • Support for adding and deleting user functions

Currently supported client device

Only test for the following client device system,You can test on the other system versions and feedback !
Mac: 10.11.4
iOS: 10.2
Windows: 10
Centos: 6.8
Android:(Download strongSwan APK)

Authors

Name: aliasmee

Licensing

This project is licensed under the GNU General Public License - see the LICENSE.md file for details

Acknowledgments

https://www.strongswan.org/

Stargazers over time

Stargazers over time

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].