> 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...
> This is what I have, but it puts a literal 'Wispr-Location-Id' string as the
> value!
>
> NULL
>         User-Name =* ANY,
>         User-Password =* ANY,
>         NAS-IP-Address =* ANY,
>         NAS-Identifier =* ANY,
>         NAS-Port-Id =* ANY,
>         NAS-Port-Type := 19,
>         Calling-Station-Id =* ANY,
>         Called-Station-Id := Wispr-Location-Id,
>         Framed-IP-Address =* ANY,
>         Fall-Through = No
>
> I also tried the following without succes:
>         Called-Station-Id := $Wispr-Location-Id,
>         Called-Station-Id := ${Wispr-Location-Id},
>         Called-Station-Id := %Wispr-Location-Id,
>         Called-Station-Id := %{Wispr-Location-Id},
>
> --
> Regards,
>
> Thor Spruyt


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
...
}

under the pre_proxy section, make sure you have files listed

pre_proxy {
...
files
...
}

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}`


Make sure your dictionary file is including the wispr dictionary

$INCLUDE dictionary.wispr


my example.


rad_recv: Access-Request packet from host 127.0.0.1:2717, id=42, length=67
        User-Name = "test@test.com"
        User-Password = "test"
        WISPr-Location-ID = "333333"
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 0
  modcall[authorize]: module "preprocess" returns ok for request 0
  modcall[authorize]: module "chap" returns noop for request 0
  modcall[authorize]: module "mschap" returns noop for request 0
    rlm_realm: Looking up realm "test.com" for User-Name = "test@test.com"
    rlm_realm: Found realm "test.com"
    rlm_realm: Adding Stripped-User-Name = "test"
    rlm_realm: Proxying request from user test to realm test.com
    rlm_realm: Adding Realm = "test.com"
    rlm_realm: Preparing to proxy authentication request to realm
"test.com"
  modcall[authorize]: module "suffix" returns updated for request 0
  rlm_eap: No EAP-Message, not doing EAP
  modcall[authorize]: module "eap" returns noop for request 0
    users: Matched test at 216
  modcall[authorize]: module "files" returns ok for request 0
modcall: group authorize returns updated for request 0
  Processing the pre-proxy section of radiusd.conf
modcall: entering group pre-proxy for request 0
    preproxy_users: Matched DEFAULT at 18
radius_xlat:  '333333'
  modcall[pre-proxy]: module "files" returns ok for request 0
modcall: group pre-proxy returns ok for request 0
Sending Access-Request of id 0 to 172.20.1.249:1812
        User-Name = "test"
        User-Password = "test"
        WISPr-Location-ID = "333333"
        NAS-IP-Address = 127.0.0.1
        Proxy-State = 0x3432
        Called-Station-Id := "333333"



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

Reply via email to