simple accounting proxy setup.

Bill Schoolfield bill at
Tue Oct 2 02:14:05 CEST 2012

Looking for help in setting up simple (single) accounting relay
(forward). Its been awhile since I last used freeradius and I'm use
to the old radrelay program. I see that has been replaced with
internal based methods.

I've read what documents and comments I could find, but haven't been
able to see the entire picture. I've set things up but so far no
luck at getting the accounting packets forwarded.

In keeping with recommended practice, I have modified very little. I
edited the proxy.conf file and enabled the copy-acct-to-home-server
server. What else do I need to do? Could someone provide a working
example configuration? I'm a little shaky on the realm processing.
Perhaps that's the issue.

The sever log appears to show just a normal (local) receipt of the
accounting record:

Ready to process requests.
rad_recv: Accounting-Request packet from host port 44057,
id=153, length=102
        Acct-Session-Id = "6000006B"
        User-Name = "Fnord"
        NAS-IP-Address =
        NAS-Port-Id = "32"
        NAS-Port-Type = Async
        Acct-Status-Type = Start
        Connect-Info = "46000 LAPM/V42BIS"
        Service-Type = Framed-User
        Framed-Protocol = PPP
        Framed-IP-Address =
        Acct-Delay-Time = 0
# Executing section preacct from file /etc/raddb/sites-enabled/default
+- entering group preacct {...}
++[preprocess] returns ok
[acct_unique] WARNING: Attribute NAS-Port was not found in request,
unique ID MAY be inconsistent
[acct_unique] Hashing ',Client-IP-Address =,NAS-IP-Address
=,Acct-Session-Id = "6000006B",User-Name = "Fnord"'
[acct_unique] Acct-Unique-Session-ID = "cce9407c7efa55eb".
++[acct_unique] returns ok
[suffix] No '@' in User-Name = "Fnord", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
++[files] returns noop
# Executing section accounting from file
+- entering group accounting {...}
[detail]        expand:
/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d ->
[detail] /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d
expands to /var/log/radius/radacct/
[detail]        expand: %t -> Mon Oct  1 20:00:15 2012
++[detail] returns ok
++[unix] returns noop
[radutmp]       expand: /var/log/radius/radutmp ->
[radutmp]       expand: %{User-Name} -> Fnord
  rlm_radutmp: No NAS-Port seen.  Cannot do anything.
  rlm_radumtp: WARNING: checkrad will probably not work!
++[radutmp] returns noop
[sql]   expand: %{User-Name} -> Fnord
[sql] sql_set_user escaped user --> 'Fnord'
[sql]   expand: %{Acct-Delay-Time} -> 0
[sql]   expand:            INSERT INTO radacct
(acctsessionid,    acctuniqueid,     username,              realm,
          nasipaddress,     na                             sportid,
             nasporttype,      acctstarttime,    acctstoptime,
        acctsessiontime,  acctauthentic,    connectinfo_start,
        conn                             ectinfo_stop,
acctinputoctets,  acctoutputoctets,              calledstationid,
callingstationid, acctterminatecause,              servicetype,
 framedp                             rotocol,   framedipaddress,
          acctstartdelay,   acctstopdelay,    xascendsessionsvrkey)
          VALUES             ('%{Acct-Session-Id}', '%{Acc
'%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}',
'%{NAS-Port}',              '%{NAS-Port-Type}', '%S', N
                ULL,              '0', '%{Acct-Authentic}',
'%{Connect-Info}',              '', '0', '0',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '',
                           '%{Service-Type}', '%{Framed-Protocol}',
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql (sql): Released sql socket id: 3
++[sql] returns ok
++[exec] returns noop
[attr_filter.accounting_response]       expand: %{User-Name} -> Fnord
 attr_filter: Matched entry DEFAULT at line 12
++[attr_filter.accounting_response] returns updated
Sending Accounting-Response of id 153 to port 44057
Finished request 0.
Cleaning up request 0 ID 153 with timestamp +178
Going to the next request
Ready to process requests.



More information about the Freeradius-Users mailing list