Creating unique monthly counter entries

Ben Plimpton bplimpton at sopris.net
Thu Mar 16 00:53:13 CET 2006


Hello

I'm going to have users trying to authenticate with the same user name
from different nases and would like to keep unique monthly counter
entries based on what huntgroup they login from.  So, what I would like
to know if either of the following is possible:

1) Can I have my monthly counter run only on accounting packets received
from a certain NAS?

or

2) Can I run attr_rewrite only on accounting packets received from
certain nases or huntgroups and leave all others untouched?  

If this solution is possible, I would like to change the username from
whatever it comes in as to username at huntgroup but I don't know if that's
possible since huntgroup is not an attribute that is contained in the
accounting packets.  I tried changing it using attr_rewrite using this
line:

replacewith = %{Stripped-User-Name}@%{NAS-Identifier}  

but this won't work b/c we want to limit some dialup users to 10 hrs/mo
but they can dialup to many different nases so they would end up getting
a different entry in the counter for each different nas that they dialed
into and would not get cut off properly.

I have tried to use the acct_users file to set the huntgoup but cannot
figure out how to pass that information on to the counter module.

Please help point me in the right direction or if there is a better way
to do this, please let me know.

Thank you

-- 
"Microsoft is not the answer, it's the question.  NO is the answer."

Ben Plimpton
Network Engineer
bplimpton at sopris.net
970-963-SURF(7873) ext 5174
www.sopris.com



More information about the Freeradius-Users mailing list