Re: Help with hints/users file please

2002-10-17 Thread Guillermo Schimmel


Chris Parker wrote:


At 11:41 AM 10/17/2002 -0300, Guillermo Schimmel wrote:


Hi list:

I have to proxy some request to another's company radius, based on 
called-station-id.

I am doing it with this line:

DEFAULT Called-Station-Id == 40004009, Proxy-To-Realm := prima

Now, the problem is that the PSTN switch that we use, (Ericsson AXE) 
is a piece of s..., and we receive things like:

40004009
1140004009 (11 is the area code)
12240004009 (122 is our telco code)
1221140004009 (both)

And so on


There is a regular expression operator that would allow you to do
something like:

DEFAULT Called-Station-Id =~ *40004009$, Proxy-To-Realm := prima


The problem with that is that I have several cities, and the numbers can 
contain each other, like:

City 1: 400040
City 2: 40400040

So I would have to play with the order in with the expresion are 
evaluated, and I don't like it :)



Now, the other company is using radiator, and they would like to 
receive allways 1140004009.

How can I rewrite the Called-Station-Id AND Proxy-To-Realm?


You could try using the := operator on the second Called-Station-Id
attribute.



This doesn't work. There is something on processing_users_file that says:

If an attribute is already present in the check pairlist of the request 
it will not be changed (see files.c:movepair).

But there is no movepair on files.c :(



Also, there is currently a new feature added to the server for 
'pre-proxy'
under which you could rewrite the attributes before proxying to the 
remote
server. This is a new feature so it's not widely documented yet, but it
does exist and should allow you to do what you need.

So I think that this could be what I need. What can I read about this? 
How new is that? It is on 0.7? Or on CVS?

Thanks



-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




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


Re: Help with hints/users file please

2002-10-17 Thread Chris Parker
At 12:18 PM 10/17/2002 -0300, Guillermo Schimmel wrote:



Chris Parker wrote:


At 11:41 AM 10/17/2002 -0300, Guillermo Schimmel wrote:


Hi list:

I have to proxy some request to another's company radius, based on 
called-station-id.

I am doing it with this line:

DEFAULT Called-Station-Id == 40004009, Proxy-To-Realm := prima

Now, the problem is that the PSTN switch that we use, (Ericsson AXE) is 
a piece of s..., and we receive things like:

40004009
1140004009 (11 is the area code)
12240004009 (122 is our telco code)
1221140004009 (both)

And so on

There is a regular expression operator that would allow you to do
something like:

DEFAULT Called-Station-Id =~ *40004009$, Proxy-To-Realm := prima


The problem with that is that I have several cities, and the numbers can 
contain each other, like:

City 1: 400040
City 2: 40400040

So I would have to play with the order in with the expresion are 
evaluated, and I don't like it :)

Yes, proper parsing order will be needed.  :)


How can I rewrite the Called-Station-Id AND Proxy-To-Realm?



You could try using the := operator on the second Called-Station-Id
attribute.


This doesn't work. There is something on processing_users_file that says:

If an attribute is already present in the check pairlist of the request it 
will not be changed (see files.c:movepair).

Right, so that won't work for you.


Also, there is currently a new feature added to the server for 'pre-proxy'
under which you could rewrite the attributes before proxying to the remote
server. This is a new feature so it's not widely documented yet, but it
does exist and should allow you to do what you need.


So I think that this could be what I need. What can I read about this? How 
new is that? It is on 0.7? Or on CVS?

It is in the latest CVS version.  See the file 'preproxy_users' for more
information.  It is very basic at the moment, but it does allow you to
rewrite attributes prior to proxying.

-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


Re: Help with hints/users file please

2002-10-17 Thread Alan DeKok
Chris Parker [EMAIL PROTECTED] wrote:
 You will probably want to try an entry similar to:
 
 DEFAULT Called-Station-Id == 40004009
Called-Station-Id := 1140004009
 
 
 I believe it will work both before authorization and accounting, though
 I'm not positive on the accounting part.

  When using preproxy, *all* requests which get proxied get passed
through the 'preproxy_users' file.  This means BOTH accounting and
authentication.

  It may be useful to split them up, but that may be more work than
it's worth.

  Alan DeKok.


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



Re: Help with hints/users file please

2002-10-17 Thread Guillermo Schimmel
Ok . Thanks.

Unfortunately, my boss doesn't want to upgrade the freeradius to the cvs 
version.
He is getting older and it's starting to like stability.

I will have to wait at least until 0.8 (That sounds stable enough for 
him. I don't get it.)

So, there isn't any chances for me to rewrite the Calling-Station-Id value?


Thank you very much to both of you Alan and Chris for your time.


Guillermo



Alan DeKok wrote:

Chris Parker [EMAIL PROTECTED] wrote:
 

You will probably want to try an entry similar to:

DEFAULT Called-Station-Id == 40004009
  Called-Station-Id := 1140004009


I believe it will work both before authorization and accounting, though
I'm not positive on the accounting part.
   


 When using preproxy, *all* requests which get proxied get passed
through the 'preproxy_users' file.  This means BOTH accounting and
authentication.

 It may be useful to split them up, but that may be more work than
it's worth.

 Alan DeKok.


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


 



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


Re: Help with hints/users file please

2002-10-17 Thread Alan DeKok
Guillermo Schimmel [EMAIL PROTECTED] wrote:
 I will have to wait at least until 0.8 (That sounds stable enough for 
 him. I don't get it.)
 
 So, there isn't any chances for me to rewrite the Calling-Station-Id value?

  Not until 0.8, sorry.

  Alan DeKok.

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