~ubuntu-branches/ubuntu/dapper/freeradius/dapper-updates

« back to all changes in this revision

Viewing changes to raddb/radiusd.conf.in

  • Committer: Bazaar Package Importer
  • Author(s): Paul Hampson
  • Date: 2006-01-15 13:34:13 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060115133413-92geefww41y7hqi8
Tags: 1.1.0-1
* ReDebianise upstream tarball:
  - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865
                  2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580
                  draft-kamath-pppext-eap-mschapv2-00

* New FreeRADIUS modules marked stable by new upstream release
  - rlm_perl
  - rlm_sqlcounter
  - rlm_sql_log + radsqlrelay
  - rlm_otp (formerly rlm_x99_token, not built as it depends on OpenSSL)

* Remove upstream-integrated patches:
  - 02_EAP-SIM_doesnt_need_openssl
  - 03_X99_is_not_stable
  - 07_manpage_fixups
  - 09_use_crypth_if_we_have_it
  - 10_escape_entire_ldap_string
  - 11_dont_xlat_possibly_bad_usernames_in_bad_accounting_packets
  - 12_dialup_admin_various_fixes

* More dialup-admin fixes from Arve Seljebu
  - Fix redirects in dialup-admin pages on servers with
    register_globals turned off.
    Closes: #333704
  - HTTP form fields will always fail is_int, use in_numeric instead
    Closes: #335149
  - Created 12_more_dialup_admin_various_fixes

* Update to Policy 3.6.2.0
* Upgrade Debhelper support to V5
* Don't install the .in files with the examples
* Prefer libmysqlclient15-dev
  Closes: #343779
* Shared secrets can only be 31 characters long, note this in clients.conf
  - Created 02_document_actual_shared_secret_maximum_length
  Closes: 344606
* Added support for lsb-init functions

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
## radiusd.conf -- FreeRADIUS server configuration file.
3
3
##
4
4
##      http://www.freeradius.org/
5
 
##      $Id: radiusd.conf.in,v 1.188.2.4 2005/06/11 22:20:40 nbk Exp $
 
5
##      $Id: radiusd.conf.in,v 1.188.2.4.2.4 2005/12/28 19:51:07 aland Exp $
6
6
##
7
7
 
8
8
#       The location of other config files and
794
794
                # compare_check_items = yes
795
795
                # do_xlat = yes
796
796
                # access_attr_used_for_allow = yes
 
797
 
 
798
                #
 
799
                #  By default, if the packet contains a User-Password,
 
800
                #  and no other module is configured to handle the
 
801
                #  authentication, the LDAP module sets itself to do
 
802
                #  LDAP bind for authentication.
 
803
                #
 
804
                #  You can disable this behavior by setting the following
 
805
                #  configuration entry to "no".
 
806
                #
 
807
                #  allowed values: {no, yes}
 
808
                # set_auth_type = yes
797
809
        }
798
810
 
799
811
        # passwd module allows to do authorization via any passwd-like
1145
1157
                # detailperm = 0600
1146
1158
        # }
1147
1159
 
1148
 
        # Create a unique accounting session Id.  Many NASes re-use or
1149
 
        # repeat values for Acct-Session-Id, causing no end of
1150
 
        # confusion.
 
1160
        #
 
1161
        #  The rlm_sql_log module appends the SQL queries in a log
 
1162
        #  file which is read later by the radsqlrelay program.
 
1163
        #
 
1164
        #  This module only performs the dynamic expansion of the
 
1165
        #  variables found in the SQL statements. No operation is
 
1166
        #  executed on the database server. (this could be done
 
1167
        #  later by an external program) That means the module is
 
1168
        #  useful only with non-"SELECT" statements.
 
1169
        #
 
1170
        #  See rlm_sql_log(5) manpage.
 
1171
        #
 
1172
#       sql_log {
 
1173
#               path = ${radacctdir}/sql-relay
 
1174
#               acct_table = "radacct"
 
1175
#               postauth_table = "radpostauth"
 
1176
#
 
1177
#               Start = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \
 
1178
#                NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
 
1179
#                AcctSessionTime, AcctTerminateCause) VALUES                 \
 
1180
#                ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
 
1181
#                '%{Framed-IP-Address}', '%S', '0', '0', '');"
 
