Thanks Chris, you are a legend!

That config did exactly what I want. :)

However now I have a problem with accounting packets.
They seem to always be proxied off to the default realm no matter what.

I guess this is because the users file is not processed for accounting packets.

Do you or anyone have any idea how I can set a realm for an accounting packet by the 
Called-Station-Id?

Thanks,

James.

On Wed, 19 Jun 2002 21:53, Chris Parker wrote:
> At 01:31 PM 6/19/2002 +0800, James Taylor wrote:
> >Hi all,
> >
> >I wish to set up freeradius to act as a radius proxy but instead of using 
> >the "user@domain" style username for different realms I wish to use the 
> >dialled number (Called-Station-Id) to determine which radius server the 
> >request is sent to.
> >
> >So two people on two different systems can use the exact same 
> >username/password but because they are dialling different numbers the 
> >server is able to tell who they belong to.
> >
> >Has anyone done anything like this before or know how it would be done?
> >
> >I was thinking maybe of checking the Called-Station-Id and then rewriting 
> >the username to add the "@domain" bit for later processing by the proxy 
> >part of the configuration.
> >Anyone know if this can this be done?
> >
> >If not I might consider writing some code to do it.
> 
> No need.
> 
> Configure 'proxy.conf' as you would, creating realm names that make
> sense to you.  Then create entries in your 'users' file like:
> 
> DEFAULT  Called-Station-Id == "5551212", Proxy-To-Realm := "foo"
> 
> DEFAULT  Called-Station-Id == "5553434", Proxy-To-Realm := "bar"
> 
> You could even get really fancy, if you have lots of numbers, but each
> "set" ends in the same last four digits, and use a regexp compare to
> match the phone numbers:
> 
> DEFAULT  Called-Station-Id =~ "*1212$", Proxy-To-Realm := "baz"
> 
> -Chris
> --
>     \\\|||///  \          StarNet Inc.      \         Chris Parker
>     \ ~   ~ /   \       WX *is* Wireless!    \   Director, Engineering
>     | @   @ |    \   http://www.starnetwx.net \      (847) 963-0116
> oOo---(_)---oOo--\------------------------------------------------------
>                    \ Wholesale Internet Services - http://www.megapop.net
> 
> 
> 
> - 
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> 
> 

-- 
James Taylor BSc (Computer Science)
Systems Administrator - Commerce Australia
Phone: +618 9226 0011 Fax: +618 9226 0033


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

Reply via email to