No description
- Dockerfile 75.4%
- Shell 24.6%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| Dockerfile | ||
| ocserv.conf | ||
| radiusclient.conf | ||
| Readme.md | ||
| renovate.json | ||
| start.sh | ||
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_forwardsysctl inside containerNET_ADMINpermissions 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/ocpasswdmust 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