unlang/python "scripting" for gateway and dns servers
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? 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? Where would i put this code (preferrably python but could use unlang)? Would I put in the authorize part of the default config file? Thanks
On Feb 6, 2018, at 10:56 AM, Michael Duckett <mduckett@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.
Thank you Alan On Feb 6, 2018 11:57 AM, "Alan DeKok" <aland@deployingradius.com> wrote: On Feb 6, 2018, at 10:56 AM, Michael Duckett <mduckett@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. - List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
participants (2)
-
Alan DeKok -
Michael Duckett