Accounting with external script

mclaut at mclaut.com mclaut at mclaut.com
Fri Jan 15 20:04:29 CET 2016


Hi !

Sorry, but I can not find the answer to the question - what the external (for example php script) should return to the radius server at accounting?
What attributes?

I'm use - FreeRADIUS Version 2.2.6, for host x86_64-redhat-linux-gnu, built on Sep 22 2015 at 15:27:25

In Radius log:

Fri Jan 15 20:59:12 2016 : Info: Ready to process requests.
rad_recv: Accounting-Request packet from host 1.1.4.4 port 62311, id=8, length=32
        Acct-Status-Type = Start
        Acct-Session-Id = "8768"
Fri Jan 15 20:59:54 2016 : Info: # Executing section preacct from file /etc/raddb/sites-enabled/mclaut_default_exec
Fri Jan 15 20:59:54 2016 : Info: +group preacct {
Fri Jan 15 20:59:54 2016 : Info: ++[preprocess] = ok
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{hex:Attribute} ->
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{Acct-Session-Id} -> 8768
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{Acct-Authentic} ->
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{Acct-Status-Type} -> Start
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{NAS-IP-Address} -> 1.1.4.4
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{User-Name} ->
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{NAS-Port} ->
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{Framed-Protocol} ->
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %{Framed-IP-Address} ->
Fri Jan 15 20:59:54 2016 : Info: [bill_acc]     expand: %S -> 2016-01-15 20:59:54
Fri Jan 15 20:59:54 2016 : Debug: Exec output:
Fri Jan 15 20:59:54 2016 : Info: [bill_acc] Exec: program returned: 0
Fri Jan 15 20:59:54 2016 : Info: ++[bill_acc] = ok
Fri Jan 15 20:59:54 2016 : Info: +} # group preacct = ok
Fri Jan 15 20:59:54 2016 : Info:   WARNING: Empty accounting section.  Using default return values.
Fri Jan 15 20:59:54 2016 : Info: Finished request 5.
Fri Jan 15 20:59:54 2016 : Info: Cleaning up request 5 ID 8 with timestamp +125
Fri Jan 15 20:59:54 2016 : Debug: Going to the next request
Fri Jan 15 20:59:54 2016 : Info: Ready to process requests.


I do not understand - WARNING: Empty accounting section. Using default return values.


But, answer from script:

Fri Jan 15 20:59:54 2016 : Debug: Exec output:
Fri Jan 15 20:59:54 2016 : Info: [bill_acc] Exec: program returned: 0
Fri Jan 15 20:59:54 2016 : Info: ++[bill_acc] = ok
Fri Jan 15 20:59:54 2016 : Info: +} # group preacct = ok

And NAS don't recieve any answers from Radius Server....

Tell me please, what am I doing wrong?

Thank you in advance


More information about the Freeradius-Users mailing list