No description
  • Dockerfile 75.4%
  • Shell 24.6%
Find a file
Jonas Leder ab4bbd5a1d
All checks were successful
ci / build (push) Successful in 5m28s
ci / docker (push) Successful in 0s
CI: port GitLab pipeline to Forgejo Actions
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 10:47:37 +01:00
.forgejo/workflows CI: port GitLab pipeline to Forgejo Actions 2026-11-18 10:47:37 +01:00
Dockerfile Update alpine Docker tag to v3.24.4 2026-11-05 23:29:18 +00:00
ocserv.conf update docker 2025-11-16 12:21:35 +01:00
radiusclient.conf template config files 2025-11-15 12:04:14 +01:00
Readme.md add readme file 2025-11-16 12:52:40 +01:00
renovate.json add renovate configuration 2025-11-16 12:57:30 +01:00
start.sh remove comment 2025-11-16 13:00:02 +01:00

Openconnect VPN Server Docker

This container bundels a minimal setup to run a OpenConnect VPN Server as container. To get the container running on Kubernetes you need a few configurations to the pod:

  • net.ipv4.ip_forward sysctl inside container
  • NET_ADMIN permissions for managing the VPN Device
  • Access to /dev/net/tun

Setup the container

The configuration of the container can be mostly done using environment variables:

Env name Example Description
IPV4_SUBNET 10.0.0.0/24 IPv4 Subnet for the VPN client IPs
IPV6_SUBNET fc00::/64 IPv6 Subnet for the VPN client IPs
ROUTES 10.0.0.0/8,192.168.0.0/16 Comma seperated list of IPv4 routes to push to the client

Beside the environment variables there are a few files required for the server to work:

  • In /config/certs/ must be a tls.crt and a tls.key file mounted, for example from Cert-Manager
  • In /config/ocpasswd must be the credentials file for the VPN mounted

Creating the credentials file

In the container is the ocpasswd CLI tool, this can be used to create a new user, afterwards the file has to be copied into a secret and mounted in the container:

ocpasswd -c /tmp/ocpasswd username