new table and query

Alan Buxey alan.buxey at gmail.com
Thu Aug 31 18:16:41 CEST 2017


..or use postgresql which understands MAC addresses and will store
them all normalised no matter what horrendous format the NAS sends
them as :)

alan

On 31 August 2017 at 13:17, Dom Latter <freeradius-users at latter.org> wrote:
> On 31/08/17 13:07, Johansson, Daniel (GIS) wrote:
>> Hi and thanks for your answers.
>>
>> I do this now and it works fine.
>
> Hi,
>
> You've not stated what your goal with "authorizedmacs" is but for
> what it's worth we implemented a per-user MAC address limit by
> storing their authorised MAC addresses in the radcheck table like
> so:
>
> Calling-Station-Id    =~    0C-74-C2-46-56-A5|60-C5-47-00-88-9A|.*
>
> and we have a post-authentication script which will add new MACs to
> radcheck if they have not reached the limit, and email the user
> (and reject the authentication) if they have.  (Originally we were
> going to remove the wildcard once they had got to their limit, which is
> why it has been done like this.  If I were starting again I probably
> would have kept them in the "userinfo" table where we keep email address
> and so on).
>
> On the other hand if you are just storing MAC Addresses then you might
> want to consider storing them as 32 bit integers rather than as strings.
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list