> Dustin Doris wrote:
> >> Dustin Doris wrote:
> >>>> Before proxying to a specific realm, I want to replace the value of
> >>>> one attribute with the value of another attribute, no matter what
> >>>> it contains.
> >>> Looking at preproxy_users description in raddb, it looks like this
> >>> might
> >>> be what you are after.
> >>
> >> Yes indeed, but actually I can't figure out how to tell the module
> >> to put the value of the Wispr-Location-Id attribute into the
> >> Called-Station-Id attribute...
> >
> > I was just able to get it working on a test box. Here is what I did.
> >
> > radiusd.conf
> >
> > under the files section, make sure you have it setup to read that file
> >
> > files {
> > ...
> > preproxy_usersfile = ${confdir}/preproxy_users
> > ...
> > }
>
> I didn't know this existed. I'm working with the attr_filter module.
>
> > under the pre_proxy section, make sure you have files listed
> >
> > pre_proxy {
> > ...
> > files
> > ...
> > }
>
> I guess the rules will only be applied for auth packets, not for acct
> packets.
>
Not sure, I didn't try accounting packets. Will try now...
Yep, it worked for accounting too!
Sending Accounting-Request of id 0 to 172.20.1.249:1813
User-Name = "test"
User-Password = "\315\346B\021\004m\006_\371\365\322\017\n"
WISPr-Location-ID = "333333"
NAS-IP-Address = 127.0.0.1
Proxy-State = 0x3832
Called-Station-Id := "333333"
> > in preproxy_users, add it in the same syntax as the example, replacing
> > User-Name with the WISPr
> >
> > DEFAULT
> > Called-Station-Id := `%{WISPr-Location-ID}`
>
> Those are backticks right?
> I tried backticks with the attr_filter module, but the result is an empty
> string!
Yep, those are backticks. Not sure the syntax on attr_filter, I haven't
used it in a while. But that should be the syntax on preproxy_users. At
least that is what they had in the file as an example. Never used it
before, but it sounded neat, so I thought I'd give it a try with your
example.
>
> >
> > Make sure your dictionary file is including the wispr dictionary
> >
> > $INCLUDE dictionary.wispr
>
> Sure, that's ok.
>
-Dusty Doris
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html