Multiple Customer Databases

A.L.M.Buxey at A.L.M.Buxey at
Mon Jul 25 17:23:43 CEST 2016


> I have several customers with their own database. I do logging
> accounting data to sql. My problem is that any accounting data of
> any customers is logged to any radacct tables. E.g. accounting data
> of customer1 is logged to (sql) customer1.radacct, but also to
> customer2.radacct and vise versa.

because thats how you've configured it

> accounting {
> 	customer1
> 	customer2
> }

so when your server goes through accounting section with a packet it does
both of those.

you will need to write some policy/unlang to ensure that customer1 SQL only gets called when relevant etc eg

if (%{Called-Station-ID =~ /10\.90\.5/}) {
elsif (%{Called-Station-ID =~ /192\.168\.1/}) {

or somesuch decision 

alternatively (and much better!) use virtual-servers in the clients.conf and
ensure that each customer gets their own V-S instance and then just call customer1
or cusotmer2 etc in the accounting section.


More information about the Freeradius-Users mailing list