Hi, I'm using freeradius 2.0.3 and I want to make accounting with the detail module. I enable it in the accouting section and the detail module is defined in radiusd.conf Here is the accounting section in site-enabled/default file accounting { # # Create a 'detail'ed log of the packets. # Note that accounting requests which are proxied # are also logged in the detail file. detail # # Instead of sending the query to the SQL server, # write it into a log file. # sql_log attr_filter.accounting_response } Here is the detail section. Detail { detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d detailperm = 0600 header = "%t" } But I don't have any file like the detailfile described before. In my radaccdir I have only the sql-relay file. And I check all the debug output and the detail module or the rlm_detail is doesn't call anywhere but it's defined when I start the server. Module: Checking accounting {...} for more modules to load Module: Linked to module rlm_detail Module: Instantiating detail detail { detailfile = "/usr/local/var/log/radius/radacct/%{Client-IP-Address}/det ail-%Y%m%d" header = "%t" detailperm = 384 dirperm = 493 locking = no log_packet_header = no } So why he doesn't make accounting. Can it be my AP who's doesn't send accounting packet? For my testing purpose I use a sample D-Link router. Thanks ---------------------------- Guillaume Chartrand Technicien informatique Cégep régional de Lanaudière Centre administratif, Repentigny (450) 470-0911 poste 7218
Here is my debug output Message-Authenticator = 0xcdc3f6cb9b506e11e3476d47403cc6c5 Service-Type = Framed-User User-Name = "guillaume\000" Framed-MTU = 1488 State = 0x404778b348a2618bc73c67e1113b0e93 Called-Station-Id = "00-0F-3D-AB-1C-07:testGuillaume" Calling-Station-Id = "00-0E-35-99-F3-E9" NAS-Identifier = "D-Link Access Point" NAS-Port-Type = Wireless-802.11 Connect-Info = "CONNECT 54Mbps 802.11g" EAP-Message = 0x02e500261900170301001bbb11a33db5048201304fec33b354cbd91bec88a2508b28f74bb154 NAS-IP-Address = 172.20.50.202 NAS-Port = 1 NAS-Port-Id = "STA port # 1" +- entering group authorize ++[preprocess] returns ok expand: %{User-Name} -> guillaume rlm_sql (sql): sql_set_user escaped user --> 'guillaume' rlm_sql (sql): Reserving sql socket id: 1 expand: SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = 'guillaume' ORDER BY id query: SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = 'guillaume' ORDER BY id rlm_sql (sql): User found in radcheck table expand: SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = 'guillaume' ORDER BY id query: SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = 'guillaume' ORDER BY id rlm_sql (sql): Released sql socket id: 1 ++[sql] returns ok ++? if (ok) ? Evaluating (ok) -> TRUE ++? if (ok) -> TRUE ++- entering if (ok) +++[control] returns ok ++- if (ok) returns ok rlm_eap: EAP packet type response id 229 length 38 rlm_eap: Continuing tunnel setup. ++[eap] returns ok ++[expiration] returns noop ++[logintime] returns noop rad_check_password: Found Auth-Type EAP auth: type "EAP" +- entering group authenticate rlm_eap: Request found, released from the list rlm_eap: EAP/peap rlm_eap: processing type peap rlm_eap_peap: Authenticate rlm_eap_tls: processing TLS eaptls_verify returned 7 rlm_eap_tls: Done initial handshake eaptls_process returned 7 rlm_eap_peap: EAPTLS_OK rlm_eap_peap: Session established. Decoding tunneled attributes. rlm_eap_peap: Received EAP-TLV response. rlm_eap_peap: Success rlm_eap: Freeing handler ++[eap] returns ok Login OK: [guillaume\000/<via Auth-Type = EAP>] (from client AP1 port 1 cli 00-0E-35-99-F3-E9) +- entering group post-auth rlm_sql (sql): Processing sql_postauth expand: %{User-Name} -> guillaume rlm_sql (sql): sql_set_user escaped user --> 'guillaume' expand: INSERT INTO radpostauth (username, pass, reply) VALUES ('%{User-Name}','Password','%{reply:Packet-Type}') -> INSERT INTO radpostauth (username, pass, reply) VALUES ('guillaume','Password','Access-Accept') expand: /usr/local/var/log/radius/sqltrace.sql -> /usr/local/var/log/radius/sqltrace.sql rlm_sql (sql) in sql_postauth: query is INSERT INTO radpostauth (username, pass, reply) VALUES ('guillaume','Password','Access-Accept') rlm_sql (sql): Reserving sql socket id: 0 query: INSERT INTO radpostauth (username, pass, reply) VALUES ('guillaume','Password','Access-Accept') rlm_sql (sql): Released sql socket id: 0 ++[sql] returns ok MS-MPPE-Recv-Key = 0x8cd2d85433951c41be7a3c5c9c1faa1fd34514cff327bedeea93cb7b7a6c385a MS-MPPE-Send-Key = 0x6997e9a371ce06bd10afc7824352474dc279a8344ccdad092170b654da859e63 EAP-Message = 0x03e50004 Message-Authenticator = 0x00000000000000000000000000000000 User-Name = "guillaume" Finished request 9. I didn't copy all the debug output because with just one request he made about 1000 lines. If you want all the debug output, I can send it in attached file. Thank ---------------------------- Guillaume Chartrand Technicien informatique Cégep régional de Lanaudière Centre administratif, Repentigny (450) 470-0911 poste 7218 -----Message d'origine----- De : freeradius-users-bounces+guillaume.chartrand=collanaud.qc.ca@lists.freeradius.org [mailto:freeradius-users-bounces+guillaume.chartrand=collanaud.qc.ca@lists.freeradius.org] De la part de Alan DeKok Envoyé : 17 avril 2008 10:20 À : FreeRadius users mailing list Objet : Re: accouting detail Guillaume Chartrand wrote:
So why he doesn't make accounting. Can it be my AP who's doesn't send accounting packet? For my testing purpose I use a sample D-Link router.
Yes. As always, run it in debugging mode to see what it's doing. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Guillaume Chartrand wrote:
Here is my debug output
With authentication packets. These are NOT the same as accounting packets. i.e. What you posted doesn't help.
I didn't copy all the debug output because with just one request he made about 1000 lines. If you want all the debug output, I can send it in attached file.
Run it in debugging mode, and *you* look for Accounting-Request packets. It's not hard. Just look for them... If there are no Accounting-Request packets in the debug output, then the server isn't receiving accounting packets. Alan DeKok.
That is the access not accounting packet. Look for one with Acct-Status-Type = Start in it. It should come just after Access-Accept. Ivan Kalik Kalik Informatika ISP Dana 17/4/2008, "Guillaume Chartrand" <guillaume.chartrand@collanaud.qc.ca> piše:
Here is my debug output
Message-Authenticator = 0xcdc3f6cb9b506e11e3476d47403cc6c5 Service-Type = Framed-User User-Name = "guillaume\000" Framed-MTU = 1488 State = 0x404778b348a2618bc73c67e1113b0e93 Called-Station-Id = "00-0F-3D-AB-1C-07:testGuillaume" Calling-Station-Id = "00-0E-35-99-F3-E9" NAS-Identifier = "D-Link Access Point" NAS-Port-Type = Wireless-802.11 Connect-Info = "CONNECT 54Mbps 802.11g" EAP-Message = 0x02e500261900170301001bbb11a33db5048201304fec33b354cbd91bec88a2508b28f74bb154 NAS-IP-Address = 172.20.50.202 NAS-Port = 1 NAS-Port-Id = "STA port # 1" +- entering group authorize ++[preprocess] returns ok expand: %{User-Name} -> guillaume rlm_sql (sql): sql_set_user escaped user --> 'guillaume' rlm_sql (sql): Reserving sql socket id: 1 expand: SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = 'guillaume' ORDER BY id query: SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username = 'guillaume' ORDER BY id rlm_sql (sql): User found in radcheck table expand: SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id -> SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = 'guillaume' ORDER BY id query: SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username = 'guillaume' ORDER BY id rlm_sql (sql): Released sql socket id: 1 ++[sql] returns ok ++? if (ok) ? Evaluating (ok) -> TRUE ++? if (ok) -> TRUE ++- entering if (ok) +++[control] returns ok ++- if (ok) returns ok rlm_eap: EAP packet type response id 229 length 38 rlm_eap: Continuing tunnel setup. ++[eap] returns ok ++[expiration] returns noop ++[logintime] returns noop rad_check_password: Found Auth-Type EAP auth: type "EAP" +- entering group authenticate rlm_eap: Request found, released from the list rlm_eap: EAP/peap rlm_eap: processing type peap rlm_eap_peap: Authenticate rlm_eap_tls: processing TLS eaptls_verify returned 7 rlm_eap_tls: Done initial handshake eaptls_process returned 7 rlm_eap_peap: EAPTLS_OK rlm_eap_peap: Session established. Decoding tunneled attributes. rlm_eap_peap: Received EAP-TLV response. rlm_eap_peap: Success rlm_eap: Freeing handler ++[eap] returns ok Login OK: [guillaume\000/<via Auth-Type = EAP>] (from client AP1 port 1 cli 00-0E-35-99-F3-E9) +- entering group post-auth rlm_sql (sql): Processing sql_postauth expand: %{User-Name} -> guillaume rlm_sql (sql): sql_set_user escaped user --> 'guillaume' expand: INSERT INTO radpostauth (username, pass, reply) VALUES ('%{User-Name}','Password','%{reply:Packet-Type}') -> INSERT INTO radpostauth (username, pass, reply) VALUES ('guillaume','Password','Access-Accept') expand: /usr/local/var/log/radius/sqltrace.sql -> /usr/local/var/log/radius/sqltrace.sql rlm_sql (sql) in sql_postauth: query is INSERT INTO radpostauth (username, pass, reply) VALUES ('guillaume','Password','Access-Accept') rlm_sql (sql): Reserving sql socket id: 0 query: INSERT INTO radpostauth (username, pass, reply) VALUES ('guillaume','Password','Access-Accept') rlm_sql (sql): Released sql socket id: 0 ++[sql] returns ok MS-MPPE-Recv-Key = 0x8cd2d85433951c41be7a3c5c9c1faa1fd34514cff327bedeea93cb7b7a6c385a MS-MPPE-Send-Key = 0x6997e9a371ce06bd10afc7824352474dc279a8344ccdad092170b654da859e63 EAP-Message = 0x03e50004 Message-Authenticator = 0x00000000000000000000000000000000 User-Name = "guillaume" Finished request 9.
I didn't copy all the debug output because with just one request he made about 1000 lines. If you want all the debug output, I can send it in attached file. Thank ---------------------------- Guillaume Chartrand Technicien informatique Cégep régional de Lanaudičre Centre administratif, Repentigny (450) 470-0911 poste 7218
-----Message d'origine----- De : freeradius-users-bounces+guillaume.chartrand=collanaud.qc.ca@lists..freeradius.org [mailto:freeradius-users-bounces+guillaume.chartrand=collanaud.qc.ca@lists.freeradius.org] De la part de Alan DeKok Envoyé : 17 avril 2008 10:20 Ŕ : FreeRadius users mailing list Objet : Re: accouting detail
Guillaume Chartrand wrote:
So why he doesn't make accounting. Can it be my AP who's doesn't send accounting packet? For my testing purpose I use a sample D-Link router.
Yes.
As always, run it in debugging mode to see what it's doing.
Alan DeKok. - 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 (3)
-
Alan DeKok -
Guillaume Chartrand -
Ivan Kalik