mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-02-03 13:21:49 +02:00
ocserv
OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to be a secure, small, fast and configurable VPN server.
docker-compose.yml
ocserv:
image: vimagick/ocserv
ports:
- "4443:443/tcp"
- "4443:443/udp"
environment:
- VPN_DOMAIN=vpn.easypi.info
- VPN_NETWORK=10.20.30.0
- VPN_NETMASK=255.255.255.0
- VPN_USERNAME=username
- VPN_PASSWORD=password
cap_add:
- NET_ADMIN
restart: always
- ⚠️ Please choose a strong password to protect VPN service.
- These environment variables are used to generate config files/keys.
- VPN accounts can be managed via ocpasswd command.
- You can edit the config file /etc/ocserv/ocserv.conf, then restart service.
up and running
$ docker-compose up -d
$ docker-compose exec ocserv bash
>>> cd /etc/ocserv/
>>> ocpasswd -c /etc/ocserv/ocpasswd username
Enter password: ******
Re-enter password: ******
>>> exit
$ docker cp ocserv_ocserv_1:/etc/ocserv/certs/client.p12 .
$ docker-compose logs -f
android client
There are two auth types:
- 👎 passwd: type everytime
- 👍 certificate: import once
AnyConnect ->
Connection ->
Add New VPN Connection... ->
Advanced Preferences... ->
Certificate ->
Import ->
File System