On Sat, 16 Nov 2002, Remus Anca wrote:

>
> i want to use counter, for users time limit,
> but i want two type of limits:
> monthly, with counter reset=monthly, and users that pays by hours,
> with counter reset=never
>
> how can i combine this in section counter?
>
>         counter {
>                 filename = ${raddbdir}/db.counter
>                 key = User-Name
>                 count-attribute = Acct-Session-Time
>                 reset = never
>                 counter-name = RAD-Session-Time
>                 check-name = RAD-Max-Session-Time
> //can i use 'counter-name' and 'check-name' functions multiple times?
>                 allowed-servicetype = Framed-User
>                 cache-size = 5000
>         }
>
>
> i want to make this configuration to work in mysql, so, a config in
> users file, like this:
> (i want to reject joe if his SUM of connection time
> is over 10.000 sec. it's correct the next config?)
>
> joe Auth-Type = Local, Password == "joepw"
>         Service-Type == Framed-User, Framed-Protocol == PPP,
>         RAD-Session-Time < 10000,
>         Framed-Compression = Van-Jacobson-TCP-IP,
>         Fall-Through = yes

You should use multiple instances of the counter module, one with reset=monthly
and one with reset=never. You should use the check-name attribute in each case.
In other words:

counter monthly{
                filename = ${raddbdir}/db.monthly
                reset = monthly
                [...]
                check-name = RAD-Max-Monthly-Session-Time
}
counter never{
                filename = ${raddbdir}/db.never
                reset = never
                [...]
                check-name = RAD-Max-Session-Time
}

You then add the corresponding attributes (RAD-Max-Monthly-Session-Time and
RAD-Max-Session-Time) in mysql for ypur users

--
Kostas Kalevras         Network Operations Center
[EMAIL PROTECTED]      National Technical University of Athens, Greece
Work Phone:             +30 210 7721861
'Go back to the shadow' Gandalf


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

Reply via email to