This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| user_guide:simultaneous_limit [2021/10/06 20:28] – [There is a catch] admin | user_guide:simultaneous_limit [2021/10/06 20:51] (current) – [Check if enabled] admin | ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| * Check if it is enabled in FreeRADIUS | * Check if it is enabled in FreeRADIUS | ||
| <code bash> | <code bash> | ||
| - | vi / | + | vi / |
| </ | </ | ||
| - | * The following | + | * Look for this section |
| + | <code bash> | ||
| + | ####################################################################### | ||
| + | # Simultaneous Use Checking Queries | ||
| + | ####################################################################### | ||
| + | # simul_count_query | ||
| + | # - If this is not defined, no simultaneous use checking | ||
| + | # - will be performed by this module instance | ||
| + | # simul_verify_query | ||
| + | # for verification | ||
| + | # - Leave blank or commented out to disable verification step | ||
| + | # - Note that the returned field order should not be changed. | ||
| + | ####################################################################### | ||
| + | </ | ||
| + | * Lets do a bit of explanation of these two items. | ||
| + | * In the FreeRADIUS config is a dedicated **session** section. | ||
| + | * If this section has **sql** specified, FreeRADIUS will initiate these queries (one or both) to try and determine the amount of active | ||
| + | * We are **NOT** using **simul_verify_query** and thus it needs to be commented out. | ||
| + | * If **simul_verify_query** is specified the FreeRADIUS program will try and contact the nas if possible to inquire directly from it the current session count for a user. For this it uses the **checkrad** program. | ||
| + | * We will thus comment **simul_verify_query** out to NOT use it. | ||
| <code bash> | <code bash> | ||
| - | # | ||
| - | # Uncomment simul_count_query to enable simultaneous use checking | ||
| - | # | ||
| simul_count_query = "\ | simul_count_query = "\ | ||
| SELECT COUNT(*) \ | SELECT COUNT(*) \ | ||
| Line 31: | Line 48: | ||
| AND acctstoptime IS NULL" | AND acctstoptime IS NULL" | ||
| - | simul_verify_query = "\ | + | #simul_verify_query = "\ |
| - | SELECT \ | + | # SELECT \ |
| - | radacctid, acctsessionid, | + | # radacctid, acctsessionid, |
| - | callingstationid, | + | # callingstationid, |
| - | FROM ${acct_table1} \ | + | # FROM ${acct_table1} \ |
| - | WHERE username = ' | + | # WHERE username = ' |
| - | AND acctstoptime IS NULL" | + | # AND acctstoptime IS NULL" |
| </ | </ | ||
| * Restart if you made changes | * Restart if you made changes | ||
| <code bash> | <code bash> | ||
| - | #14.04 | + | #20.04 |
| service freeradius stop | service freeradius stop | ||
| service freeradius start | service freeradius start | ||
| - | #16.04 | ||
| - | sudo systemctl restart freeradius.service | ||
| </ | </ | ||