Hi. I have created a second virtual server on my FreeRADIUS 2.2.9 with a dedicated database, but I'm having troubles with checks. My goal is to have a second port which is identical to the first, same db structure, but separate user base. In sql.conf I modified the standard 'sql' instance and renamed it to 'sql_principale', then created a 'sql_biblioteche' for the second virtual server. In the virtual server I modified all the 'sql' occurrences with the new instance, and the 'default' server with 'sql_principale'. Everything seems to be ok, but I just noticed that restrictions check were not applied anymore. For example Max-Daily-Session was not enforced. So I noticed I didn't replace the sqlmod-inst option in counter.conf. After doing that I realized that this means the same Max-Daily-Session on both virtual server would be checked against the first database only! So, since the sql instance is bonded to the database check, this means I would have to redefine and duplicate all checks for the second database? I'd like to understand if this is the correct way to go, because I'd rather not duplicate and differentiate the attributes between the two servers. Did I miss something in the configuration, or is this the only way to go? thanks -- Lorenzo Milesi - lorenzo.milesi@yetopen.it YetOpen S.r.l. - http://www.yetopen.it/
On May 6, 2016, at 5:22 AM, Lorenzo Milesi via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
Hi. I have created a second virtual server on my FreeRADIUS 2.2.9 with a dedicated database, but I'm having troubles with checks. My goal is to have a second port which is identical to the first, same db structure, but separate user base.
In sql.conf I modified the standard 'sql' instance and renamed it to 'sql_principale', then created a 'sql_biblioteche' for the second virtual server. In the virtual server I modified all the 'sql' occurrences with the new instance, and the 'default' server with 'sql_principale'.
That's a start. You also need to change all uses of "%{sql:...}" to use the new names.
Everything seems to be ok, but I just noticed that restrictions check were not applied anymore. For example Max-Daily-Session was not enforced. So I noticed I didn't replace the sqlmod-inst option in counter.conf. After doing that I realized that this means the same Max-Daily-Session on both virtual server would be checked against the first database only! So, since the sql instance is bonded to the database check, this means I would have to redefine and duplicate all checks for the second database?
Yes.
I'd like to understand if this is the correct way to go, because I'd rather not duplicate and differentiate the attributes between the two servers.
Did I miss something in the configuration, or is this the only way to go?
For now, yes. There may be ways to fix it, but I'd have to take a deeper look. Alan DeKok.
That's a start. You also need to change all uses of "%{sql:...}" to use the new names.
Yes I found it, I forgot to add it while writing the email
I'd like to understand if this is the correct way to go, because I'd rather not duplicate and differentiate the attributes between the two servers.
Did I miss something in the configuration, or is this the only way to go?
For now, yes. There may be ways to fix it, but I'd have to take a deeper look.
Oh. Ok, thanks. When you say "I'd have to take a deeper look" you mean there's a chance not to duplicate all the checks, or that you need to implement a different way of doing it in the (future) code? thanks again -- Lorenzo Milesi - lorenzo.milesi@yetopen.it YetOpen S.r.l. - http://www.yetopen.it/
On May 6, 2016, at 8:34 AM, Lorenzo Milesi via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
When you say "I'd have to take a deeper look" you mean there's a chance not to duplicate all the checks, or that you need to implement a different way of doing it in the (future) code?
I mean I'll have to find the best way to have multiple SQL modules without changing all of the SQL configuration. Alan DeKok.
participants (2)
-
Alan DeKok -
Lorenzo Milesi