SQL and Huntgroups
gregoire.leroy at retenodus.net
gregoire.leroy at retenodus.net
Fri Apr 19 17:05:18 CEST 2013
Hello,
I'm translating a flat file configuration into a MySQL configuration,
but I have some difficulties with huntgroups.
An example of what I have in my flat file :
21 example at domain>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Cleartext-Password := "password"
22 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Service-Type = Framed-User,
23 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Framed-Protocol = PPP,
24 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Tunnel-Type = L2TP,
25 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Tunnel-Medium-Type = IP,
26 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Tunnel-Assignment-ID = "RAN.DOM.I.P",
27 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Tunnel-Server-Endpoint = "RAN.DOM.I.P",
28 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Tunnel-Client-Auth-ID = "auth_id",
29 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Tunnel-Password = "password_tunnel",
30 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Fall-Through = Yes
31
32 example at domain>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Cleartext-Password := "password",
Huntgroup-Name == "one_huntgroup_name"
33 >⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅>⋅⋅⋅⋅⋅⋅⋅Framed-IP-Address = STAT.IC.I.P
So, if the request doesn't have the huntgroup set, only the first part
is applied. Else, both are applied.
In SQL, I'm going to create a group "example_users", with all the
common data (line 22 to 30), an user "example at domain" who belongs to
"example_users".
I'm going to create an entry in radhuntgroup, with my
"one_huntgroup_name" and the IP of my NAS.
Now, I see one problem : how can I differenciate when a request has the
user/pass/huntgroup and when it has only the user/pass ? I suppose that
create 3 entries in readcheck won't work because it seems awkward.
( example at domain | Cleartext-Password | password | =:
example at domain | Huntgroup-Name | one_huntgroup_name | ==
example at domain | Cleartext-Password | password | =:
)
Does someone know a solution to this problem ?
Thank you,
Regards,
Grégoire
More information about the Freeradius-Users
mailing list