diff --git a/radiuscontroller/entrypoint.sh b/radiuscontroller/entrypoint.sh index ad68e66..9b8e0e7 100644 --- a/radiuscontroller/entrypoint.sh +++ b/radiuscontroller/entrypoint.sh @@ -34,9 +34,11 @@ fi # Generate FreeRADIUS EAP certificates if missing if [ ! -f /etc/freeradius/3.0/certs/server.pem ]; then echo "Generating FreeRADIUS EAP certificates..." - if [ -f /etc/freeradius/3.0/certs/bootstrap ]; then - /etc/freeradius/3.0/certs/bootstrap || true + cd /etc/freeradius/3.0/certs + if [ -f ./bootstrap ]; then + ./bootstrap || true fi + cd /app fi # Ensure correct permissions for FreeRADIUS config directory diff --git a/radiuscontroller/raddb/mods-enabled/eap b/radiuscontroller/raddb/mods-enabled/eap index 4b40382..273e5d2 100644 --- a/radiuscontroller/raddb/mods-enabled/eap +++ b/radiuscontroller/raddb/mods-enabled/eap @@ -5,27 +5,7 @@ eap { cisco_accounting_username_bug = no max_sessions = ${max_requests} - # PEAP Configuration - peap { - default_eap_type = mschapv2 - copy_request_to_tunnel = yes - use_tunneled_reply = yes - virtual_server = "inner-tunnel" - } - - # TTLS Configuration - ttls { - default_eap_type = mschapv2 - copy_request_to_tunnel = yes - use_tunneled_reply = yes - virtual_server = "inner-tunnel" - } - - # MSCHAPv2 Configuration - mschapv2 { - } - - # TLS Configuration for PEAP / TTLS + # TLS configuration section named "certs" tls-config certs { private_key_password = whatever private_key_file = ${certdir}/server.pem @@ -37,4 +17,26 @@ eap { tls_min_version = "1.0" tls_max_version = "1.2" } + + # PEAP configuration referencing tls-config certs + peap { + tls = certs + default_eap_type = mschapv2 + copy_request_to_tunnel = yes + use_tunneled_reply = yes + virtual_server = "inner-tunnel" + } + + # TTLS configuration referencing tls-config certs + ttls { + tls = certs + default_eap_type = mschapv2 + copy_request_to_tunnel = yes + use_tunneled_reply = yes + virtual_server = "inner-tunnel" + } + + # MSCHAPv2 configuration + mschapv2 { + } }