Skip to content
Antti edited this page Sep 13, 2010 · 5 revisions

Welcome to the rlm_ruby wiki!

rlm_ruby is a Freeradius module, which allows you to script radius with the ruby.
It’s very similar to rlm_python, but with ruby. It’s currently in alpha state.

You should create a ruby script file, specify it in module config like this:


ruby{
modulename = “Radiusd”
scriptfile = “/home/rlm_ruby/radius.rb”
}

In the radius.rb you should create a module, then add some functions, which will be called when a corresponding radius
request occur, functions will have one argument. The argument is an array with value-pairs from request→packet→vps.
Value-pairs are in form: [“name”,“value:tag”].
Your ruby function can return any radius return value like: RLM_MODULE_OK, or it can return an array, in form of [return_value,[reply_value_pairs], [configitems_value_pairs]].
Items in reply_value_pairs and configitems_value_pairs will be filled into request→reply→vps and request→config_items correspondingly.

Known problems:

  • You’ll probably need to disable GC (rb_gc_disable();), or else radiusd will crash when GC is started from another thread
Clone this wiki locally