Modules - dictionary

Oscar Jofre oscar at jofre.com
Sat Feb 20 02:23:46 CET 2016


Thanks Alan,

Now I have working authorize timeout limit.

Resume in case someone need to know it:
	cd /etc/raddb/mods-enabled/
	ln -s ../mods-available/sqlcounter ./

	add into /etc/raddb/sites-available/default
	authorize {
 	…
	        dailycounter
	..
	}

	INSERT INTO radcheck(
		   id ,username  ,attribute  ,op  ,value
		) VALUES (
		   NULL -- id - IN int(11) unsigned
		  , 'username'
		  ,'Max-Daily-Session'
		  ,':='
		  ,'300' 
		);


	When user tries to log once reachet the time session message appears:
		'Your maximum daily usage time has been reached' 


I have configured my mikrotik-hotspots interim to 6 minutes.
I would like to know if is possible to close the user connection when interim if limit is reached.
I've tried to add on accounting { .. dailycounter .. } but I got this error
	"sqlcounter" modules aren't allowed in 'accounting' sections -- they have no such method.

Is there any possibility on accounting to kill user?



Is it possible to filter by callingstationid (mac address) instead of username ?
What I should change ? Where I can see possible Key values ?


Last think about groups I saw that radacct has groupname and I should use radgroupcheck but how parametrize to get radgroupcheck instead of radcheck ?


Thanks a lot !




-----Mensaje original-----
De: Freeradius-Users [mailto:freeradius-users-bounces+oscar=jofre.com at lists.freeradius.org] En nombre de Alan DeKok
Enviado el: jueves, 18 de febrero de 2016 3:45
Para: FreeRadius users mailing list
Asunto: Re: Modules - dictionary

On Feb 17, 2016, at 6:32 PM, Oscar Jofre <oscar at jofre.com> wrote:
> I'm trying to understand how to configure radius Time Limit, Data 
> download Limit, .. On a FreeRadius 3.0.10 using mysql and Mikrotik.

  It should be fairly simple.

> First of all I wold like to know about to configure mikrotik 
> dictionary
> (http://wiki.mikrotik.com/wiki/Manual:RADIUS_Client/vendor_dictionary)

  Don't do anything.  FreeRADIUS includes the mikrotik dictionary.

  Do NOT edit the dictionaries, or add that one.  It's not necessary.

> Where I should use the dictionary attributes on modules ?

  Any you need to send an attribute in a reply.

> Then on mods-available there is sqlcounter with some configurations.

  The server includes lots of modules.  They are all documented, and they all describe what they do.

> Is there any other examples somewhere ?

  Dozens.

  Read "man unlang", and then read raddb/sites-available/default.  There are LOTS of examples of adding and using attributes.

> And is it possible to create some group of users with deferents 
> restrictions

  Yes.  See the wiki for SQL.  You can put groups into SQL.  Or in LDAP.  Or in local files.

  Alan DeKok.



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




More information about the Freeradius-Users mailing list