freeradius with multi mysql database and multi virtual server
mohamad buvaydanı
starking123eng at gmail.com
Wed Nov 14 07:01:08 CET 2018
favorit
<https://stackoverflow.com/questions/53293884/freeradius-with-multi-mysql-database-and-multi-virtual-server#>I
have tow NAS and I want to run freeradius server with tow database (one
database for every NAS); I have tow sql modules the first one is SQL and
the another one is SQL1 the SQL module configured to connect to radius
database , SQL1 configured to connect to radius2 database . in
/etc/freeradius/sites-enabled
folder I created new virtual server which has name student so in that
folder there are tow file (default, student); I configured default to work
with SQL module which connect to radius database,whereas I configured
student to connect to SQL1 module which connect to radius2 database . I
added this unlang code in every virtual server file to get information from
every database
Tmp-String-0 := "%{sql:SELECT value from radcheck WHERE
attribute='CS-Total-Octets-Daily' and username='%{User-Name}'}"
Tmp-String-1 := "%{sql:SELECT sum(AcctInputOctets)+sum(AcctOutputOctets) AS
Total FROM radacct where DATE(AcctstartTime )= CURDATE() AND
radacct.username='%{User-Name}'}"
but my problem is that the student virtual server trying to get this data
from radius database which is belong to SQL module even if I configured it
to work with SQL1 . why is that happen , and how can I solve it
More information about the Freeradius-Users
mailing list