RADIUSdesk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user_guide:simultaneous_limit [2021/10/06 20:28] – [There is a catch] adminuser_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 /etc/freeradius/mods-config/sql/main/mysql/queries.conf+vi /etc/freeradius/3.0/mods-config/sql/main/mysql/queries.conf
 </code> </code>
  
-  * The following section needs to be active+  * Look for this section 
 +<code bash> 
 +####################################################################### 
 +# Simultaneous Use Checking Queries 
 +####################################################################### 
 +# simul_count_query     - query for the number of current connections 
 +#                       - If this is not defined, no simultaneous use checking 
 +#                       - will be performed by this module instance 
 +# simul_verify_query    - query to return details of current connections 
 +#                               for verification 
 +#                       - Leave blank or commented out to disable verification step 
 +#                       - Note that the returned field order should not be changed. 
 +####################################################################### 
 +</code> 
 +  * 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 sessions a user has. 
 +        * 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, username, nasipaddress, nasportid, framedipaddress,+#               radacctid, acctsessionid, username, nasipaddress, nasportid, framedipaddress,
-                callingstationid, framedprotocol \ +#               callingstationid, framedprotocol \ 
-        FROM ${acct_table1} \ +#       FROM ${acct_table1} \ 
-        WHERE username = '%{SQL-User-Name}'+#       WHERE username = '%{SQL-User-Name}'
-        AND acctstoptime IS NULL"+#       AND acctstoptime IS NULL"
 </code> </code>
   * 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 
 </code> </code>