Virtual server with dedicated database

Alan DeKok aland at deployingradius.com
Fri May 6 13:30:57 CEST 2016


On May 6, 2016, at 5:22 AM, Lorenzo Milesi via Freeradius-Users <freeradius-users at 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.




More information about the Freeradius-Users mailing list