FreeRadius #
FreeRadius is an implementation of RADIUS server, to be used for the user to login ocserv. For a better user management solution, we should to setup FreeRadius authentication with OpenLDAP.
This article will help you to integrat OpenLDAP with your FreeRadius Server.
PS
: You should to start up OpenLDAP server before than RADIUS server.
Setup #
mkdir radius && cd radius
touch docker-compose.yaml && nano docker-compose.yaml
docker-compose up -d
docker-compose.yaml #
version: '2'
services:
radius-server:
image: public.ecr.aws/motofansd/radius-ldap
container_name: radius
hostname: radius
domainname: "example.com"
tty: true
stdin_open: true
restart: always
environment:
LDAP_HOST: 'ldap.example.com'
LDAP_PORT: '389'
BASE_DN: 'dc=example,dc=com'
BIND_DN: 'cn=admin,dc=example,dc=com'
PASSWORD: 'youradminpassword'
USERS_DN: 'ou=people,dc=example,dc=com'
GROUP_DN: 'ou=group,dc=example,dc=com'
RD_SHAREKEY: 'yourradiussharekey'
ports:
- "1812:1812/udp"
- "1813:1813/udp"
Just need to modify it into your OpenLDAP server details.
If you want to build this image by yourself, you can find the Dockerfile from there.
FreeRadius Dockerfile