Fast Docker container with OpenVPN Server living inside.
1.1K
Fast Docker container with OpenVPN Server living inside.
Forked from d3vilh/openvpn-server with security hardening, updated dependencies, and improved Docker configuration.
git clone https://github.com/ozon08/openvpn-server
cd openvpn-server
cp .env.example .env # add your admin credentials
docker compose up -d
| Variable | Description |
|---|---|
TRUST_SUB | Trusted subnet — full access to home network and internet (default: 10.0.70.0/24) |
GUEST_SUB | Guest subnet — internet only, no access to home network (default: 10.0.71.0/24) |
HOME_SUB | Your home/private subnet (default: 192.168.88.0/24) |
Admin credentials (OPENVPN_ADMIN_USERNAME, OPENVPN_ADMIN_PASSWORD) are stored in a .env file — never hardcoded in docker-compose.yml.
| Path | Description |
|---|---|
./pki | PKI certificates and keys |
./clients | Generated .ovpn client profiles |
./config | EasyRSA vars and client config template |
./staticclients | Static IP assignments per client |
./log | OpenVPN log files |
./server.conf | OpenVPN server configuration |
privileged: true removed from the openvpn container — Docker's default seccomp/AppArmor profiles are active, restricting dangerous syscalls (defense-in-depth vs. CVE-2026-31431 / Copy Fail and similar kernel LPEs)tls-auth enforced server-side — packets without valid HMAC are dropped127.0.0.1 onlyprivileged mode for either container.env, excluded from Git| Port | Protocol | Description |
|---|---|---|
1194 | UDP | OpenVPN |
8080 | TCP | OpenVPN UI (optional) |
Content type
Image
Digest
sha256:8a34f301c…
Size
11.1 MB
Last updated
6 days ago
docker pull ozon08/openvpn-server