1182
#               Stop = "INSERT INTO ${acct_table} (AcctSessionId, UserName,  \
 
1183
#                NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
 
1184
#                AcctSessionTime, AcctTerminateCause) VALUES                 \
 
1185
#                ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
 
1186
#                '%{Framed-IP-Address}', '0', '%S', '%{Acct-Session-Time}',  \
 
1187
#                '%{Acct-Terminate-Cause}');"
 
1188
#               Alive = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \
 
1189
#                NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
 
1190
#                AcctSessionTime, AcctTerminateCause) VALUES                 \
 
1191
#                ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
 
1192
#                '%{Framed-IP-Address}', '0', '0', '%{Acct-Session-Time}','');"
 
1193
#
 
1194
#               Post-Auth = "INSERT INTO ${postauth_table}                   \
 
1195
#                (user, pass, reply, date) VALUES                            \
 
1196
#                ('%{User-Name}', '%{User-Password:-Chap-Password}',         \
 
1197
#                '%{reply:Packet-Type}', '%S');"
 
1198
#       }
 
1199
 
 
1200
        #
 
1201
        #  Create a unique accounting session Id.  Many NASes re-use
 
1202
        #  or repeat values for Acct-Session-Id, causing no end of
 
1203
        #  confusion.
1151
1204
        #
1152
1205
        #  This module will add a (probably) unique session id 
1153
1206
        #  to an accounting packet based on the attributes listed
1323
1376
                cache-size = 5000
1324
1377
        }
1325
1378
 
 
1379
        #
 
1380
        #  This module is an SQL enabled version of the counter module.
 
1381
        #
 
1382
        #  Rather than maintaining seperate (GDBM) databases of
 
1383
        #  accounting info for each counter, this module uses the data
 
1384
        #  stored in the raddacct table by the sql modules. This
 
1385
        #  module NEVER does any database INSERTs or UPDATEs.  It is
 
1386
        #  totally dependent on the SQL module to process Accounting
 
1387
        #  packets.
 
1388
        #
 
1389
        #  The 'sqlmod_inst' parameter holds the instance of the sql
 
1390
        #  module to use when querying the SQL database. Normally it
 
1391
        #  is just "sql".  If you define more and one SQL module
 
1392
        #  instance (usually for failover situations), you can
 
1393
        #  specify which module has access to the Accounting Data
 
1394
        #  (radacct table).
 
1395
        #
 
1396
        #  The 'reset' parameter defines when the counters are all
 
1397
        #  reset to zero.  It can be hourly, daily, weekly, monthly or
 
1398
        #  never.  It can also be user defined. It should be of the
 
1399
        #  form:
 
1400
        #       num[hdwm] where:
 
1401
        #       h: hours, d: days, w: weeks, m: months
 
1402
        #       If the letter is ommited days will be assumed. In example:
 
1403
        #       reset = 10h (reset every 10 hours)
 
1404
        #       reset = 12  (reset every 12 days)
 
1405
        #
 
1406
        #  The 'key' parameter specifies the unique identifier for the
 
1407
        #  counter records (usually 'User-Name').
 
1408
        #
 
1409
        #  The 'query' parameter specifies the SQL query used to get
 
1410
        #  the current Counter value from the database. There are 3
 
1411
        #  parameters that can be used in the query:
 
1412
        #               %k      'key' parameter
 
1413
        #               %b      unix time value of beginning of reset period
 
1414
        #               %e      unix time value of end of reset period
 
1415
        #
 
1416
        #  The 'check-name' parameter is the name of the 'check'
 
1417
        #  attribute to use to access the counter in the 'users' file
 
1418
        #  or SQL radcheck or radcheckgroup tables.
 
1419
        #
 
1420
        #  DEFAULT  Max-Daily-Session > 3600, Auth-Type = Reject
 
1421
        #      Reply-Message = "You've used up more than one hour today"
 
1422
        #
 
1423
        sqlcounter dailycounter {
 
1424
                counter-name = Daily-Session-Time
 
1425
                check-name = Max-Daily-Session
 
1426
                sqlmod-inst = sql
 
1427
                key = User-Name
 
1428
                reset = daily
 
1429
 
 
1430
                # This query properly handles calls that span from the
 
1431
                # previous reset period into the current period but
 
1432
                # involves more work for the SQL server than those
 
1433
                # below
 
1434
                query = "SELECT SUM(AcctSessionTime - \
 
1435
                 GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) \
 
