Huntgroups with NAS-Port-Id or NAS-Port

Jan Hugo Prins jhp at jhprins.org
Fri Oct 18 17:13:42 CEST 2019


What I want to do is differentiate in what to send to a users based on
his authentication and huntgroup.
This works fine, except for the fact that I can't select the proper
huntgroup at the moment on this specific NAS because I need to
differentiate on the port the client is connected on. What I could do,
is update the huntgroup in the auth-detail using a policy with unlang:

update_Huntgroup {
    if (huntgroup == "ers5900" and NAS-Port == "3/1") {
        update request {
            &huntgroup := "ers5900edge"
        }
        updated
    }
}

But then I also have to create a whole lot of code to make the correct
decisions. Better just fill the huntgroup file with enough lines to make
the correct decision.

Jan Hugo




My goal is to differentiate between ports where the user

On 10/18/19 4:06 PM, Alan DeKok wrote:
> On Oct 18, 2019, at 9:52 AM, Jan Hugo Prins <jhp at jhprins.org> wrote:
>> In the past I created something to update some variables in the request
>> for some corner cases. Is this what I should do here as well?
>   To do what?
>
>> Create a policy that is something like:
>>
>> update_NAS_Port_Id {
>>     if (NAS-IP-Address == "192.168.203.126") {
>>         update request {
>>             &NAS-Port-Id := "%{request:NAS-Port}"
>>         }
>>         updated
>>     }
>>
>> And include this policy in the authorize section of my config?
>   Why?  What is the goal?
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>





More information about the Freeradius-Users mailing list