Time for action – limiting a user's usage

The following sections will demonstrate how to limit Internet usage.

Activating a daily counter

The counter module has the following counter defined by default:

counter daily {
    filename = ${db_dir}/db.daily
    key = User-Name
    count-attribute = Acct-Session-Time
    reset = daily
    counter-name = Daily-Session-Time
    check-name = Max-Daily-Session
    reply-name = Session-Timeout
    allowed-servicetype = Framed-User
    cache-size = 5000

Modify the counter as follows:

  1. Edit the sites-enabled/default file in the FreeRADIUS configuration directory. Uncomment daily in both the authorize and accounting sections. Also, uncomment daily in the instantiate section of the radius.conf file to ensure proper instantiation of the counter.
  2. The ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.