1436
                 FROM radacct WHERE UserName='%{%k}' AND \
 
1437
                 UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
 
1438
 
 
1439
                # This query ignores calls that started in a previous
 
1440
                # reset period and continue into into this one. But it
 
1441
                # is a little easier on the SQL server
 
1442
#               query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE \
 
1443
#                UserName='%{%k}' AND AcctStartTime > FROM_UNIXTIME('%b')"
 
1444
 
 
1445
                # This query is the same as above, but demonstrates an
 
1446
                # additional counter parameter '%e' which is the
 
1447
                # timestamp for the end of the period
 
1448
#               query = "SELECT SUM(AcctSessionTime) FROM radacct \
 
1449
#                WHERE UserName='%{%k}' AND AcctStartTime BETWEEN \
 
1450
#                FROM_UNIXTIME('%b') AND FROM_UNIXTIME('%e')"
 
1451
        }
 
1452
 
 
1453
        sqlcounter monthlycounter {
 
1454
                counter-name = Monthly-Session-Time
 
1455
                check-name = Max-Monthly-Session
 
1456
                sqlmod-inst = sql
 
1457
                key = User-Name
 
1458
                reset = monthly
 
1459
 
 
1460
                # This query properly handles calls that span from the
 
1461
                # previous reset period into the current period but
 
1462
                # involves more work for the SQL server than those
 
1463
                # below
 
1464
                query = "SELECT SUM(AcctSessionTime - \
 
1465
                 GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) \
 
1466
                 FROM radacct WHERE UserName='%{%k}' AND \
 
1467
                 UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
 
1468
 
 
1469
                # This query ignores calls that started in a previous
 
1470
                # reset period and continue into into this one. But it
 
1471
                # is a little easier on the SQL server
 
1472
#               query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE \
 
1473
#                UserName='%{%k}' AND AcctStartTime > FROM_UNIXTIME('%b')"
 
1474
 
 
1475
                # This query is the same as above, but demonstrates an
 
1476
                # additional counter parameter '%e' which is the
 
1477
                # timestamp for the end of the period
 
1478
#               query = "SELECT SUM(AcctSessionTime) FROM radacct \
 
1479
#                WHERE UserName='%{%k}' AND AcctStartTime BETWEEN \
 
1480
#                FROM_UNIXTIME('%b') AND FROM_UNIXTIME('%e')"
 
1481
        }
 
1482
 
 
1483
        #
1326
1484
        # The "always" module is here for debugging purposes. Each
1327
1485
        # instance simply returns the same result, always, without
1328
1486
        # doing anything.
1509
1667
                maximum-timeout = 0
1510
1668
        }
1511
1669
 
1512
 
        # ANSI X9.9 token support.  Not included by default.
1513
 
        # $INCLUDE  ${confdir}/x99.conf
 
1670
        # OTP token support.  Not included by default.
 
1671
        # $INCLUDE  ${confdir}/otp.conf
1514
1672
 
1515
1673
}
1516
1674
 
1796
1954
        #  See "Accounting queries" in sql.conf
1797
1955
#       sql
1798
1956
 
 
1957
        #
 
1958
        #  Instead of sending the query to the SQL server,
 
1959
        #  write it into a log file.
 
1960
        #
 
1961
#       sql_log
1799
1962
 
1800
1963
        #  Cisco VoIP specific bulk accounting
1801
1964
#       pgsql-voip
1829
1992
#       reply_log
1830
1993
 
1831
1994
        #
1832
 
        #  After authenticating the user, do another SQL qeury.
 
1995
        #  After authenticating the user, do another SQL query.
1833
1996
        #
1834
1997
        #  See "Authentication Logging Queries" in sql.conf
1835
1998
#       sql
1836
1999
 
1837
2000
        #
 
2001
        #  Instead of sending the query to the SQL server,
 
2002
        #  write it into a log file.
 
2003
        #
 
2004
#       sql_log
 
2005
 
 
2006
        #
1838
2007
        #  Un-comment the following if you have set
1839
2008
        #  'edir_account_policy_check = yes' in the ldap module sub-section of
1840
2009
        #  the 'modules' section.