SQL and Huntgroups

gregoire.leroy at retenodus.net gregoire.leroy at retenodus.net
Thu Apr 25 10:44:21 CEST 2013


>> Now, documentation seems to say I have to add something in my
>> authorize{} section, but the only mention of authorize in my current
>> configuration is :
>>
>> authorize {
>>                 ok
>>
>>                 # respond to the Status-Server request.
>>                 Autz-Type Status-Server {
>>                         ok
>>                 }
>>         }
>>
>> Did I miss something ? Am I more clear ?
>
>   Uh... someone *destroyed* your configuration.  That's not right.
>
>   Are you sure you're using the "users" file?  The "files" module 
> isn't
> listed above... so it looks like you're not using it.

My fault : I've open status instead of default. For the step 4, I have 
to :
1) Retrieve the huntgroup
2) Compare it with what the user sends
3) If it matches, give him his specific statement.

So, if I understand correctly in the authorize section, I have to 
maintain a radipusers table for my IP/users and do something like :

1)
update request {
Huntgroup-Name := "%{sql:SELECT groupname FROM radhuntgroup WHERE 
nasipaddress='%{NAS-IP-Address}'}"
}

2)
if Huntgroup-Name == 'one_huntgroup_name' {
3)
Framed-IP-Address = "%{sql:SELECT ip FROM radipusers WHERE 
user='%{username}'}"
}

Is there something wrong in what I just said ?

Thanks you,
Regards,
Grégoire Leroy


More information about the Freeradius-Users mailing list