Help me with proxying certain packets

Dmytro O. Redchuk dor at ldc.net
Mon Mar 17 16:37:08 CET 2008


Hello,

   i guess i need to do the following.

   I have a freeradius which proxies requests to two destinations -- one
   destination for packets with certain Called-Station-Id, and one default
   destination.

   And i wish to select some requests by other criteria (other than
   Called-Station-Id), which may change in general case.

   So, when some conditions occur, i need freeradius to proxy such a
   request to first, specific destination (not "default" one).


   So, something like this works in general case:
   users: ---------------------
   DEFAULT Called-Station-Id == "OKLMNPQ", Proxy-To-Realm := "specific"
   DEFAULT Proxy-To-Realm := "default"
   ----------------------------

   I have tried to write a python module, which -- if those "specific"
   conditions occur -- updates User-Name  (adds realm "@specific" to
   username) and sets (('Autz-Type', 'Specific'),) in return tuple and
   changed authorize section like this:

   radiusd.conf: --------------
   authorize {
   	...
	files
	Autz-Type Specific {
		# to look into "users" once again:
		files
	}
   }
   ----------------------------

   and users like this:

   users: ---------------------
   DEFAULT User-Name =~ "@specific", Proxy-To-Realm := "specific"
   ...
   ----------------------------

   ... but this doesnt work as expected.

   I can see in "-X" output that my module changes User-Name, but this
   doesnt work however.


   So, how can i perform this? In a case when i need to write a module to
   catch those specific criteria? Can i set and use Autz-Type for this?

   I am not sure that i will use this in production, but would like to
   finish as an exercise at least, anyway.


   I have FreeRADIUS 1.1.7 with rlm_python.

Thank you very much,
-- 
 Dmytro O. Redchuk



More information about the Freeradius-Users mailing list