I am wanting to use FreeRADIUS with REDIS for authorisation and accounting. I am running FreeRADIUS 3.0.3.

I note the rlm_rediswho module, which appears to be used for caching recent accounting records for users.

I also note a rlm_redisn module that appears to be the fore bearer of the current rlm_redis module.

The redis module configuration file does not give any guidance on how to configure authorisation queries etc, but the rlm_redisn module does have syntax for this in it's example file (see http://free.oxymium.net/freeradius/rlm_redisn/redisn.example)

If I try and add the redis module to the authorisation section in sites-enabled/default, I get the following error:

Thu Sep  4 02:06:08 2014 : Error: /etc/freeradius/sites-enabled/default[332]: "redis" modules aren't allowed in 'authorize' sections -- they have no such method.
Thu Sep  4 02:06:08 2014 : Error: /etc/freeradius/sites-enabled/default[220]: Errors parsing authorize section. 

1 Answer 1


The REDIS module is not meant to be used directly, but referenced from other modules like rlm_rediswho.

There is one exception to that, in that it appears to register a string expansion matching the module name.

update control {
    Cleartext-Password := "%{redis:<redis query>}"
    Group := "%{redis:<redis query>}"

If you want authorization logic you'll have to write you own module, or retrieve individual attributes using something like the above string expansions.

  • Thanks for the clarification - so can you use the string expansion in a conditional unlang statement as an example?
    – mixja
    Sep 3, 2014 at 23:38
  • if ("%{redis:<redis query>}" == &User-Pasword) Sep 4, 2014 at 11:28
  • Thanks - I have successfully implemented a basic test using this approach. Can you advise if REDIS returns multiple values from a query, is this returned as string array processable by unlang. E.g. if "%{redis:<redis query>[n]}" or something to that affect...
    – mixja
    Sep 5, 2014 at 22:58
  • No, it will return the first value only. Sep 6, 2014 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.