Community discussions

MikroTik App
 
mstuebner
newbie
Topic Author
Posts: 35
Joined: Wed Oct 07, 2009 3:47 am

Which realm should appear in radacct?

Fri Oct 23, 2009 7:07 pm

HI,

working on accounting, I wonder how to configure the data stored in radattc?

When I use a hotspot user with name matt@hotel_1 the debug output of radiusd -X shows "Looking up realm 'hotel_1'", but the realm field in radacct remains empty, also after logout. Which data should be shown in

radacct.groupname
radacct.realm
radacct.connectinfo_start
radacct.connectinfo_stop
radacct.servicetype?

Is that configurable? If yes, where?

Thanx in advance, Matthias
 
Smith
Frequent Visitor
Frequent Visitor
Posts: 61
Joined: Mon Dec 19, 2005 1:06 pm

Re: Which realm should appear in radacct?

Fri Oct 23, 2009 10:04 pm

In your sql.conf (i am ssuming you are using freeradius) look for %{Realm} and replace that with %{Mikrotik-Realm}.

The rest is not sent back by Mikrotik.
Groupname is the name of group user belongs to (used in radgroupreply), so you can do some mysql changes in sql.conf to put that data in radacct but i would suggest not to do that because it burdens database with no good reason, at least that i know of. Same goes for Service-Type.
 
mstuebner
newbie
Topic Author
Posts: 35
Joined: Wed Oct 07, 2009 3:47 am

Re: Which realm should appear in radacct?

Fri Oct 23, 2009 10:22 pm

In your sql.conf (i am ssuming you are using freeradius) look for %{Realm} and replace that with %{Mikrotik-Realm}.

The rest is not sent back by Mikrotik.
Groupname is the name of group user belongs to (used in radgroupreply), so you can do some mysql changes in sql.conf to put that data in radacct but i would suggest not to do that because it burdens database with no good reason, at least that i know of. Same goes for Service-Type.
What version of freeradius are you referring two? In version 2x I cannot find it there, but I will scan all other files. I sit by chance that these macros "%{Mikrotik-Realm}" are named identical as the received parameters, or can I address all received parameters that way?

br Matthias

EDIT: It has been moved to /etc/raddb/sql/mysql/dialup.conf
 
Smith
Frequent Visitor
Frequent Visitor
Posts: 61
Joined: Mon Dec 19, 2005 1:06 pm

Re: Which realm should appear in radacct?

Fri Oct 23, 2009 11:49 pm

I made a mistake with Service-Type. Service-Type is "Framed-User". Sorry for misleading...

Anyway, here are some of the attributes.
The other ones you were referring to are sent by Cisco equipment and maybe some thers but not by Mikrotik.

Service-Type
Framed-Protocol
NAS-Port
NAS-Port-Type
User-Name
Calling-Station-Id
Called-Station-Id
NAS-Port-Id
MS-CHAP-Domain
Acct-Session-Id
Framed-IP-Address
Acct-Authentic
Event-Timestamp
Acct-Session-Time
Acct-Input-Octets
Acct-Input-Gigawords
Acct-Input-Packets
Acct-Output-Octets
Acct-Output-Gigawords
Acct-Output-Packets
Acct-Status-Type
NAS-Identifier
NAS-IP-Address
Acct-Delay-Time
Mikrotik-Realm
Client-IP-Address
Acct-Unique-Session-Id
Timestamp

Who is online

Users browsing this forum: ezhangiso, vingjfg and 65 guests