unlang/python "scripting" for gateway and dns servers

Alan DeKok aland at deployingradius.com
Tue Feb 6 17:56:44 CET 2018


On Feb 6, 2018, at 10:56 AM, Michael Duckett <mduckett at gmail.com> wrote:
> 
> I'd like to derive the gateway based on unlang rules from the assigned ip
> address/mask I store in ldap.  In what configuration file would I put the
> unlang or python code to implement the rule?

  Read raddb/mods-available/python

> For DNS servers, i want to use a subset of the username in something like a
> case/switch statement.  Can I use the username in the accept request during
> the authorization phase?

  Yes.

>  Where would i put this code (preferrably python
> but could use unlang)?

  If you're just editing attributes, use unlang.  It will be MUCH simpler, and faster.

>  Would I put in the authorize part of the default
> config file?

  If you want.  Or, the post-auth section.

  The default configuration files come with *lots* of comments which explain what each section does.  It helps to read them.

  Alan DeKok.




More information about the Freeradius-Users mailing list