Proxy an Accounting Packet which initially was LOCAL

Mike O'Connor freeradius at pineview.net
Wed Oct 21 04:21:03 CEST 2015


Hi

I have an issue where I need to proxy to a home server accounting
packets which do not have a realm, but only for accounting packets which
have Called-Station-Id = "splns111".

If the past we did this with something like this in hints
DEFAULT Called-Station-Id == "splns111"
        User-Name := "%{User-Name}@mb.isp.net.au"

but this stopped working in the early v3 but now with the current
release v3.0.10 my other method of doing this stopped also.

The offending problem is near the bottom of this log 'rad_accounting:
Cancelling proxy to realm mb.isp.net.au, as it is a LOCAL realm.'

Reading the source in acct.c this would seem to be a case of it not
finding the realm, but I'm fairly sure the realm is in the proxy.conf file

So what might I be doing wrong ?

Thanks
Mike

(22) Received Accounting-Request Id 78 from 203.30.131:1646 to
203.30.66:1813 length 382
(22)   Acct-Session-Id = "0008BD2C"
(22)   Tunnel-Type:0 = L2TP
(22)   Tunnel-Medium-Type:0 = IPv4
(22)   Tunnel-Server-Endpoint:0 = "1.1.208.155"
(22)   Tunnel-Client-Endpoint:0 = "2.2.2.233"
(22)   Tunnel-Assignment-Id:0 = "ZedRez-GoWireless"
(22)   Tunnel-Client-Auth-Id:0 = "GW-LAC"
(22)   Tunnel-Server-Auth-Id:0 = "ISP-GoWireless"
(22)   Acct-Tunnel-Connection = "1777597731"
(22)   Framed-Protocol = PPP
(22)   Framed-IP-Address = 1.1.210.94
(22)   User-Name = "61400004164"
(22)   Cisco-AVPair = "connect-progress=LAN Ses Up"
(22)   Cisco-AVPair = "nas-tx-speed=8640000"
(22)   Cisco-AVPair = "nas-rx-speed=8640000"
(22)   Acct-Session-Time = 319
(22)   Acct-Input-Octets = 24764
(22)   Acct-Output-Octets = 31696
(22)   Acct-Input-Packets = 272
(22)   Acct-Output-Packets = 145
(22)   Acct-Authentic = RADIUS
(22)   Acct-Status-Type = Interim-Update
(22)   Called-Station-Id = "splns111"
(22)   Calling-Station-Id = "61400004164"
(22)   Connect-Info = "8640000"
(22)   NAS-Port-Type = Virtual
(22)   NAS-Port = 1310
(22)   NAS-Port-Id = "Uniq-Sess-ID1310"
(22)   Class = 0x616374697665
(22)   Service-Type = Framed-User
(22)   NAS-IP-Address = 203.30.131
(22)   Acct-Delay-Time = 0
(22) # Executing section preacct from file
/etc/freeradius/sites-enabled/default
(22)   preacct {
(22)     if ( "%{%{Called-Station-Id}:-Null}" == "splns111" ) {
(22)     EXPAND %{%{Called-Station-Id}:-Null}
(22)        --> splns357
(22)     if ( "%{%{Called-Station-Id}:-Null}" == "splns111" )  -> TRUE
(22)     if ( "%{%{Called-Station-Id}:-Null}" == "splns111" )  {
(22)       update request {
(22)         EXPAND %{User-Name}@mb.isp.net.au
(22)            --> 61400004164 at mb.isp.net.au
(22)         User-Name := 61400004164 at mb.isp.net.au
(22)       } # update request = noop
(22)       update control {
(22)         Proxy-To-Realm := "mb.isp.net.au"
(22)       } # update control = noop
(22)     } # if ( "%{%{Called-Station-Id}:-Null}" == "splns111" )  = noop
(22)     [preprocess] = ok
(22)     policy acct_counters64.preacct {
(22)       update request {
(22)         WARNING: Can't find &Acct-Input-Gigawords.  Using 0 as
operand value
(22)         EXPAND %{expr:(&Acct-Input-Gigawords << 32) |
&Acct-Input-Octets}
(22)            --> 24764
(22)         &Acct-Input-Octets64 = 24764
(22)         WARNING: Can't find &Acct-Output-Gigawords.  Using 0 as
operand value
(22)         EXPAND %{expr:(&Acct-Output-Gigawords << 32) |
&Acct-Output-Octets}
(22)            --> 31696
(22)         &Acct-Output-Octets64 = 31696
(22)       } # update request = noop
(22)     } # policy acct_counters64.preacct = noop
(22)     update request {
(22)       EXPAND %{expr: %l - %{%{Acct-Session-Time}:-0} -
%{%{Acct-Delay-Time}:-0}}
(22)          --> 1445388537
(22)       FreeRADIUS-Acct-Session-Start-Time = Oct 21 2015 11:18:57 ACDT
(22)     } # update request = noop
(22)     policy acct_unique {
(22)       if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i) {
(22)       EXPAND %{string:Class}
(22)          --> active
(22)       if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i)  -> FALSE
(22)       else {
(22)         update request {
(22)           EXPAND
%{md5:%{User-Name},%{Acct-Session-ID},%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}
(22)              --> 8ef787a9843523a9f86aac11cc6b6c17
(22)           &Acct-Unique-Session-Id := 8ef787a9843523a9f86aac11cc6b6c17
(22)         } # update request = noop
(22)       } # else = noop
(22)     } # policy acct_unique = noop
(22) suffix: Checking for suffix after "@"
(22) suffix: Looking up realm "mb.isp.net.au" for User-Name =
"61400004164 at mb.isp.net.au"
(22) suffix: Found realm "mb.isp.net.au"
(22) suffix: Adding Stripped-User-Name = "61400004164"
(22) suffix: Adding Realm = "mb.isp.net.au"
(22) suffix: Accounting realm is LOCAL
(22)     [suffix] = ok
(22)     [files] = noop
(22)   } # preacct = ok
(22) # Executing section accounting from file
/etc/freeradius/sites-enabled/default
(22)   accounting {
(22) detail: EXPAND
/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
(22) detail:    --> /var/log/freeradius/radacct/203.30.131/detail-20151021
(22) detail:
/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
expands to /var/log/freeradius/radacct/203.30.131/detail-20151021
(22) detail: EXPAND %t
(22) detail:    --> Wed Oct 21 11:24:16 2015
(22)     [detail] = ok
(22) attr_filter.accounting_response: EXPAND %{User-Name}
(22) attr_filter.accounting_response:    --> 61400004164 at mb.isp.net.au
(22) attr_filter.accounting_response: Matched entry DEFAULT at line 12
(22)     [attr_filter.accounting_response] = updated
(22)   } # accounting = updated
rad_accounting: Cancelling proxy to realm mb.isp.net.au, as it is a
LOCAL realm.
(22) Sent Accounting-Response Id 78 from 203.30.66:1813 to
203.30.131:1646 length 0
(22) Finished request
(22) Cleaning up request packet ID 78 with timestamp +15


More information about the Freeradius-Users mailing list