O'Reilly logo

FreeRADIUS Beginner's Guide by Dirk van der Walt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required