Configure freeradius with mysql

/etc/freeradius/radiusd.conf

edit the file /etc/freeradius/radiusd.conf

  1. Find the next two lines and uncomment them. After uncommenting them, they should look like the following:
$INCLUDE sql.conf 
$INCLUDE sql/mysql/counter.conf 
  1. Find the snippet instantiate {...} around line 710 and add the following inside it:
noresetcounter  

/etc/freeradius/sites-available/default

Edit the file /etc/freeradius/sites-available/default. We will do several changes here

  1. The first snippet is the authorize {...} snipper. Find the line files in this snippet and comment it out (around line 170).

  2. Find the sql line inside the session {...} snippet (around line 454) and enable it.

  3. Find the sql line inside the accounting {...} snippet (around line 406) and enable it.

  4. Find the sql line inside the authorize {...} snippet (around line 177) and enable it.

  5. After enabling the 'sql' line in the authorize {...} snippet add the next lines after 'sql' as follows:

sql  
chillispot_max_bytes  
noresetcounter  
comments powered by Disqus