Re: Proxying Radius Requests by Called-Station-Id
Dale <[email protected]> Thu, 27 Jul 2006 13:56:16 -0700 (PDT)
| Newsgroups | gmane.comp.gnu.radius.general |
|---|---|
| Message-ID | <[email protected]> |
> Message: 3 > Date: Thu, 27 Jul 2006 10:04:17 +0300 > From: "Sergey Poznyakoff" <[email protected]> > Subject: Re: [Help-gnu-radius] Proxying Radius Requests by > Called-Station-Id > To: "Dale" <[email protected]> > Cc: [email protected] > Message-ID: <[email protected]> > > Dale <[email protected]> wrote: > > > I'm trying to match incomming Called-Station-Id and forward it to a > > different radius server for the response when it matches a known > value. > > Use raddb/hints to modify the user name. For example: > > DEFAULT Called-Station-Id = 111111 > User-Name = "=%[User-Name] + \"@realm1\"" > > DEFAULT Called-Station-Id = 222222 > User-Name = "=%[User-Name] + \"@realm2\"" I tried this before writing to the list and couldn't get it working either. Auth.notice: (Access-Request x.x.x.x 63 "testuser" CSID=12345): No such user [testuser] Do tabs/spaces have anything to do with how it's parsed? I ended up using this which worked. I'd rather use your way since it's cleaner and requires less code. hints: DEFAULT Rewrite-Function = create_realm_by_dnis Fall-Through = Yes rewrite.custom: integer create_realm_by_dnis() { if(*%[Called-Station-Id]) if(%[Called-Station-Id] == "12345") %[User-Name] = %[User-Name] + "@realm1"; return 0; } My function also only logs the stripped username into radius.log instead of the full user@realm (realms file is configured to strip). Is there any way to change this? Thanks, Dale __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com