feat(freeradius): implement node pinning and dynamic IP allocation

- add node pinning logic in authorize (reject if wrong node)
- optimize SQL queries using control variables
- assign Pool-Name dynamically for engineers
- integrate sqlippool for dynamic IP allocation (engineers only)
- add Session-Timeout aligned with lease_duration
- fix duplicate sqlippool execution in post-auth/accounting
- configure sqlippool with NAS-IP scoping for multi-node isolation

Ensures correct routing, tenant isolation, and scalable IP management.
This commit is contained in:
2026-04-20 16:15:55 +02:00
parent fca66dfa52
commit 69a4e3a3b8
2 changed files with 45 additions and 15 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ sqlippool {
# That way the NAS will automatically kick the user offline when the
# lease expires.
#
lease_duration = 86400
lease_duration = 18000
#
# Timeout between each consecutive 'allocate_clear' queries (default: 1s)
@@ -76,7 +76,7 @@ sqlippool {
# pool_key = "%{NAS-Port}"
# pool_key = "%{Calling-Station-Id}"
pool_key = "%{User-Name}"
nas_ip_address = "%{NAS-IP-Address}"
################################################################
#
# WARNING: MySQL (MyISAM) has certain limitations that means it can