help! seperate database for accounting

Stacy Trippe strippe at corp.tecinfo.net
Wed Apr 16 23:42:17 CEST 2014


What is the best place to place directives to make separate calls to a separate database for accounting table updates.   

I want to use a database -- radius -- for strictly -- radcheck, reply, and radgroupcheck, group reply, and usergroup tables -- the radacct table I want to strictly be updated in a separate database:  accounting.  

The reason for this is to keep database replication turned on for those check/reply tables, and not worry so much about replicating accounting tables between the database servers.

I am running the following version of FreeRADIUS:


radiusd: FreeRADIUS Version 2.2.4, for host i686-pc-linux-gnu, built on Apr  8 2014 at 18:21:52


At this point, I have SQL working for authorization and authentication purposes, and the databases are replicating between all 3 database servers.

In radiusd.conf:
        $INCLUDE sql1.conf
        $INCLUDE sql2.conf
        $INCLUDE sqlacct1.conf
        $INCLUDE sqlacct2.conf

In sites-enabled\default:
authorize {
...
        redundant {
                sql1
                sql2
        }
...
accounting {
       acct_unique
        detail
        unix
        radutmp
      sql sqlacct1 {
                fail            = 1
                notfound        = return
                noop            = 2
                ok              = return
                updated         = 3
                reject          = return
                userlock        = 4
                invalid         = 5
                handled         = 6
                }

Despite this, and despite the separate connection setting in sqlacct1.conf vs. sql1.conf  -- radius still sending accounting data to radius:/radacct table for insertion.

Sql1.conf:
sql {
...
        # Database type
        # Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
        # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
        driver = "rlm_sql_mysql"

        # Connect info
        server = "127.0.0.1"
        login = "raduser"
        password = "XXXXXXXX"

        # Database table configuration
        radius_db = "radius"
...

Sqlacct1.conf:
Sql {
...
        # Database type
        # Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
        # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
        driver = "rlm_sql_mysql"

        # Connect info
        server = "127.0.0.1"
        login = "raduser"
        password = "XXXXXXXX"

        # Database table configuration
        radius_db = "accounting"
...

Stacy



More information about the Freeradius-Users mailing list