Steve Bertrand
and 1 contributors


freeradius_database.conf - Configuration file for FreeRADIUS::Database.


freeradius_database.conf is the primary configuration file for the FreeRADIUS::Database module.

By default, it is installed into /usr/local/etc as freeradius_database.conf-dist.

You will (at this time) need to manually rename this file to freeradius_database.conf, and set the configuration variables for your site.


The configuration file categories are used to ease human classification, and by the system internally.

[ Version ]

Contains the system version number. Do not change it.

[ Global ]

Configuration settings that are used globally by the system.


This setting MUST comply with an entry that is supplied by a call to DateTime::TimeZone->all_names().

Default: America/New_York


You can aggregate NAS devices into classes based on their IP address or name by enabling this setting. Enabling this will rename all of your NASIPAddress column entries so long as the IP of the NAS is listed after a NAS name classification in the config file.

See the [ RAS ] section on classification/aggregating details.

Valid values: 0, 1.

Default: off.


Toggle whether you want to delete the data from the `radacct` table after having it archived.

Valid values: 0, 1.

Default: off.


How many months you want to go back before performing the month archive. delete_after_archive is affected by this setting.

Example: if this setting is set to 3, then the system will archive the month prior to three months ago. If delete_after_archive is true, the archived month will be deleted from the main `radacct` table.

A setting of 0 indicates that you want to archive last months data.

Valid values: 0, 1-36

Default: 3.


Set by the installer. This can be changed after the configuration file is moved to the new file system location.

Default: set by installer. If installer defaults were accepted, /usr/local/etc


Set by the installer. This can be changed after the scripts are moved to the new file system location, and after any automation (ie. cron) changes are made.

Default: set by installer. If installer defaults were accepted, /usr/local/sbin


Used exclusively for `make test`. This sets the system to use a test-only configuration file, and forces the system to use a test-only database which contains a pre-defined dataset.

THIS IS ON BY DEFAULT. You will need to disable it.

Valid values: 0, 1.

Default: ON

[ RAS ]

This section is where you define your classes for your NAS/RAS equipment.

RAS classification is used within the accounting aggregation functions. By 'classifying' your RAS equipment, you can group numerous RAS gear that perform similar functions into a searchable item by name.

For instance, if you have 10 ADSL RASs, all on different IP addresses, using this classification system, you can aggregate your user sessions into one 'class'.

If aggregating daily totals for user 'steveb', who logged in numerous times across four RASs within the day because of modem resets, his daily totals from all four RASs would be summed together and collectively aggregated into a single entry under the 'ADSL' `class`.

If the [ Global ] configuration varable ras_classification is set to false, this section will be ignored.

A class is defined by assigning a name, followed by a comma-separated list of IP addresses/prefixes without their trailing prefix length, or a comma separated list of NAS names.

Currently, the classification is done via a regex-like check, and needs significant improvement to be able to use proper x.x.x.x/xx style prefixes.

For example:

        # class any IP that begins with 10.0.0, or 172.16 as adsl:

        adsl = 10.0.0, 172.16

        # class any IP that matches exactly, or begins with 
        # 10.1.5 as dialup

        dialup =, 10.1.5

        # class any IP that is within range as hotspot

        hotspot =

        # class an IPv6 box as 'special' ;)

        special = 2001:0db8:dead:beef, 2001:0db8:1:1::b5

        # you can also class based on name, if your server logs its
        # NAS name instead of IP

        named_class =,,

You can use any names you wish. The defaults are there for illustrative purposes only.

[ Database ]


Informs the system that you have a MySQL cluster setup, and allows writing to the master server, while load-balancing reads across the slaves.

For this directive to have any effect, you must have at least one slave_servers, and a slave must be configured.

Do not enable this unless you have a proper MySQL replication cluster configured. The system will cease to function if these settings are incorrect.

Note that 'slave_1_source' etc are displayed in the default configuration file for example purposes. Additional slaves are configured the same way, but with the integer incremented.

Valid values: 0, 1.

Default: off.


Informs the system that the master database server in the cluster is offline for maintenance. During this time, all writes will be blocked.

Valid values: 0, 1.

Default: off.


The number of read-only slave servers you have in your cluster.

Valid values: any integer.

Default: 0.


The DBI connect string of the database that will be used to accept writes while the master cluster server is offline for maintenance.

Valid value: any DBI connect source string.



MySQL DBI source string.


Username of the user who has proper privileges on the master_source.


Password of 'master_user'.


See master_source.


User for slave_1_source.




Same as master_source, but used exclusively when a developer is running tests after a code update.


User for the test database.


Password for the test database user.