Rewrite Rule
Maile Halatuituia
maile.halatuituia at tcc.to
Thu Nov 1 02:03:46 CET 2018
Hi Alan
Here is the packet
(4) Acct-Session-Id = "0/0/2/213_0048C203"
(4) Framed-IP-Address = b.b.b.b
(4) Framed-Protocol = PPP
(4) Framed-IPv6-Prefix = a.a.a.a
(4) Framed-Interface-Id = cb5:8c6:2d40:47d7
(4) Delegated-IPv6-Prefix = a.a.a.a
(4) User-Name := "POSTest at kalianet.to"
(4) Cisco-AVPair = "connect-progress=LAN Ses Up"
(4) Cisco-AVPair = "nas-tx-speed=1000000000"
(4) Cisco-AVPair = "nas-rx-speed=1000000000"
(4) Acct-Session-Time = 318
(4) Acct-Input-Octets = 3350
(4) Acct-Output-Octets = 6658
(4) Cisco-AVPair = "acct-input-octets-ipv6=2586"
(4) Cisco-AVPair = "acct-output-octets-ipv6=4914"
(4) Acct-Input-Packets = 65
(4) Acct-Output-Packets = 81
(4) Cisco-AVPair = "acct-input-packets-ipv6=41"
(4) Cisco-AVPair = "acct-output-packets-ipv6=50"
(4) Acct-Authentic = RADIUS
(4) Acct-Status-Type = Interim-Update
(4) NAS-Port-Type = Ethernet
(4) NAS-Port = 33554645
(4) NAS-Port-Id = "0/0/2/213"
(4) Connect-Info = "ACCESS-STATIC"
(4) Cisco-AVPair = "client-mac-address=ae6e.0e71.2d61"
(4) Service-Type = Framed-User
(4) NAS-IP-Address = x.x.x.x
(4) PMIP6-Home-HN-Prefix = 3841:3433:4642::/55
(4) Event-Timestamp = "Nov 1 2018 13:52:44 +13"
(4) NAS-Identifier = "ha_bng2.kalianet.to"
(4) Acct-Delay-Time = 0
(4) Proxy-State = 0x313033
I have three take away from your reply below.
1. I need to look at what value should I use for this particular Cisco AVP attribute for my filter. We use the same for the MAC address and seems to rewrite the MAC address received on the packet and it is working but not for the ipv6 counter.
2. any suggestion how to do this or particular documentation is very much appreciated
3. I also send the packet for your further specific comment that would help
-----Original Message-----
From: Freeradius-Users <freeradius-users-bounces+maile.halatuituia=tcc.to at lists.freeradius.org> On Behalf Of Alan DeKok
Sent: Thursday, 1 November 2018 1:54 PM
To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>
Subject: Re: Rewrite Rule
On Oct 31, 2018, at 8:45 PM, Maile Halatuituia <maile.halatuituia at tcc.to> wrote:
>
> Hi I have this Cisco-AVPair = "acct-input-octets-ipv6=xxx" on my radius acct-request packet coming from my Cisco BRAS.
> I want to rewrite it to something like this acct-input-octets-ipv6=xxx on my preacct section of my default server (/etc/freeradius/sites-available/default) config and update my request .....
> I have this policy already
>
> if( &Cisco-AVPair[*]=~/\(acct-input-octets-ipv6\)=\(\d+)/ ) {
That won't work. You can't use [*] to look at *all* Cisco-AVPair attributes.
> update request {
> &acct-input-octets-ipv6 := "%{2}"
That won't work, either. "acct-input-octets-ipv6" isn't a RADIUS attribute.
You can't just make up names and expect that they do what you want. The dictionaries (and what they do) is well documented.
> But seems it doing nothing. Maybe my regex above is wrong or something but that's why I ask .
> Here is the portion of my freeradius -X I think it is relevant to this question.
Which doesn't include the packet received by the server.
There *is* documentation that says what we need on the mailing list. You get a link to that documentation when you subscribe to the mailing list.
Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Confidentiality Notice: This email (including any attachment) is intended for internal use only. Any unauthorized use, dissemination or copying of the content is prohibited. If you are not the intended recipient and have received this e-mail in error, please notify the sender by email and delete this email and any attachment.
Confidentiality Notice: This email (including any attachment) is intended for internal use only. Any unauthorized use, dissemination or copying of the content is prohibited. If you are not the intended recipient and have received this e-mail in error, please notify the sender by email and delete this email and any attachment.
More information about the Freeradius-Users
mailing list