Rule for don't log specific user session.
Hello, Is there a way to don't log nothing for a specific user, creating a rule in sql_log? You will probably ask me why! Because i have a plugin running on nagios, that checks for authentication with a specific user ex: "testuser" every 5 minutes, and at the end of the day my database grows with useless information. We are a global hotspot provider, so this check running on nagios is performed in 10.000 hotspots, to test for authentication, so you could imagine that this "testuser" generates infinite registers. I think put some kind of trigger to do that, will probably slow down my server performance, because we have a huge users database. I'm running freeradius(1.1.7) + postgre. Regards, Rafael Medici
Hello Rafael, It should be possible in Freeradius 2 and using unlang language: if (User-Name != "test-user") { sql_log } Regards, Vincent M. Rafael Medici <rafael.medici@vexcorp.com> a écrit :
Hello,
Is there a way to don't log nothing for a specific user, creating a rule in sql_log?
You will probably ask me why!
Because i have a plugin running on nagios, that checks for authentication with a specific user ex: "testuser" every 5 minutes, and at the end of the day my database grows with useless information. We are a global hotspot provider, so this check running on nagios is performed in 10.000 hotspots, to test for authentication, so you could imagine that this "testuser" generates infinite registers.
I think put some kind of trigger to do that, will probably slow down my server performance, because we have a huge users database.
I'm running freeradius(1.1.7) + postgre.
Regards,
Rafael Medici
Vincent Magnin wrote:
Hello Rafael,
It should be possible in Freeradius 2 and using unlang language:
if (User-Name != "test-user") { sql_log }
In previous versions, you can use Acct-Type: preacct { files } accounting { Acct-Type SQL-LOG { sqllog } } ...then in "acct_users": nagios .... Fall-Through = Np DEFAULT Acct-Type := SQL-LOG
Regards,
Vincent M.
Rafael Medici <rafael.medici@vexcorp.com> a écrit :
Hello,
Is there a way to don't log nothing for a specific user, creating a rule in sql_log?
You will probably ask me why!
Because i have a plugin running on nagios, that checks for authentication with a specific user ex: "testuser" every 5 minutes, and at the end of the day my database grows with useless information. We are a global hotspot provider, so this check running on nagios is performed in 10.000 hotspots, to test for authentication, so you could imagine that this "testuser" generates infinite registers.
I think put some kind of trigger to do that, will probably slow down my server performance, because we have a huge users database.
I'm running freeradius(1.1.7) + postgre.
Regards,
Rafael Medici
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
With this it wouldn't be that hard to separate the information for a specific subscriber or group into a separate log file would it. Assuming that the two log options are appropriately configured: Fr 2.x if( User-Name != "test-user" { # will (Group-Name != 'test-group" ) { work? User_log } else { Test_log } Or FR 1.x preacct { files } accounting { Acct-Type SQL-LOG { User_log } Acct-Type TEST-LOG { Test_log } } ...then in "acct_users": Test-user Acct-Type := TEST-LOG Fall-Through = No DEFAULT Acct-Type := SQL-LOG Is there an equivalent way to do this using sql? Ie radreply/radgroupreply? Also, will this take care of both accounting log info and authentication log info? Ben Wiechman Network Admin Wisper High Speed Internet ben@wisper-wireless.com
-----Original Message----- From: freeradius-users-bounces+ben=wisper- wireless.com@lists.freeradius.org [mailto:freeradius-users- bounces+ben=wisper-wireless.com@lists.freeradius.org] On Behalf Of Phil Mayers Sent: Tuesday, March 11, 2008 6:13 AM To: FreeRadius users mailing list Subject: Re: Rule for don't log specific user session.
Vincent Magnin wrote:
Hello Rafael,
It should be possible in Freeradius 2 and using unlang language:
if (User-Name != "test-user") { sql_log }
In previous versions, you can use Acct-Type:
preacct { files } accounting { Acct-Type SQL-LOG { sqllog } }
...then in "acct_users":
nagios .... Fall-Through = Np
DEFAULT Acct-Type := SQL-LOG
Regards,
Vincent M.
Rafael Medici <rafael.medici@vexcorp.com> a écrit :
Hello,
Is there a way to don't log nothing for a specific user, creating a rule in sql_log?
You will probably ask me why!
Because i have a plugin running on nagios, that checks for authentication with a specific user ex: "testuser" every 5 minutes, and at the end of the day my database grows with useless information. We are a global hotspot provider, so this check running on nagios is performed in 10.000 hotspots, to test for authentication, so you could imagine that this "testuser" generates infinite registers.
I think put some kind of trigger to do that, will probably slow down my server performance, because we have a huge users database.
I'm running freeradius(1.1.7) + postgre.
Regards,
Rafael Medici
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Ben Wiechman wrote:
With this it wouldn't be that hard to separate the information for a specific subscriber or group into a separate log file would it.
Correct.
Assuming that the two log options are appropriately configured:
Fr 2.x if( User-Name != "test-user" { # will (Group-Name != 'test-group" ) { work? User_log } else { Test_log }
Or FR 1.x
preacct { files } accounting { Acct-Type SQL-LOG { User_log } Acct-Type TEST-LOG { Test_log } }
...then in "acct_users":
Test-user Acct-Type := TEST-LOG Fall-Through = No
DEFAULT Acct-Type := SQL-LOG
Is there an equivalent way to do this using sql? Ie radreply/radgroupreply?
radcheck/radreply and co. are only processed for authentication requests, so not directly, but you can work around that. The most straightforward way is to add the Class attribute to the authentication reply (e.g. from radreply or radgroupreply). RFC compliant NASes will then send the Class attribute in the corresponding accounting requests[1], then you can match it in preacct i.e. in acct_users: DEFAULT Class == "testlog", Acct-Type := TEST-SQL DEFAULT Acct-Type := SQL-LOG [1] HOWEVER - be aware that certain crappy NASes do not obey the RFCs, and do not send the Class attribute back. You'll need to test and see if this works on your equipment (and file a bug if it doesn't!)
Also, will this take care of both accounting log info and authentication log info?
No. See doc/Post-Auth-Type and the post-auth section.
Also, will this take care of both accounting log info and authentication log info?
No. See doc/Post-Auth-Type and the post-auth section.
Thanks, I'll look there. I'm not much concerned with the accounting info. Our wimax base stations send a keepalive auth request at rather frequent intervals. I'd like to log those requests for troubleshooting purposes, but I'd like them to live somewhere other than my main auth logs. It would make it much easier to separate CPE auth issues and potential infrastructure issues.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thanks a lot. Regards, Rafael
Vincent Magnin wrote:
Hello Rafael,
It should be possible in Freeradius 2 and using unlang language:
if (User-Name != "test-user") { sql_log }
In previous versions, you can use Acct-Type:
preacct { files } accounting { Acct-Type SQL-LOG { sqllog } }
...then in "acct_users":
nagios .... Fall-Through = Np
DEFAULT Acct-Type := SQL-LOG
Regards,
Vincent M.
Rafael Medici <rafael.medici@vexcorp.com> a écrit :
Hello,
Is there a way to don't log nothing for a specific user, creating a rule in sql_log?
You will probably ask me why!
Because i have a plugin running on nagios, that checks for authentication with a specific user ex: "testuser" every 5 minutes, and at the end of the day my database grows with useless information. We are a global hotspot provider, so this check running on nagios is performed in 10.000 hotspots, to test for authentication, so you could imagine that this "testuser" generates infinite registers.
I think put some kind of trigger to do that, will probably slow down my server performance, because we have a huge users database.
I'm running freeradius(1.1.7) + postgre.
Regards,
Rafael Medici
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (4)
-
Ben Wiechman -
Phil Mayers -
Rafael Medici -
Vincent Magnin