OpenRDX

RADIUS Server

The OpenRDX RADIUS server is implemented in Rust and provides high-performance authentication and accounting services.

Features

Configuration

Core Service

The RADIUS server is configured through environment variables:

# RADIUS settings
RADIUS_AUTH_PORT=1812
RADIUS_ACCT_PORT=1813
RADIUS_SECRET=your_shared_secret

# Database settings
DB_HOST=postgres
DB_PORT=5432
DB_NAME=openrdx
DB_USER=postgres
DB_PASSWORD=postgres

# MongoDB settings
MONGODB_URI=mongodb://mongodb:27017/radius_accounting

# Logging
LOG_LEVEL=info

RadSec Proxy

The RadSec proxy is configured through environment variables:

# RadSec settings
RADSEC_LISTEN_PORT=2083
RADSEC_TLS_CERT=/etc/radsecproxy/certs/server.crt
RADSEC_TLS_KEY=/etc/radsecproxy/certs/server.key
RADSEC_TLS_CA=/etc/radsecproxy/certs/ca.crt

Usage

Standard RADIUS

For standard RADIUS communication, clients should connect to UDP ports 1812 (authentication) and 1813 (accounting).

RadSec

For secure RADIUS communication over TLS:

  1. Configure your RADIUS client to use RadSec:
    radsec {
      server radsec.example.com:2083 {
        secret your_shared_secret
        tls {
          ca_file /path/to/ca.crt
          cert_file /path/to/client.crt
          key_file /path/to/client.key
        }
      }
    }
    
  2. The RadSec proxy will handle the TLS connection and forward requests to the core service.

Security Considerations

Monitoring

The RADIUS server provides detailed logging for:

Logs are stored in MongoDB for analysis and auditing.

NAS Device Configuration

NAS-Identifier Matching

The RADIUS server matches NAS devices primarily by NAS-Identifier (RADIUS attribute 32) extracted from authentication requests. This provides more reliable identification than IP-based matching alone.

Configuration:

  1. Each NAS device must have a unique nas_identifier configured in the database
  2. The NAS device sends its identifier in the NAS-Identifier attribute (32) in RADIUS requests
  3. The server matches the identifier to find the corresponding NAS device and secret

Benefits:

Fallback:

Troubleshooting

Common issues and solutions:

  1. Authentication failures:
    • Check shared secrets
    • Verify user credentials
    • Check certificate validity for EAP methods
    • For MS-CHAPv2: Check error messages for specific failure reasons
      • “Password incorrect or NT-Response validation failed” - Password mismatch
      • “Invalid NT-Response length” - Protocol error
      • “Missing peer-challenge” - Missing required MS-CHAPv2 attributes
  2. NAS matching issues:
    • Verify NAS-Identifier is configured in NAS device settings
    • Check that NAS device sends NAS-Identifier attribute (32) in requests
    • Verify NAS device is active in the database
    • Check logs for NAS matching details
  3. RadSec connection issues:
    • Verify TLS certificates
    • Check firewall rules
    • Ensure proper TLS version support
  4. Accounting problems:
    • Check MongoDB connection
    • Verify accounting port access
    • Check for duplicate session IDs
  5. MS-CHAPv2 specific issues:
    • Check that password is stored correctly (plain text for MS-CHAPv2)
    • Verify challenge/response lengths match expected values
    • Review debug logs for detailed authentication flow
    • Ensure MikroTik or other NAS device is configured to send MS-CHAPv2-Response correctly