Acct-Status-Type = 7

Oscar Jofre oscar at jofre.com
Sun Apr 16 17:13:14 CEST 2017


Hi ,

I did several test.

1) I do Installed freeradius on a virtual machine on my computer.
	I run it with -X and without and this server is always responding to the Accounting ON.
	Using NTRadPing - Getting Responds  Accounting on
	Usung Mikrotik - Getting Responds Accounting on

2) with my freeradius on Production is the same version of freeradius, same config files (except passwords) o got:
	Using NTRadPing - Getting Responds  Accounting on
	Usung Mikrotik - NO Responding Accounting on
	* Mikrotik and NTRadPing are on the same LAN, switched on the same proxy.

I did tried to learn on test radius how works raddebug but I can't filter requests. I'm trying to only see requests from a NAS or from a specific IP but always I get echo information with raddebug

I tried WORKING

raddebug -c '(Acct-Status-Type == Accounting-On)'

I tried NOT WORKING	

raddebug -i 172.17.1.110

raddebug -c'(Packet-Src-IP-Address == 172.17.1.110)'

raddebug -c '(NAS-IP-Address == 172.17.1.1100)'


when I'm sending from another IP and always get info:

example:

[root at localhost radius]# raddebug -i 10.1.1.1
(19) Sun Apr 16 17:06:17 2017: Debug: <running>: Received Accounting-Request Id 79 from 172.17.1.116:55239 to 172.17.1.21:1813 length 66
(19) Sun Apr 16 17:06:17 2017: Debug: <running>:   User-Name = "pru"
(19) Sun Apr 16 17:06:17 2017: Debug: <running>:   Acct-Status-Type = Accounting-On
(19) Sun Apr 16 17:06:17 2017: Debug: <running>:   Acct-Session-Id = "19408"
(19) Sun Apr 16 17:06:17 2017: Debug: <running>:   Acct-Status-Type = Accounting-On
(19) Sun Apr 16 17:06:17 2017: Debug: <running>:   Acct-Delay-Time = 0
(19) Sun Apr 16 17:06:17 2017: Debug: <running>:   NAS-Identifier = "\"SERVER\""
(19) Sun Apr 16 17:06:17 2017: Debug: <running>:   NAS-IP-Address = 172.16.5.240
(19) Sun Apr 16 17:06:17 2017: Debug: <running>: # Executing section preacct from file /etc/raddb/sites-enabled/default
(19) Sun Apr 16 17:06:17 2017: Debug: <running>:   preacct {
(19) Sun Apr 16 17:06:17 2017: Debug:     [preprocess] = ok
(19) Sun Apr 16 17:06:17 2017: Debug:     policy acct_unique {
(19) Sun Apr 16 17:06:17 2017: Debug:       if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i) {
(19) Sun Apr 16 17:06:17 2017: Debug:       EXPAND %{string:Class}
(19) Sun Apr 16 17:06:17 2017: Debug:          -->
(19) Sun Apr 16 17:06:17 2017: Debug:       if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i)  -> FALSE
(19) Sun Apr 16 17:06:17 2017: Debug:       else {
(19) Sun Apr 16 17:06:17 2017: Debug:         update request {
(19) Sun Apr 16 17:06:17 2017: Debug:           EXPAND %{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}
(19) Sun Apr 16 17:06:17 2017: Debug:              --> e133e7b9f9041cad17523455aeaebb46
(19) Sun Apr 16 17:06:17 2017: Debug:         } # update request = noop
(19) Sun Apr 16 17:06:17 2017: Debug:       } # else = noop
(19) Sun Apr 16 17:06:17 2017: Debug:     } # policy acct_unique = noop
(19) Sun Apr 16 17:06:17 2017: Debug: suffix: Checking for suffix after "@"
(19) Sun Apr 16 17:06:17 2017: Debug: suffix: No '@' in User-Name = "pru", looking up realm NULL
(19) Sun Apr 16 17:06:17 2017: Debug: suffix: No such realm "NULL"
(19) Sun Apr 16 17:06:17 2017: Debug:     [suffix] = noop
(19) Sun Apr 16 17:06:17 2017: Debug:     [files] = noop
(19) Sun Apr 16 17:06:17 2017: Debug:   } # preacct = ok
(19) Sun Apr 16 17:06:17 2017: Debug: # Executing section accounting from file /etc/raddb/sites-enabled/default
(19) Sun Apr 16 17:06:17 2017: Debug:   accounting {
(19) Sun Apr 16 17:06:17 2017: Debug: detail: EXPAND /var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
(19) Sun Apr 16 17:06:17 2017: Debug: detail:    --> /var/log/radius/radacct/172.17.1.116/detail-20170416
(19) Sun Apr 16 17:06:17 2017: Debug: detail: /var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d expands to /var/log/radius/radacct/172.17.1.116/detail-20170416
(19) Sun Apr 16 17:06:17 2017: Debug: detail: EXPAND %t
(19) Sun Apr 16 17:06:17 2017: Debug: detail:    --> Sun Apr 16 17:06:17 2017
(19) Sun Apr 16 17:06:17 2017: Debug:     [detail] = ok
(19) Sun Apr 16 17:06:17 2017: Debug:     [unix] = noop
(19) Sun Apr 16 17:06:17 2017: Debug: sql: EXPAND %{tolower:type.%{Acct-Status-Type}.query}
(19) Sun Apr 16 17:06:17 2017: Debug: sql:    --> type.accounting-on.query
(19) Sun Apr 16 17:06:17 2017: Debug: sql: Using query template 'query'
(19) Sun Apr 16 17:06:17 2017: Debug: sql: EXPAND %{User-Name}
(19) Sun Apr 16 17:06:17 2017: Debug: sql:    --> pru
(19) Sun Apr 16 17:06:17 2017: Debug: sql: SQL-User-Name set to 'pru'
(19) Sun Apr 16 17:06:17 2017: Debug: sql: EXPAND UPDATE radacct SET acctstoptime = FROM_UNIXTIME(%{integer:Event-Timestamp}), acctsessiontime      = '%{integer:Event-Timestamp}' - UNIX_TIMESTAMP(acctstarttime), acctterminatecause = '%{%{Acct-Terminate-Cause}:-NAS-Reboot}' WHERE acctstoptime IS NULL AND nasipaddress   = '%{NAS-IP-Address}' AND acctstarttime <= FROM_UNIXTIME(%{integer:Event-Timestamp})
(19) Sun Apr 16 17:06:17 2017: Debug: sql:    --> UPDATE radacct SET acctstoptime = FROM_UNIXTIME(1492355177), acctsessiontime      = '1492355177' - UNIX_TIMESTAMP(acctstarttime), acctterminatecause = 'NAS-Reboot' WHERE acctstoptime IS NULL AND nasipaddress   = '172.16.5.240' AND acctstarttime <= FROM_UNIXTIME(1492355177)
(19) Sun Apr 16 17:06:17 2017: Debug: sql: Executing query: UPDATE radacct SET acctstoptime = FROM_UNIXTIME(1492355177), acctsessiontime    = '1492355177' - UNIX_TIMESTAMP(acctstarttime), acctterminatecause = 'NAS-Reboot' WHERE acctstoptime IS NULL AND nasipaddress   = '172.16.5.240' AND acctstarttime <= FROM_UNIXTIME(1492355177)
(19) Sun Apr 16 17:06:17 2017: Debug: sql: SQL query returned: success
(19) Sun Apr 16 17:06:17 2017: Debug: sql: 0 record(s) updated
(19) Sun Apr 16 17:06:17 2017: Debug: sql: No additional queries configured
(19) Sun Apr 16 17:06:17 2017: Debug:     [sql] = noop
(19) Sun Apr 16 17:06:17 2017: Debug:     [exec] = noop
(19) Sun Apr 16 17:06:17 2017: Debug: attr_filter.accounting_response: EXPAND %{User-Name}
(19) Sun Apr 16 17:06:17 2017: Debug: attr_filter.accounting_response:    --> pru
(19) Sun Apr 16 17:06:17 2017: Debug: attr_filter.accounting_response: Matched entry DEFAULT at line 12
(19) Sun Apr 16 17:06:17 2017: Debug:     [attr_filter.accounting_response] = updated
(19) Sun Apr 16 17:06:17 2017: Debug:   } # accounting = updated
(19) Sun Apr 16 17:06:17 2017: Debug: Sent Accounting-Response Id 79 from 172.17.1.21:1813 to 172.17.1.116:55239 length 0
(19) Sun Apr 16 17:06:17 2017: Debug: Finished request
(19) Sun Apr 16 17:06:17 2017: Debug: Cleaning up request packet ID 79 with timestamp +1581


-----Mensaje original-----
De: Freeradius-Users [mailto:freeradius-users-bounces+oscar=jofre.com at lists.freeradius.org] En nombre de Alan DeKok
Enviado el: viernes, 14 de abril de 2017 16:34
Para: FreeRadius users mailing list
Asunto: Re: Acct-Status-Type = 7

On Apr 14, 2017, at 6:50 AM, Oscar Jofre <oscar at jofre.com> wrote:
> 
> Hi Alan and thanks,
> About last answer i will check it but the accounting on should response anything ?

  Yes.  And again, if you read the debug log, you would see this.

  Alan DeKok.



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list