Sign inSign up

okernet/radius

By okernet

•Updated 2 months ago

FreeRADIUS server for Radius Proxy with REST API authentication

Image
0

2.2K

okernet/radius repository overview

⁠FreeRADIUS Server for Radius Proxy

Pre-configured FreeRADIUS server that integrates with the okernet/radius-proxy⁠ REST API for authentication. Supports PAP, CHAP, and MS-CHAPv2 authentication protocols.

⁠Quick Start

This image is designed to work with the okernet/radius-proxy REST API. Use Docker Compose for the recommended setup.

curl -O https://raw.githubusercontent.com/okernet/radius-proxy/main/docker-compose.prod.yml

Create a .env file with your configuration (see below), then:

docker compose -f docker-compose.prod.yml up -d

⁠Standalone Usage

If running separately from the REST API:

docker run -d \
  --name radius \
  -p 1812:1812/udp \
  -p 1813:1813/udp \
  -e REST_BASE_URL=http://rest-api-host:3080 \
  -e REST_AUTH_ENDPOINT=/radius/auth \
  -e REST_ACCT_ENDPOINT=/radius/accounting \
  -e REST_API_HEADER_NAME=X-API-Key \
  -e REST_API_KEY=your-api-key \
  -e RADIUS_CLIENT_IP=0.0.0.0 \
  -e RADIUS_CLIENT_SECRET=your-shared-secret \
  okernet/radius

⁠Environment Variables

VariableDescriptionDefault
REST_BASE_URLBase URL of the REST APIRequired
REST_AUTH_ENDPOINTAuthentication endpoint path/radius/auth
REST_ACCT_ENDPOINTAccounting endpoint path/radius/accounting
REST_API_HEADER_NAMEHeader name for API keyX-API-Key
REST_API_KEYAPI key for REST API authenticationRequired
RADIUS_CLIENT_IPAllowed RADIUS client IP (use 0.0.0.0 for any)0.0.0.0
RADIUS_CLIENT_SECRETShared secret for RADIUS clientsRequired
RADIUS_LISTEN_IPIP address to listen on0.0.0.0
RADIUS_AUTH_PORTAuthentication port1812
RADIUS_ACCT_PORTAccounting port1813
FREERADIUS_DEBUGEnable debug logging (0 or 1)0

⁠Ports

PortProtocolDescription
1812UDPRADIUS Authentication
1813UDPRADIUS Accounting

⁠RADIUS Client Configuration

Configure your RADIUS clients (routers, access points, VPN concentrators) with:

SettingValue
Server IPYour Docker host IP
Authentication Port1812 (UDP)
Accounting Port1813 (UDP)
Shared SecretValue of RADIUS_CLIENT_SECRET
ProtocolPAP, CHAP, or MS-CHAPv2
⁠MikroTik Example
/radius
add address=<radius-server-ip> secret=<RADIUS_CLIENT_SECRET> service=hotspot,login,ppp

/ip hotspot profile
set default use-radius=yes

⁠Supported Architectures

  • linux/amd64
  • linux/arm64

⁠Source Code

GitHub: https://github.com/okernet/radius-proxy⁠

The FreeRADIUS configuration files are located in the radius/ directory.

⁠License

GNU General Public License v3.0 - See LICENSE⁠ for details.

Tag summary

Content type

Image

Digest

sha256:1769bce4b…

Size

86.2 MB

Last updated

2 months ago

docker pull okernet/radius