Sign inSign up

chimadan/ocserv-radcli

By chimadan

•Updated 8 months ago

ocserv + radcli (RADIUS auth for MikroTik User Manager)

Image
Networking
Security
1

1.3K

chimadan/ocserv-radcli repository overview

⁠OpenConnect (ocserv) with RADIUS for MikroTik

This Docker image provides OpenConnect VPN (ocserv) with RADIUS authentication, built specifically for MikroTik RouterOS containers and MikroTik User Manager integration.

⁠Included in the image

  • ocserv, built from source with RADIUS authentication support
  • radcli for RADIUS authentication and accounting
  • Automatic ocserv configuration based on environment variables

This setup allows MikroTik to act as a central authentication and accounting server for VPN users.

⁠Designed for MikroTik RouterOS Containers

This image is intended to run directly on MikroTik RouterOS using the built-in Container feature.

⁠Key points
  • Authentication is handled by MikroTik User Manager
  • No local users inside the container
  • RADIUS Accounting Start/Stop is sent to MikroTik
  • Suitable for ISP and enterprise VPN deployments

⁠Environment variables

See the full list of supported environment variables on GitHub:

https://github.com/MrChimadan/ocserv_radcli_docker_mikrotik.git⁠

⁠Example: MikroTik RouterOS container configuration

/container add \
    check-certificate=no \
    dns=1.1.1.1 \
    envlists=ocserv \
    hostname=www.exzepmpl.com \
    interface=veth1 \
    layer-dir=/containers/layer \
    name=ocserv-radcli \
    remote-image=chimadan/ocserv-radcli:v0.0.8 \
    root-dir=/containers/ocsrv/root \
    start-on-boot=yes \
    workdir=/etc/ocserv

/container config set \
    layer-dir=/containers/layer \
    registry-url=https://registry-1.docker.io \
    tmpdir=/containers/pull

/container envs add key=HC_CA_CN list=ocserv value="VPN CA"
/container envs add key=HC_CA_DAYS list=ocserv value=9999
/container envs add key=HC_CA_ORG list=ocserv value="My Corp"

# RADIUS configuration
/container envs add key=HC_RAD_SECRET list=ocserv value=sharedsrctetkey
/container envs add key=HC_RAD_SRV list=ocserv value=172.16.10.1

# Server certificate
/container envs add key=HC_SRV_CN list=ocserv value=www.exzepmpl.com
/container envs add key=HC_SRV_DAYS list=ocserv value=9999
/container envs add key=HC_SRV_ORG list=ocserv value="My Company"

# VPN network
/container envs add key=HC_VPN_NET list=ocserv value=172.16.20.0/24

Tag summary

Content type

Image

Digest

sha256:ae865c91f…

Size

11.4 MB

Last updated

8 months ago

docker pull chimadan/ocserv-radcli:v0.0.8