=== Radius Dictionary=== === Enable Counter Conf === vi /etc/freeradius/radiusd.conf Uncomment line: $INCLUDE sql/mysql/counter.conf Then further around line 710 in the instantiate section make sure you have: #chillispot_max_bytes max_all_mb noresetcounter === Enable Counters === vi /etc/freeradius/sites-available/default In Section authorize: authorize{ Uncomment: sql Uncomment: expiration Uncomment: daily Add: #chillispot_max_bytes max_all_mb noresetcounter dailycounter monthlycounter } In Section accounting: accounting{ Uncomment: daily } In Section post-auth: post-auth { Uncomment: sql } === Add Counter === FreeRadius SQL counter.conf settings needed To match the radcheck and radgroupchecks we use then you also need to add two matching counter.conf checks as follows. Edit the /etc/freeradius/sql/mysql/counter.conf file and in that at the end (unless the counter is already defined in that), add the following: vi /etc/freeradius/sql/mysql/counter.conf sqlcounter noresetcounter { counter-name = Session-Timeout check-name = Session-Timeout reply-name = Session-Timeout sqlmod-inst = sql key = User-Name reset = never query = "SELECT SUM(Acctsessiontime) FROM radacct WHERE UserName='%{%k}'" } sqlcounter chillispot_max_bytes { counter-name = ChilliSpot-Max-Total-Octets check-name = ChilliSpot-Max-Total-Octets reply-name = ChilliSpot-Max-Total-Octets sqlmod-inst = sql key = User-Name reset = never query = "SELECT SUM(AcctInputOctets) + SUM(AcctOutputOctets) FROM radacct WHERE UserName='%{%k}'" } sqlcounter max_all_mb { counter-name = Max-All-MB check-name = Max-All-MB reply-name = ChilliSpot-Max-Total-Octets sqlmod-inst = sql key = User-Name reset = never query = "SELECT SUM(AcctInputOctets)/(1024*1024) + SUM(AcctOutputOctets)/(1024*1024) FROM radacct WHERE UserName='%{%k}'" } Make sure that you have set the radiusd.conf "instantiate" section and in the /etc/freeradius/sites- enabled/default in the authorise section also has this set right as per the previous section to enable FreeRadius to use SQL and to use these counters. Restart Freeradius to check if no typo has messed up the radius-config. If neccessary start on commandline as root: freeradius -X to get debug output with a hint what is wrong. [[f11:technik:raspberrypi:hotspotdm3kb|Back to HotSpot Overview-Page]]