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.

  1. Ensure you have a working SQL database configuration as described in Chapter 5.
  2. Edit the sites-enabled/default file, and make the following changes. We will not use SQL as a user store, so comment out sql in the authorize section.
  3. Uncomment sql ...

Get FreeRADIUS Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.