Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
radius:rad_kick [2024/02/13 04:18] systemradius:rad_kick [2024/02/13 04:47] (current) system
Line 1: Line 1:
 +<nav type="pills" justified="false">
 +  * [[:user_manuals|Back to Documentation]]
 +  * [[:radius:rad_kick|Disconnecting Active RADIUS Users]]
 +</nav>
 +
 +-----
 +
 ====== Disconnecting Active RADIUS Users ====== ====== Disconnecting Active RADIUS Users ======
 ===== Introduction ===== ===== Introduction =====
-  * The RADIUS protocol uses UDP to communicate between the client and the server. +  * The RADIUS protocol uses UDP for communication between the client and the server. 
-  * The client initiates all communication and the server simply replies+  * The client initiates all communication and the server simply responds
-  * There are however times when the need arise for the server to initiate communication to the client. +  * However, there are situations where the server must initiate communication with the client. 
-  * A typical example will be when there is need to disconnect an active user. +  * A typical example is the need to disconnect an active user. 
-  * Since January 2023 RADIUSdesk introduced an update that will allow you do send disconnect requests to RADIUS Clients in order to disconnect active users.+  * Since January 2023RADIUSdesk has introduced an update that allows you to send disconnect requests to RADIUS clients to disconnect active users.
  
 ===== Some technical information ===== ===== Some technical information =====
-  * In order for the RADIUS server to communicate with the RADIUS Client we need determine two things.+  * In order for the RADIUS server to communicate with the RADIUS Client we need to determine two things.
         * The type of client.         * The type of client.
-        * The type of client in turn will determine how we will communicate with the RADIUS Client.+        * The type of client in turn determines how we communicate with the RADIUS client.
    * We currently support two types of clients.     * We currently support two types of clients. 
         * CoovaChilli (Used by MESHdesk and APdesk)         * CoovaChilli (Used by MESHdesk and APdesk)
         * Mikrotik         * Mikrotik
-   In the rest of the document we will discuss how the RADIUSdesk system communicate with these two types of clients. +   Later in the document we will discuss how the RADIUSdesk system communicates with these two types of clients. 
-   * We will also take a look where to make changes in order to add support for additional types of RADIUS Clients.+   * We will also look at where we need to make changes to add support for more RADIUS clients.
 ==== CoovaChilli on MESHdesk and APdesk ==== ==== CoovaChilli on MESHdesk and APdesk ====
-  * MESHdesk and APdesk automatically adds an associated RADIUS Client when adding a Captive Portal exit point+  * MESHdesk and APdesk automatically add an associated RADIUS client when you add a Captive Portal Exit Point
-  * This RADIUS Client will have the type of **Coova-On-Meshdesk**.+  * This RADIUS client is of type Coova-On-Meshdesk.
 <panel type="primary"> <panel type="primary">
 {{:radius:radius_clients:radius_client_coova.png?nolink|}} {{:radius:radius_clients:radius_client_coova.png?nolink|}}
 </panel> </panel>
-  * Disconnecting a user will then utilize the ///var/www/rdcore/cake4/rd_cake/src/Controller/Component/KickerComponent.php// component to contact the AP with instructions to disconnect the user. +  * When a user is disconnected, the component ///var/www/rdcore/cake4/rd_cake/src/Controller/Component/KickerComponent.php// is then used to contact the AP with the instructions to disconnect the user. 
-  * When the MQTT mechanism is implemented disconnecting will be in real-time. +  * If the MQTT mechanism is implemented, the disconnection takes place in real time. 
-  * Without the MQTT mechanism disconnecting a user will take up to one minute. +  * Without the MQTT mechanismdisconnecting a user takes up to one minute. 
-  * The disconnect command used on CoovaChilli will be **chilli_query logout mac <MAC Address>**+  * The command used on CoovaChilli to disconnect is **chilli_query logout mac <MAC Address>**
  
 ==== Mikrotik ==== ==== Mikrotik ====
