Freeradius to use SQL table instead of client.conf

Alan Smith asmith7724 at myyahoo.com
Wed Jul 17 13:41:28 UTC 2024


 Hi Alan DeKok,
Thank you for the explanation. Previously I meant, I updated the site file I used, mysite, to make use of SQL query to update control in the authorize section.
Then radiusd is started in debug mode. Initially, the client is not added in the SQL table. When I try radtest, I would encounter unknown client.
I add the client details in SQL table and try radtest again. It was not reflecting. That was the previous situation.
As of now,I have updated mysite with client dynamic info. It seems like the new client details can found in the SQL table in the above scenario.
However, radiusd -X will stop at this point and service seems like stops responding (radtest command will time out.) 

The last lines of the output are as follows.

(0) Converting control list to client fields
(0)   ipv4addr = 10.11.190.48
(0)   secret = ABCD1234
(0)   shortname = Hwineg
(0)   nas_type = Other
(0)   nas_type = Other



    On Wednesday, 17 July 2024 at 08:19:33 pm SGT, Alan DeKok <aland at deployingradius.com> wrote:  
 
 On Jul 17, 2024, at 6:14 AM, Alan Smith via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> 
> Thank you Bjorn. I followed the one from this link as I want to continue using SQL table. 
> 
> https://github.com/FreeRADIUS/freeradius-server/blob/d3fc9b6e76aef3fd3358210caadd97a5d46754c0/raddb/sites-available/dynamic-clients#L153
> I have updated the query shown in Example 3 reflecting my table name. It still does not reflect when there is a change in the table. 

  Please read the documentation, including the dynamic-clients link you posted above.

  The server does NOT update the client list whenever a change is made in the table.  Instead, it works as documented.

  i.e. when a packet from a new client comes in, the server runs the "dynamic-client" file you noted above.  The configuration in that file will query SQL, and create a new dynamic client.

  This is all extensively documented in the comments in that configuration file.  Nothing in that documentation says "just add a new row to the SQL table, and the server will automatically pick it up, without any other action being taken".

  Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
  


More information about the Freeradius-Users mailing list