Community discussions

 
Sigma721
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Sat Nov 19, 2011 5:47 pm

FreeRadius limits

Tue Nov 04, 2014 4:49 pm

Hi everyone

So I have spent a few days struggling with getting my FreeRadius up and running with Mikrotik hotspots. I need some help please(I have read through everything I can find online!). I have included the Mikrotik dictionary in my FreeRadius 2 set up.

All I am trying to achieve is the following:

A user must get x mb of data each day. The problem is that the user connects to the hotspot uses his/her data allowance, gets disconnected, then if he/she reconnects they get the same data allowance again(which should only be allowed the next day).

My current set up:

User name in radcheck with a password
User name in radreply with an attribute "Mikrotik-Group" which is = to a Hotspot Profile
User name in radreply with an attribute "Mikrotik-Xmit-Limit" which is = bytes limit

In counter.conf (which is included in radius.conf) I have the following:

sqlcounter mikrotik_max_bytes_withreset {
counter-name = Mikrotik-Xmit-Limit
check-name = Mikrotik-Xmit-Limit
reply-name = Mikrotik-Xmit-Limit
sqlmod-inst = sql
key = User-Name
reset = daily
query = "SELECT SUM(acctinputoctets) + SUM(acctoutputoctets) FROM radacct WHERE username='%{%k}'"
}


What am I doing wrong?
 
lambert
Long time Member
Long time Member
Posts: 532
Joined: Fri Jul 23, 2010 1:09 am

Re: FreeRadius limits

Wed Nov 05, 2014 5:51 am

Are you getting accounting data from the MikroTik to FreeRADIUS?
 
Sigma721
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Sat Nov 19, 2011 5:47 pm

Re: FreeRadius limits

Wed Nov 05, 2014 1:34 pm

Hi

Thanks for your reply.

Yes the radacct table is being populated. That what you asking?

Regards

Who is online

Users browsing this forum: No registered users and 119 guests