-  * With the Mikrotik RADIUS Clients we make use of the **RouterOS API Client** to communicate with the Mikrotik. (https://github.com/EvilFreelancer/routeros-api-php) +  * For Mikrotik'RADIUS clients, we use the **RouterOS API** client to communicate with Mikrotik. (https://github.com/EvilFreelancer/routeros-api-php) 
-  * This library is already included with RADIUSdesk. +  * This library is already included in RADIUSdesk. 
-  * Many times there will be a NAT connection between the Mikrotik and the RADIUSdesk server preventing the server to reach the Mikrotik directly. +  * Often there is a NAT connection between the Mikrotik and the RADIUSdesk server, so that the server cannot reach the Mikrotik directly. 
-  * Mikrotik fortunately supports a large amount of VPN technologies which you can choose from.+  * Fortunately, Mikrotik supports a large number of VPN technologies from which you can choose.
   * https://help.mikrotik.com/docs/display/ROS/Virtual+Private+Networks   * https://help.mikrotik.com/docs/display/ROS/Virtual+Private+Networks
-  * If needed, please select one of your choosingSetting them up is well documented in the Mikrotik documentation in the link above. +  * Please select one of your choice if requiredThe setup is well documented in the Mikrotik documentation at the link above. 
-  * When adding a RADIUS Client and selecting the **Mikrotik-API** type you will be presented with a dialog to supply the detail for the API connection to the Mikrotik.+  * When you add a RADIUS client and select the **Mikrotik API** typea dialog will appear where you need to specify the details for the API connection to Mikrotik.
 <panel type="primary"> <panel type="primary">
 {{:radius:radius_clients:radius_client_mikrotik_api.png?nolink|}} {{:radius:radius_clients:radius_client_mikrotik_api.png?nolink|}}
 </panel> </panel>
  
-  * There is also a **Test API Connection** button which allows you to confirm that the API communication to the Mikrotik is indeed working. +  * There is also a Test API connection button that you can use to confirm that the API communication with the Mikrotik is actually working. 
-  * In the screenshot above you can see part of the reply from the Mikrotik indicating that the communication via the API is established and good. +  * In the screenshot aboveyou can see part of the response from Mikrotik indicating that the API communication is established and good. 
-  * We also added a Mikrotik API button to the toolbar for RADIUS Clients.+  * We have also added a Mikrotik API button to the toolbar for RADIUS clients.
 <panel type="primary"> <panel type="primary">
 {{:radius:radius_clients:radius_client_api_button.png?nolink|}} {{:radius:radius_clients:radius_client_api_button.png?nolink|}}
 </panel> </panel>
  
-  * The button is disabled by default and becomes enabled when you select a RADIUS Client of type **Mikrotik-API**. +  * The button is disabled by default and is enabled when you select a **Mikrotik API** type RADIUS client
-  * Selecting it will open a new tab with two sub-tabs. One listing active **Hotspot** users and the other listing active **PPPoE** users. +  * When you select ita new tab with two sub-tabs opens. One contains the active hotspot users and the other contains the active PPPoE users. 
-  * You can select and disconnect listed users in those sub-tabs.+  * In these sub-tabs, you can select the listed users and disconnect them
 <panel type="primary"> <panel type="primary">
 {{:radius:radius_clients:radius_client_api_tab.png?nolink|}} {{:radius:radius_clients:radius_client_api_tab.png?nolink|}}
Line 54: Line 61:
  
 ===== Add Support for additional types ===== ===== Add Support for additional types =====
-  * This section is a technical section for those who wants to introduce new RADIUS Client types. +  * This section is a technical section for those who want to introduce new RADIUS client types. 
-  * The list in the drop-down is specified in the following file: ///var/www/rdcore/cake4/rd_cake/config/RadiusDesk.php//+  * The list in the drop-down list is specified in the following file: ///var/www/rdcore/cake4/rd_cake/config/RadiusDesk.php//
 <code php> <code php>
 //Define nas types //Define nas types
Line 62: Line 69:
 $config['nas_types'][2]     = ['name' => 'Mikrotik-API', 'id' => 'Mikrotik-API',    'active' => true]; $config['nas_types'][2]     = ['name' => 'Mikrotik-API', 'id' => 'Mikrotik-API',    'active' => true];
 </code> </code>
-  * Then when selecting an active user in **Activity Monitor** to disconnect behind the scenes the code will determine the type of RADIUS  Client based on the **nasidentifier** field. (This is in the radacct table and has to match the value in the dynamic-clients table) +  * If you then select an active user in **Activity Monitor** to disconnect behind the scenesthe code determines the type of RADIUS client based on the **nasidentifier** field.  (This field is located in the radacct table and must match the value in the dynamic-clients table) 
-  * This all happens inside the ///var/www/rdcore/cake4/rd_cake/src/Controller/Component/KickerComponent.php// file+  * This is all done within the file ///var/www/rdcore/cake4/rd_cake/src/Controller/Component/KickerComponent.php//
-  * Thus adding support for additional types will involve adding additional sections to the PHP code. +  * So if you want to add support for more types, you will need to add additional sections to the PHP code. 
-  * See the snippet below.+  * Take a look at the following snippet.
 <code php> <code php>
-//First we try to locate the client under dynamic_clients+//First we try to find the client under dynamic_clients
 $dc = $this->DynamicClients->find() $dc = $this->DynamicClients->find()
  ->where(['DynamicClients.nasidentifier' => $nasidentifier])  ->where(['DynamicClients.nasidentifier' => $nasidentifier])
Line 91: Line 98:
  
 </code> </code>
-  * That'the only things involved in disconnecting an active RADIUS user. +  * This is the only thing required to disconnect an active RADIUS user. 
-  * The FUP implementation also utilizes this mechanism so this also serve as a core component for the FUP implementation to be successful.+  * The FUP implementation also uses this mechanismso this is also a core component for the success of the FUP implementation.
  
  • radius/rad_kick.1707790731.txt.gz
  • Last modified: 2024/02/13 04:18
  • by system