malt_dp
malt_dp

Reputation: 17

Freeradius accounting filter

How to configure accounting filter? For example, there are two types of users:

    [email protected]
    [email protected]
    123qwer-user

It is necessary that only the user [email protected] and [email protected]. I have tried to write regex to the accounting section, but it didn’t work.

Upvotes: 0

Views: 162

Answers (1)

Geeky Patil
Geeky Patil

Reputation: 26

You can use string filter with "=~" in if condition of the authorize section. Note that you can only apply this to only string so use attribute value in string like %{User-Name}

you can use simple regular expression like "[\w-]+@([\w-]+.)+[\w-]+" for comparison

I do not have an instance running currently to try, Will spin one soon and try and update the actual condition.

Hope this helps.

Upvotes: 1

Related Questions