Time for action – limiting a user's simultaneous sessions
The default
virtual server defined in the sites-enabled/default
file has a session
section:
# Session database, used for checking Simultaneous-Use.
# Either the radutmp or rlm_sql module can handle this.
# The rlm_sql module is *much* faster
session {
radutmp
#
# See "Simultaneous Use Checking Queries" in sql.conf
# sql
}
We want a fast system, so we'll use the recommended sql
. To use SQL as a session database we also need to use sql
for accounting.
- Ensure you have a working SQL database configuration as described in Chapter 5.
- Edit the
sites-enabled/default
file, and make the following changes. We will not use SQL as a user store, so comment outsql
in theauthorize
section. - Uncomment
sql
in theaccounting
section. This will result in accounting requests written into the SQL database. - Uncomment
sql
in thesession
section and also commentradutmp
out in the session section...