(RADIATOR) Logging athentication and accounting
Kadir Saruhan
KSaruhan at e-kolay.com
Thu Feb 3 03:58:19 CST 2005
Hi, there
I have radius service that authenticate users from file with <AuthBy
File> statement.
And i'm logging authentication logs to mysql with <AuthLog SQL>
statement.
At the same time i want to log accounting logs to mysql with <AuthBy
SQL> statement.
But there is a problem that it doesn't log accounting logs.
You can see below Accounting-Stop request debugging.
How can i log both of authenticaiton and accounting logs to mysql?
My radius service's conf:
<Realm xxxx>
<AuthLog SQL>
DBSource dbi:mysql:RADIUS
DBUsername test
DBAuth test
LogSuccess 1
SuccessQuery insert into RADAUTHLOG
(TIME_STAMP,TIME,USERNAME,PASSWORD,TYPE,CALLEDSTATION,CALLINGSTATION) \
values (%t, '%Y.%d.%m %H:%M:%S', '%n', '%P', 1,
'%{Called-Station-Id}','%{Calling-Station-Id}')
LogFailure 1
FailureQuery insert into RADAUTHLOG
(TIME_STAMP,TIME,USERNAME,PASSWORD,TYPE,REASON,CALLEDSTATION,CALLINGSTAT
ION) \
LogFailure 1
FailureQuery insert into RADAUTHLOG
(TIME_STAMP,TIME,USERNAME,PASSWORD,TYPE,REASON,CALLEDSTATION,CALLINGSTAT
ION) \
values (%t, '%Y.%d.%m %H:%M:%S', '%n', '%P', 0, %1,
'%{Called-Station-Id}','%{Calling-Station-Id}')
</AuthLog>
<AuthBy FILE>
Filename ./users.txt
</AuthBy>
<AuthBy SQL>
AccountingStopsOnly
DBSource dbi:mysql:RADIUS
DBUsername test
DBAuth test
AccountingTable ACCOUNTING
AcctColumnDef TIME_STAMP,Timestamp,integer-date,%Y.%m.%d
%H:%M:%S
AcctColumnDef USERNAME,User-Name
AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
AcctColumnDef FRAMEDIPADDRESS,Framed-IP-Address
</AuthBy>
Accounting Stop-Request Trace 4:
*** Received from 172.19.0.50 port 1839 ....
Code: Accounting-Request
Identifier: 3
Authentic:
<164><142><237><228><211><171><206><189>m(u<137><213><214><5><248>
Attributes:
User-Name = "kadirs at xxxx"
Acct-Status-Type = Stop
Acct-Input-Octets = 1000
Acct-Delay-Time = 100
Acct-Output-Octets = 5000
Acct-Session-Id = "1234"
Acct-Session-Time = 45678
Ascend-Disconnect-Cause = 0
NAS-IP-Address = 10.10.10.10
NAS-Port = 1500
Framed-IP-Address = 62.29.29.1
Thu Feb 3 11:23:47 2005: DEBUG: Handling request with Handler
'Realm=e-kolay'
Thu Feb 3 11:23:47 2005: DEBUG: Deleting session for kadirs at e-kolay,
10.10.10.10, 1500
Thu Feb 3 11:23:47 2005: DEBUG: Handling with Radius::AuthFILE:
Thu Feb 3 11:23:47 2005: DEBUG: Accounting accepted
Thu Feb 3 11:23:47 2005: DEBUG: Packet dump:
*** Sending to 172.19.0.50 port 1839 ....
Code: Accounting-Response
Identifier: 3
Authentic:
<164><142><237><228><211><171><206><189>m(u<137><213><214><5><248>
Kadir Saruhan
DOL System Administrator
ksaruhan at e-kolay.com
Tel: +90 212 498 35 16
Fax:+90 212 677 05 92
www.e-kolay.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20050203/7e5e0e35/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: guvenlik.gif
Type: image/gif
Size: 30784 bytes
Desc: not available
URL: <http://www.open.com.au/pipermail/radiator/attachments/20050203/7e5e0e35/attachment.gif>
More information about the radiator
mailing list