~ubuntu-branches/ubuntu/natty/freeradius/natty-updates

« back to all changes in this revision

Viewing changes to raddb/radiusd.conf.in

  • Committer: Bazaar Package Importer
  • Author(s): Josip Rodin
  • Date: 2009-11-23 03:57:37 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20091123035737-zsgtzhfych8hir68
Tags: 2.1.7+dfsg-1
* Adopting the package, closes: #536623.
* New upstream version, closes: #513484.
  + Fixes the blooper in unlang evaluation logic, closes: #526175.
* Used quilt (and added README.source), and moved upstream file patching
  into debian/patches/. The source is no longer in collab-maint git
  (to make it simpler for me to finally get this out the door), but
  kept the .gitignore should we need that again.
* Dropped the dialup_admin/bin/backup_radacct patch (integrated upstream).
* Dropped the raddb/Makefile patch (problem no longer exists upstream).
* Dropped the lib/packet.c lib/radius.c main/listen.c patches (was from
  upstream 2.0.5 anyway).
* Dropped references to otp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Dropped references to snmp.conf, it no longer exists upstream.
  Keep removing the conffile statoverride in prerm.
* Ship /etc/freeradius/modules/* in the freeradius package.
* Stop shipping sites-enabled symlinks in the package and instead create
  them only on initial install, thanks to Matej Vela, closes: #533396.
* Add export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" to the init script
  at the request of John Morrissey, closes: #550143.
* Stop installing /var/run/freeradius in the package to silence Lintian.
  The init script already recreates it at will.
* Remove executable bit from example.pl to silence Lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
## radiusd.conf -- FreeRADIUS server configuration file.
4
4
##
5
5
##      http://www.freeradius.org/
6
 
##      $Id: radiusd.conf.in,v 1.272 2008/04/26 15:14:33 aland Exp $
 
6
##      $Id$
7
7
##
8
8
 
9
9
######################################################################
60
60
raddbdir = @raddbdir@
61
61
radacctdir = @radacctdir@
62
62
 
 
63
#
 
64
#  name of the running server.  See also the "-n" command-line option.
 
65
name = radiusd
 
66
 
63
67
#  Location of config and logfiles.
64
68
confdir = ${raddbdir}
65
 
run_dir = ${localstatedir}/run/freeradius
 
69
run_dir = ${localstatedir}/run/${name}
66
70
 
67
71
# Should likely be ${localstatedir}/lib/radiusd
68
 
db_dir = $(raddbdir)
 
72
db_dir = ${raddbdir}
69
73
 
70
74
#
71
75
# libdir: Where to find the rlm_* modules.
108
112
#
109
113
#  This file is written when ONLY running in daemon mode.
110
114
#
111
 
#  e.g.:  kill -HUP `cat /var/run/freeradius/freeradius.pid`
112
 
#
113
 
pidfile = ${run_dir}/freeradius.pid
114
 
 
115
 
 
116
 
# user/group: The name (or #number) of the user/group to run freeradius as.
 
115
#  e.g.:  kill -HUP `cat /var/run/radiusd/radiusd.pid`
 
116
#
 
117
pidfile = ${run_dir}/${name}.pid
 
118
 
 
119
#  chroot: directory where the server does "chroot".
 
120
#
 
121
#  The chroot is done very early in the process of starting the server.
 
122
#  After the chroot has been performed it switches to the "user" listed
 
123
#  below (which MUST be specified).  If "group" is specified, it switchs
 
124
#  to that group, too.  Any other groups listed for the specified "user"
 
125
#  in "/etc/group" are also added as part of this process.
 
126
#
 
127
#  The current working directory (chdir / cd) is left *outside* of the
 
128
#  chroot until all of the modules have been initialized.  This allows
 
129
#  the "raddb" directory to be left outside of the chroot.  Once the
 
130
#  modules have been initialized, it does a "chdir" to ${logdir}.  This
 
131
#  means that it should be impossible to break out of the chroot.
 
132
#
 
133
#  If you are worried about security issues related to this use of chdir,
 
134
#  then simply ensure that the "raddb" directory is inside of the chroot,
 
135
#  end be sure to do "cd raddb" BEFORE starting the server.
 
136
#
 
137
#  If the server is statically linked, then the only files that have
 
138
#  to exist in the chroot are ${run_dir} and ${logdir}.  If you do the
 
139
#  "cd raddb" as discussed above, then the "raddb" directory has to be
 
140
#  inside of the chroot directory, too.
 
141
#
 
142
#chroot = /path/to/chroot/directory
 
143
 
 
144
# user/group: The name (or #number) of the user/group to run radiusd as.
117
145
#
118
146
#   If these are commented out, the server will run as the user/group
119
147
#   that started it.  In order to change to a different user/group, you
121
149
#
122
150
#   We STRONGLY recommend that you run the server with as few permissions
123
151
#   as possible.  That is, if you're not using shadow passwords, the
124
 
#   user and group items below should be set to 'nobody'.
125
 
#
126
 
#    On SCO (ODT 3) use "user = nouser" and "group = nogroup".
 
152
#   user and group items below should be set to radius'.
127
153
#
128
154
#  NOTE that some kernels refuse to setgid(group) when the value of
129
155
#  (unsigned)group is above 60000; don't use group nobody on these systems!
134
160
#  that the debugging mode server is running as a user that can read the
135
161
#  shadow info, and the user listed below can not.
136
162
#
137
 
user = freerad
138
 
group = freerad
 
163
#  The server will also try to use "initgroups" to read /etc/groups.
 
164
#  It will join all groups where "user" is a member.  This can allow
 
165
#  for some finer-grained access controls.
 
166
#
 
167
#user = radius
 
168
#group = radius
139
169
 
140
170
#  max_request_time: The maximum time (in seconds) to handle a request.
141
171
#
215
245
        #       proxy   IP to use for sending proxied packets
216
246
        #       detail  Read from the detail file.  For examples, see
217
247
        #               raddb/sites-available/copy-acct-to-home-server
 
248
        #       status  listen for Status-Server packets.  For examples,
 
249
        #               see raddb/sites-available/status
 
250
        #       coa     listen for CoA-Request and Disconnect-Request
 
251
        #               packets.  For examples, see the file
 
252
        #               raddb/sites-available/coa-server
218
253
        #
219
254
        type = auth
220
255
 
221
256
        #  Note: "type = proxy" lets you control the source IP used for
222
257
        #        proxying packets, with some limitations:
223
258
        #
224
 
        #    * Only ONE proxy listener can be defined.
225
259
        #    * A proxy listener CANNOT be used in a virtual server section.
226
260
        #    * You should probably set "port = 0".
227
261
        #    * Any "clients" configuration will be ignored.
 
262
        #
 
263
        #  See also proxy.conf, and the "src_ipaddr" configuration entry
 
264
        #  in the sample "home_server" section.  When you specify the
 
265
        #  source IP address for packets sent to a home server, the
 
266
        #  proxy listeners are automatically created.
228
267
 
229
268
        #  IP address on which to listen.
230
269
        #  Allowed values are:
338
377
 
339
378
        #
340
379
        #  The logging messages for the server are appended to the
341
 
        #  tail of this file if ${destination} == "files"
 
380
        #  tail of this file if destination == "files"
342
381
        #
343
382
        #  If the server is running in debugging mode, this file is
344
383
        #  NOT used.
346
385
        file = ${logdir}/radius.log
347
386
 
348
387
        #
 
388
        #  If this configuration parameter is set, then log messages for
 
389
        #  a *request* go to this file, rather than to radius.log.
 
390
        #
 
391
        #  i.e. This is a log file per request, once the server has accepted
 
392
        #  the request as being from a valid client.  Messages that are
 
393
        #  not associated with a request still go to radius.log.
 
394
        #
 
395
        #  Not all log messages in the server core have been updated to use
 
396
        #  this new internal API.  As a result, some messages will still
 
397
        #  go to radius.log.  Please submit patches to fix this behavior.
 
398
        #
 
399
        #  The file name is expanded dynamically.  You should ONLY user
 
400
        #  server-side attributes for the filename (e.g. things you control).
 
401
        #  Using this feature MAY also slow down the server substantially,
 
402
        #  especially if you do thinks like SQL calls as part of the
 
403
        #  expansion of the filename.
 
404
        #
 
405
        #  The name of the log file should use attributes that don't change
 
406
        #  over the lifetime of a request, such as User-Name,
 
407
        #  Virtual-Server or Packet-Src-IP-Address.  Otherwise, the log
 
408
        #  messages will be distributed over multiple files.
 
409
        #
 
410
        #  Logging can be enabled for an individual request by a special
 
411
        #  dynamic expansion macro:  %{debug: 1}, where the debug level
 
412
        #  for this request is set to '1' (or 2, 3, etc.).  e.g.
 
413
        #
 
414
        #       ...
 
415
        #       update control {
 
416
        #              Tmp-String-0 = "%{debug:1}"
 
417
        #       }
 
418
        #       ...
 
419
        #
 
420
        #  The attribute that the value is assigned to is unimportant,
 
421
        #  and should be a "throw-away" attribute with no side effects.
 
422
        #
 
423
        #requests = ${logdir}/radiusd-%{%{Virtual-Server}:-DEFAULT}-%Y%m%d.log
 
424
 
 
425
        #
349
426
        #  Which syslog facility to use, if ${destination} == "syslog"
350
427
        #
351
428
        #  The exact values permitted here are OS-dependent.  You probably
373
450
        #
374
451
        auth_badpass = no
375
452
        auth_goodpass = no
 
453
 
 
454
        #  Log additional text at the end of the "Login OK" messages.
 
455
        #  for these to work, the "auth" and "auth_goopass" or "auth_badpass"
 
456
        #  configurations above have to be set to "yes".
 
457
        #
 
458
        #  The strings below are dynamically expanded, which means that
 
459
        #  you can put anything you want in them.  However, note that
 
460
        #  this expansion can be slow, and can negatively impact server
 
461
        #  performance.
 
462
        #
 
463
#       msg_goodpass = ""
 
464
#       msg_badpass = ""
376
465
}
377
466
 
378
467
#  The program to execute to do concurrency checks.
431
520
        #  packet.  If the server responds, it must be alive, and the
432
521
        #  NAS can start using it for real requests.
433
522
        #
 
523
        #  See also raddb/sites-available/status
 
524
        #
434
525
        status_server = yes
435
526
}
436
527
 
470
561
$INCLUDE clients.conf
471
562
 
472
563
 
473
 
# SNMP CONFIGURATION
474
 
#
475
 
#  Snmp configuration is only valid if SNMP support was enabled
476
 
#  at compile time.
477
 
#
478
 
#  To enable SNMP querying of the server, set the value of the
479
 
#  'snmp' attribute to 'yes'
480
 
#
481
 
snmp    = no
482
 
$INCLUDE snmp.conf
483
 
 
484
 
 
485
564
# THREAD POOL CONFIGURATION
486
565
#
487
566
#  The thread pool is a long-lived group of threads which
579
658
        #
580
659
        #  The instance names can then be used in later configuration
581
660
        #  INSTEAD of the original 'name'.  See the 'radutmp' configuration
582
 
        #  below for an example.
583
 
        #
584
 
 
585
 
        # PAP module to authenticate users based on their stored password
586
 
        #
587
 
        #  Supports multiple encryption/hash schemes.  See "man pap"
588
 
        #  for details.
589
 
        #
590
 
        #  The "auto_header" configuration item can be set to "yes".
591
 
        #  In this case, the module will look inside of the User-Password
592
 
        #  attribute for the headers {crypt}, {clear}, etc., and will
593
 
        #  automatically create the attribute on the right-hand side,
594
 
        #  with the correct value.  It will also automatically handle
595
 
        #  Base-64 encoded data, hex strings, and binary data.
596
 
        pap {
597
 
                auto_header = no
598
 
        }
599
 
 
600
 
        # CHAP module
601
 
        #
602
 
        #  To authenticate requests containing a CHAP-Password attribute.
603
 
        #
604
 
        chap {
605
 
                authtype = CHAP
606
 
        }
607
 
 
608
 
        # Pluggable Authentication Modules
609
 
        #
610
 
        #  For Linux, see:
611
 
        #       http://www.kernel.org/pub/linux/libs/pam/index.html
612
 
        #
613
 
        #  WARNING: On many systems, the system PAM libraries have
614
 
        #           memory leaks!  We STRONGLY SUGGEST that you do not
615
 
        #           use PAM for authentication, due to those memory leaks.
616
 
        #
617
 
        pam {
618
 
                #
619
 
                #  The name to use for PAM authentication.
620
 
                #  PAM looks in /etc/pam.d/${pam_auth_name}
621
 
                #  for it's configuration.  See 'redhat/radiusd-pam'
622
 
                #  for a sample PAM configuration file.
623
 
                #
624
 
                #  Note that any Pam-Auth attribute set in the 'authorize'
625
 
                #  section will over-ride this one.
626
 
                #
627
 
                pam_auth = radiusd
628
 
        }
629
 
 
630
 
        # Unix /etc/passwd style authentication
631
 
        #
632
 
        unix {
633
 
                #  As of 1.1.0, the Unix module no longer reads,
634
 
                #  or caches /etc/passwd, /etc/shadow, or /etc/group.
635
 
                #  If you wish to cache those files, see the passwd
636
 
                #  module, above.
637
 
                #
638
 
 
639
 
                #
640
 
                #  The location of the "wtmp" file.
641
 
                #  This should be moved to it's own module soon.
642
 
                #
643
 
                #  The only use for 'radlast'.  If you don't use
644
 
                #  'radlast', then you can comment out this item.
645
 
                #
646
 
                radwtmp = ${logdir}/radwtmp
647
 
        }
 
661
        #  for an example.
 
662
        #
 
663
 
 
664
        #
 
665
        #  As of 2.0.5, most of the module configurations are in a
 
666
        #  sub-directory.  Files matching the regex /[a-zA-Z0-9_.]+/
 
667
        #  are loaded.  The modules are initialized ONLY if they are
 
668
        #  referenced in a processing section, such as authorize,
 
669
        #  authenticate, accounting, pre/post-proxy, etc.
 
670
        #
 
671
        $INCLUDE ${confdir}/modules/
648
672
 
649
673
        #  Extensible Authentication Protocol
650
674
        #
651
675
        #  For all EAP related authentications.
652
676
        #  Now in another file, because it is very large.
653
677
        #
654
 
$INCLUDE eap.conf
655
 
 
656
 
        # Microsoft CHAP authentication
657
 
        #
658
 
        #  This module supports MS-CHAP and MS-CHAPv2 authentication.
659
 
        #  It also enforces the SMB-Account-Ctrl attribute.
660
 
        #
661
 
        mschap {
662
 
                #
663
 
                #  As of 0.9, the mschap module does NOT support
664
 
                #  reading from /etc/smbpasswd.
665
 
                #
666
 
                #  If you are using /etc/smbpasswd, see the 'passwd'
667
 
                #  module for an example of how to use /etc/smbpasswd
668
 
 
669
 
                # if use_mppe is not set to no mschap will
670
 
                # add MS-CHAP-MPPE-Keys for MS-CHAPv1 and
671
 
                # MS-MPPE-Recv-Key/MS-MPPE-Send-Key for MS-CHAPv2
672
 
                #
673
 
                #use_mppe = no
674
 
 
675
 
                # if mppe is enabled require_encryption makes
676
 
                # encryption moderate
677
 
                #
678
 
                #require_encryption = yes
679
 
 
680
 
                # require_strong always requires 128 bit key
681
 
                # encryption
682
 
                #
683
 
                #require_strong = yes
684
 
 
685
 
                # Windows sends us a username in the form of
686
 
                # DOMAIN\user, but sends the challenge response
687
 
                # based on only the user portion.  This hack
688
 
                # corrects for that incorrect behavior.
689
 
                #
690
 
                #with_ntdomain_hack = no
691
 
 
692
 
                # The module can perform authentication itself, OR
693
 
                # use a Windows Domain Controller.  This configuration
694
 
                # directive tells the module to call the ntlm_auth
695
 
                # program, which will do the authentication, and return
696
 
                # the NT-Key.  Note that you MUST have "winbindd" and
697
 
                # "nmbd" running on the local machine for ntlm_auth
698
 
                # to work.  See the ntlm_auth program documentation
699
 
                # for details.
700
 
                #
701
 
                # If ntlm_auth is configured below, then the mschap
702
 
                # module will call ntlm_auth for every MS-CHAP
703
 
                # authentication request.  If there is a cleartext
704
 
                # or NT hashed password available, you can set
705
 
                # "MS-CHAP-Use-NTLM-Auth := No" in the control items,
706
 
                # and the mschap module will do the authentication itself,
707
 
                # without calling ntlm_auth.
708
 
                #
709
 
                # Be VERY careful when editing the following line!
710
 
                #
711
 
                # You can also try setting the user name as:
712
 
                #
713
 
                #       ... --username=%{mschap:User-Name} ...
714
 
                #
715
 
                # In that case, the mschap module will look at the User-Name
716
 
                # attribute, and do prefix/suffix checks in order to obtain
717
 
                # the "best" user name for the request.
718
 
                #
719
 
                #ntlm_auth = "/path/to/ntlm_auth --request-nt-key --username=%{Stripped-User-Name:-%{User-Name:-None}} --challenge=%{mschap:Challenge:-00} --nt-response=%{mschap:NT-Response:-00}"
720
 
        }
721
 
 
722
 
        # Lightweight Directory Access Protocol (LDAP)
723
 
        #
724
 
        #  This module definition allows you to use LDAP for
725
 
        #  authorization and authentication.
726
 
        #
727
 
        #  See doc/rlm_ldap for description of configuration options 
728
 
        #  and sample authorize{} and authenticate{} blocks 
729
 
        #
730
 
        #  However, LDAP can be used for authentication ONLY when the
731
 
        #  Access-Request packet contains a clear-text User-Password
732
 
        #  attribute.  LDAP authentication will NOT work for any other
733
 
        #  authentication method.
734
 
        #
735
 
        #  This means that LDAP servers don't understand EAP.  If you
736
 
        #  force "Auth-Type = LDAP", and then send the server a
737
 
        #  request containing EAP authentication, then authentication
738
 
        #  WILL NOT WORK.
739
 
        #
740
 
        #  The solution is to use the default configuration, which does
741
 
        #  work.
742
 
        #
743
 
        #  Setting "Auth-Type = LDAP" is ALMOST ALWAYS WRONG.  We
744
 
        #  really can't emphasize this enough.
745
 
        #       
746
 
        ldap {
747
 
                #
748
 
                #  Note that this needs to match the name in the LDAP
749
 
                #  server certificate, if you're using ldaps.
750
 
                server = "ldap.your.domain"
751
 
                #identity = "cn=admin,o=My Org,c=UA"
752
 
                #password = mypass
753
 
                basedn = "o=My Org,c=UA"
754
 
                filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
755
 
                #base_filter = "(objectclass=radiusprofile)"
756
 
 
757
 
                #  How many connections to keep open to the LDAP server.
758
 
                #  This saves time over opening a new LDAP socket for
759
 
                #  every authentication request.
760
 
                ldap_connections_number = 5
761
 
 
762
 
                # seconds to wait for LDAP query to finish. default: 20
763
 
                timeout = 4
764
 
 
765
 
                #  seconds LDAP server has to process the query (server-side
766
 
                #  time limit). default: 20
767
 
                #
768
 
                #  LDAP_OPT_TIMELIMIT is set to this value.
769
 
                timelimit = 3
770
 
 
771
 
                #
772
 
                #  seconds to wait for response of the server. (network
773
 
                #   failures) default: 10
774
 
                #
775
 
                #  LDAP_OPT_NETWORK_TIMEOUT is set to this value.
776
 
                net_timeout = 1
777
 
 
778
 
                #
779
 
                #  This subsection configures the tls related items
780
 
                #  that control how FreeRADIUS connects to an LDAP
781
 
                #  server.  It contains all of the "tls_*" configuration
782
 
                #  entries used in older versions of FreeRADIUS.  Those
783
 
                #  configuration entries can still be used, but we recommend
784
 
                #  using these.
785
 
                #
786
 
                tls {
787
 
                        # Set this to 'yes' to use TLS encrypted connections
788
 
                        # to the LDAP database by using the StartTLS extended
789
 
                        # operation.
790
 
                        #                       
791
 
                        # The StartTLS operation is supposed to be
792
 
                        # used with normal ldap connections instead of
793
 
                        # using ldaps (port 689) connections
794
 
                        start_tls = no
795
 
 
796
 
                        # cacertfile    = /path/to/cacert.pem
797
 
                        # cacertdir             = /path/to/ca/dir/
798
 
                        # certfile              = /path/to/radius.crt
799
 
                        # keyfile               = /path/to/radius.key
800
 
                        # randfile              = /path/to/rnd
801
 
 
802
 
                        #  Certificate Verification requirements.  Can be:
803
 
                        #    "never" (don't even bother trying)
804
 
                        #    "allow" (try, but don't fail if the cerificate
805
 
                        #               can't be verified)
806
 
                        #    "demand" (fail if the certificate doesn't verify.)
807
 
                        #
808
 
                        #       The default is "allow"
809
 
                        # require_cert  = "demand"
810
 
                }
811
 
 
812
 
                # default_profile = "cn=radprofile,ou=dialup,o=My Org,c=UA"
813
 
                # profile_attribute = "radiusProfileDn"
814
 
                # access_attr = "dialupAccess"
815
 
 
816
 
                # Mapping of RADIUS dictionary attributes to LDAP
817
 
                # directory attributes.
818
 
                dictionary_mapping = ${confdir}/ldap.attrmap
819
 
 
820
 
                #  Set password_attribute = nspmPassword to get the
821
 
                #  user's password from a Novell eDirectory
822
 
                #  backend. This will work ONLY IF FreeRADIUS has been
823
 
                #  built with the --with-edir configure option.
824
 
                #
825
 
                #  See also the following links:
826
 
                #
827
 
                #  http://www.novell.com/coolsolutions/appnote/16745.html
828
 
                #  https://secure-support.novell.com/KanisaPlatform/Publishing/558/3009668_f.SAL_Public.html
829
 
                #
830
 
                #  Novell may require TLS encrypted sessions before returning
831
 
                #  the user's password.
832
 
                #
833
 
                # password_attribute = userPassword
834
 
 
835
 
                #  Un-comment the following to disable Novell
836
 
                #  eDirectory account policy check and intruder
837
 
                #  detection. This will work *only if* FreeRADIUS is
838
 
                #  configured to build with --with-edir option.
839
 
                #
840
 
                edir_account_policy_check = no
841
 
 
842
 
                #
843
 
                #  Group membership checking.  Disabled by default.
844
 
                #
845
 
                # groupname_attribute = cn
846
 
                # groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
847
 
                # groupmembership_attribute = radiusGroupName
848
 
 
849
 
                # compare_check_items = yes
850
 
                # do_xlat = yes
851
 
                # access_attr_used_for_allow = yes
852
 
 
853
 
                #
854
 
                #  By default, if the packet contains a User-Password,
855
 
                #  and no other module is configured to handle the
856
 
                #  authentication, the LDAP module sets itself to do
857
 
                #  LDAP bind for authentication.
858
 
                #
859
 
                #  THIS WILL ONLY WORK FOR PAP AUTHENTICATION.
860
 
                #
861
 
                #  THIS WILL NOT WORK FOR CHAP, MS-CHAP, or 802.1x (EAP). 
862
 
                #
863
 
                #  You can disable this behavior by setting the following
864
 
                #  configuration entry to "no".
865
 
                #
866
 
                #  allowed values: {no, yes}
867
 
                # set_auth_type = yes
868
 
 
869
 
                #  ldap_debug: debug flag for LDAP SDK
870
 
                #  (see OpenLDAP documentation).  Set this to enable
871
 
                #  huge amounts of LDAP debugging on the screen.
872
 
                #  You should only use this if you are an LDAP expert.
873
 
                #
874
 
                #       default: 0x0000 (no debugging messages)
875
 
                #       Example:(LDAP_DEBUG_FILTER+LDAP_DEBUG_CONNS)
876
 
                #ldap_debug = 0x0028 
877
 
        }
878
 
 
879
 
        # passwd module allows to do authorization via any passwd-like
880
 
        # file and to extract any attributes from these modules
881
 
        #
882
 
        # parameters are:
883
 
        #   filename - path to filename
884
 
        #   format - format for filename record. This parameters
885
 
        #            correlates record in the passwd file and RADIUS
886
 
        #            attributes.
887
 
        #
888
 
        #            Field marked as '*' is key field. That is, the parameter
889
 
        #            with this name from the request is used to search for
890
 
        #            the record from passwd file
891
 
        #            Attribute marked as '=' is added to reply_itmes instead
892
 
        #            of default configure_itmes
893
 
        #            Attribute marked as '~' is added to request_items
894
 
        #
895
 
        #            Field marked as ',' may contain a comma separated list
896
 
        #            of attributes.
897
 
        #   hashsize - hashtable size. If 0 or not specified records are not
898
 
        #            stored in memory and file is red on every request.
899
 
        #   allowmultiplekeys - if few records for every key are allowed
900
 
        #   ignorenislike - ignore NIS-related records
901
 
        #   delimiter - symbol to use as a field separator in passwd file,
902
 
        #            for format ':' symbol is always used. '\0', '\n' are
903
 
        #            not allowed 
904
 
        #
905
 
 
906
 
        #  An example configuration for using /etc/smbpasswd.
907
 
        #
908
 
        #passwd etc_smbpasswd {
909
 
        #       filename = /etc/smbpasswd
910
 
        #       format = "*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::"
911
 
        #       hashsize = 100
912
 
        #       ignorenislike = no
913
 
        #       allowmultiplekeys = no
914
 
        #}
915
 
 
916
 
        #  Similar configuration, for the /etc/group file. Adds a Group-Name
917
 
        #  attribute for every group that the user is member of.
918
 
        #
919
 
        #passwd etc_group {
920
 
        #       filename = /etc/group
921
 
        #       format = "=Group-Name:::*,User-Name"
922
 
        #       hashsize = 50
923
 
        #       ignorenislike = yes
924
 
        #       allowmultiplekeys = yes
925
 
        #       delimiter = ":"
926
 
        #}
927
 
 
928
 
        #  A simple file to map a MAC address to a VLAN.
929
 
        #
930
 
        #  The file should be in the format MAC,VLAN
931
 
        #  the VLAN name cannot have spaces in it, for example:
932
 
        #
933
 
        #       00:01:02:03:04:05,VLAN1
934
 
        #       03:04:05:06:07:08,VLAN2
935
 
        #       ...
936
 
        #
937
 
        #passwd mac2vlan {
938
 
        #       filename = ${confdir}/mac2vlan
939
 
        #       format = "*VMPS-Mac:=VMPS-VLAN-Name"
940
 
        #       delimiter = ","
941
 
        #}
942
 
 
943
 
        # Realm module, for proxying.
944
 
        #
945
 
        #  You can have multiple instances of the realm module to
946
 
        #  support multiple realm syntaxs at the same time.  The
947
 
        #  search order is defined by the order in the authorize and
948
 
        #  preacct sections.
949
 
        #
950
 
        #  Four config options:
951
 
        #       format         -  must be "prefix" or "suffix"
952
 
        #                         The special cases of "DEFAULT"
953
 
        #                         and "NULL" are allowed, too.
954
 
        #       delimiter      -  must be a single character
955
 
 
956
 
        #  'realm/username'
957
 
        #
958
 
        #  Using this entry, IPASS users have their realm set to "IPASS".
959
 
        realm IPASS {
960
 
                format = prefix
961
 
                delimiter = "/"
962
 
        }
963
 
 
964
 
        #  'username@realm'
965
 
        #
966
 
        realm suffix {
967
 
                format = suffix
968
 
                delimiter = "@"
969
 
        }
970
 
 
971
 
        #  'username%realm'
972
 
        #
973
 
        realm realmpercent {
974
 
                format = suffix
975
 
                delimiter = "%"
976
 
        }
977
 
 
978
 
        #
979
 
        #  'domain\user'
980
 
        #
981
 
        realm ntdomain {
982
 
                format = prefix
983
 
                delimiter = "\\"
984
 
        }       
985
 
 
986
 
        #  A simple value checking module
987
 
        #
988
 
        #  It can be used to check if an attribute value in the request
989
 
        #  matches a (possibly multi valued) attribute in the check
990
 
        #  items This can be used for example for caller-id
991
 
        #  authentication.  For the module to run, both the request
992
 
        #  attribute and the check items attribute must exist
993
 
        #
994
 
        #  i.e.
995
 
        #  A user has an ldap entry with 2 radiusCallingStationId
996
 
        #  attributes with values "12345678" and "12345679".  If we
997
 
        #  enable rlm_checkval, then any request which contains a
998
 
        #  Calling-Station-Id with one of those two values will be
999
 
        #  accepted.  Requests with other values for
1000
 
        #  Calling-Station-Id will be rejected.
1001
 
        #
1002
 
        #  Regular expressions in the check attribute value are allowed
1003
 
        #  as long as the operator is '=~'
1004
 
        #
1005
 
        checkval {
1006
 
                # The attribute to look for in the request
1007
 
                item-name = Calling-Station-Id
1008
 
 
1009
 
                # The attribute to look for in check items. Can be multi valued
1010
 
                check-name = Calling-Station-Id
1011
 
 
1012
 
                # The data type. Can be
1013
 
                # string,integer,ipaddr,date,abinary,octets
1014
 
                data-type = string
1015
 
 
1016
 
                # If set to yes and we dont find the item-name attribute in the
1017
 
                # request then we send back a reject
1018
 
                # DEFAULT is no
1019
 
                #notfound-reject = no
1020
 
        }
1021
 
        
1022
 
        #  rewrite arbitrary packets.  Useful in accounting and authorization.
1023
 
        #
1024
 
        #
1025
 
        #  The module can also use the Rewrite-Rule attribute. If it
1026
 
        #  is set and matches the name of the module instance, then
1027
 
        #  that module instance will be the only one which runs.
1028
 
        #
1029
 
        #  Also if new_attribute is set to yes then a new attribute
1030
 
        #  will be created containing the value replacewith and it
1031
 
        #  will be added to searchin (packet, reply, proxy,
1032
 
        #  proxy_reply or config).
1033
 
        #
1034
 
        # searchfor,ignore_case and max_matches will be ignored in that case.
1035
 
        #
1036
 
        # Backreferences are supported.
1037
 
        #       %{0} will contain the string the whole match
1038
 
        #       %{1} to %{8} will contain the contents of the 1st to
1039
 
        #       the 8th parentheses
1040
 
        #
1041
 
        # If max_matches is greater than one, the backreferences will
1042
 
        # correspond to the first attributed that matched.
1043
 
 
1044
 
        #
1045
 
        #attr_rewrite sanecallerid {
1046
 
        #       attribute = Called-Station-Id
1047
 
                # may be "packet", "reply", "proxy", "proxy_reply" or "config"
1048
 
        #       searchin = packet
1049
 
        #       searchfor = "[+ ]"
1050
 
        #       replacewith = ""
1051
 
        #       ignore_case = no
1052
 
        #       new_attribute = no
1053
 
        #       max_matches = 10
1054
 
        #
1055
 
        #       ## If set to yes then the replace string will be
1056
 
        #       ## appended to the original string
1057
 
        #       append = no
1058
 
        #}
1059
 
 
1060
 
        # Preprocess the incoming RADIUS request, before handing it off
1061
 
        # to other modules.
1062
 
        #
1063
 
        #  This module processes the 'huntgroups' and 'hints' files.
1064
 
        #  In addition, it re-writes some weird attributes created
1065
 
        #  by some NASes, and converts the attributes into a form which
1066
 
        #  is a little more standard.
1067
 
        #
1068
 
        preprocess {
1069
 
                huntgroups = ${confdir}/huntgroups
1070
 
                hints = ${confdir}/hints
1071
 
 
1072
 
                # This hack changes Ascend's wierd port numberings
1073
 
                # to standard 0-??? port numbers so that the "+" works
1074
 
                # for IP address assignments.
1075
 
                with_ascend_hack = no
1076
 
                ascend_channels_per_line = 23
1077
 
 
1078
 
                # Windows NT machines often authenticate themselves as
1079
 
                # NT_DOMAIN\username
1080
 
                #
1081
 
                # If this is set to 'yes', then the NT_DOMAIN portion
1082
 
                # of the user-name is silently discarded.
1083
 
                #
1084
 
                # This configuration entry SHOULD NOT be used.
1085
 
                # See the "realms" module for a better way to handle
1086
 
                # NT domains.
1087
 
                with_ntdomain_hack = no
1088
 
 
1089
 
                # Specialix Jetstream 8500 24 port access server.
1090
 
                #
1091
 
                # If the user name is 10 characters or longer, a "/"
1092
 
                # and the excess characters after the 10th are
1093
 
                # appended to the user name.
1094
 
                #
1095
 
                # If you're not running that NAS, you don't need
1096
 
                # this hack.
1097
 
                with_specialix_jetstream_hack = no
1098
 
 
1099
 
                # Cisco (and Quintum in Cisco mode) sends it's VSA attributes
1100
 
                # with the attribute name *again* in the string, like:
1101
 
                #
1102
 
                #   H323-Attribute = "h323-attribute=value".
1103
 
                #
1104
 
                # If this configuration item is set to 'yes', then
1105
 
                # the redundant data in the the attribute text is stripped
1106
 
                # out.  The result is:
1107
 
                #
1108
 
                #  H323-Attribute = "value"
1109
 
                #
1110
 
                # If you're not running a Cisco or Quintum NAS, you don't
1111
 
                # need this hack.
1112
 
                with_cisco_vsa_hack = no
1113
 
        }
1114
 
 
1115
 
        # Livingston-style 'users' file
1116
 
        #
1117
 
        files {
1118
 
                # The default key attribute to use for matches.  The content
1119
 
                # of this attribute is used to match the "name" of the
1120
 
                # entry.
1121
 
                #key = "%{Stripped-User-Name:-%{User-Name}}"
1122
 
 
1123
 
                usersfile = ${confdir}/users
1124
 
                acctusersfile = ${confdir}/acct_users
1125
 
                preproxy_usersfile = ${confdir}/preproxy_users
1126
 
 
1127
 
                #  If you want to use the old Cistron 'users' file
1128
 
                #  with FreeRADIUS, you should change the next line
1129
 
                #  to 'compat = cistron'.  You can the copy your 'users'
1130
 
                #  file from Cistron.
1131
 
                compat = no
1132
 
        }
1133
 
 
1134
 
        # Write a detailed log of all accounting records received.
1135
 
        #
1136
 
        detail {
1137
 
                #  Note that we do NOT use NAS-IP-Address here, as
1138
 
                #  that attribute MAY BE from the originating NAS, and
1139
 
                #  NOT from the proxy which actually sent us the
1140
 
                #  request.  The Client-IP-Address attribute is ALWAYS
1141
 
                #  the address of the client which sent us the
1142
 
                #  request.
1143
 
                #
1144
 
                #  The following line creates a new detail file for
1145
 
                #  every radius client (by IP address or hostname).
1146
 
                #  In addition, a new detail file is created every
1147
 
                #  day, so that the detail file doesn't have to go
1148
 
                #  through a 'log rotation'
1149
 
                #
1150
 
                #  If your detail files are large, you may also want
1151
 
                #  to add a ':%H' (see doc/variables.txt) to the end
1152
 
                #  of it, to create a new detail file every hour, e.g.:
1153
 
                #
1154
 
                #   ..../detail-%Y%m%d:%H
1155
 
                #
1156
 
                #  This will create a new detail file for every hour.
1157
 
                #
1158
 
                detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d
1159
 
 
1160
 
                #
1161
 
                #  The Unix-style permissions on the 'detail' file.
1162
 
                #
1163
 
                #  The detail file often contains secret or private
1164
 
                #  information about users.  So by keeping the file
1165
 
                #  permissions restrictive, we can prevent unwanted
1166
 
                #  people from seeing that information.
1167
 
                detailperm = 0600
1168
 
 
1169
 
                #
1170
 
                #  Every entry in the detail file has a header which
1171
 
                #  is a timestamp.  By default, we use the ctime
1172
 
                #  format (see "man ctime" for details).
1173
 
                #
1174
 
                #  The header can be customized by editing this
1175
 
                #  string.  See "doc/variables.txt" for a description
1176
 
                #  of what can be put here.
1177
 
                #
1178
 
                header = "%t"
1179
 
 
1180
 
                #
1181
 
                # Certain attributes such as User-Password may be
1182
 
                # "sensitive", so they should not be printed in the
1183
 
                # detail file.  This section lists the attributes
1184
 
                # that should be suppressed.
1185
 
                #
1186
 
                # The attributes should be listed one to a line.
1187
 
                #
1188
 
                #suppress {
1189
 
                        # User-Password
1190
 
                #}
1191
 
 
1192
 
        }
1193
 
 
1194
 
        #
1195
 
        #  Many people want to log authentication requests.
1196
 
        #  Rather than modifying the server core to print out more
1197
 
        #  messages, we can use a different instance of the 'detail'
1198
 
        #  module, to log the authentication requests to a file.
1199
 
        #
1200
 
        #  You will also need to un-comment the 'auth_log' line
1201
 
        #  in the 'authorize' section, below.
1202
 
        #
1203
 
        # detail auth_log {
1204
 
                # detailfile = ${radacctdir}/%{Client-IP-Address}/auth-detail-%Y%m%d
1205
 
 
1206
 
                #
1207
 
                #  This MUST be 0600, otherwise anyone can read
1208
 
                #  the users passwords!
1209
 
                # detailperm = 0600
1210
 
 
1211
 
                # You may also strip out passwords completely
1212
 
                #suppress {
1213
 
                        # User-Password
1214
 
                #}
1215
 
        # }
1216
 
 
1217
 
        #
1218
 
        #  This module logs authentication reply packets sent
1219
 
        #  to a NAS.  Both Access-Accept and Access-Reject packets
1220
 
        #  are logged.
1221
 
        #
1222
 
        #  You will also need to un-comment the 'reply_log' line
1223
 
        #  in the 'post-auth' section, below.
1224
 
        #
1225
 
        # detail reply_log {
1226
 
                # detailfile = ${radacctdir}/%{Client-IP-Address}/reply-detail-%Y%m%d
1227
 
 
1228
 
                # detailperm = 0600
1229
 
        # }
1230
 
 
1231
 
        #
1232
 
        #  This module logs packets proxied to a home server.
1233
 
        #
1234
 
        #  You will also need to un-comment the 'pre_proxy_log' line
1235
 
        #  in the 'pre-proxy' section, below.
1236
 
        #
1237
 
        # detail pre_proxy_log {
1238
 
                # detailfile = ${radacctdir}/%{Client-IP-Address}/pre-proxy-detail-%Y%m%d
1239
 
 
1240
 
                #
1241
 
                #  This MUST be 0600, otherwise anyone can read
1242
 
                #  the users passwords!
1243
 
                # detailperm = 0600
1244
 
 
1245
 
                # You may also strip out passwords completely
1246
 
                #suppress {
1247
 
                        # User-Password
1248
 
                #}
1249
 
        # }
1250
 
 
1251
 
        #
1252
 
        #  This module logs response packets from a home server.
1253
 
        #
1254
 
        #  You will also need to un-comment the 'post_proxy_log' line
1255
 
        #  in the 'post-proxy' section, below.
1256
 
        #
1257
 
        # detail post_proxy_log {
1258
 
                # detailfile = ${radacctdir}/%{Client-IP-Address}/post-proxy-detail-%Y%m%d
1259
 
 
1260
 
                # detailperm = 0600
1261
 
        # }
1262
 
 
1263
 
        #
1264
 
        #  The rlm_sql_log module appends the SQL queries in a log
1265
 
        #  file which is read later by the radsqlrelay program.
1266
 
        #
1267
 
        #  This module only performs the dynamic expansion of the
1268
 
        #  variables found in the SQL statements. No operation is
1269
 
        #  executed on the database server. (this could be done
1270
 
        #  later by an external program) That means the module is
1271
 
        #  useful only with non-"SELECT" statements.
1272
 
        #
1273
 
        #  See rlm_sql_log(5) manpage.
1274
 
        #
1275
 
#       sql_log {
1276
 
#               path = "${radacctdir}/sql-relay"
1277
 
#               acct_table = "radacct"
1278
 
#               postauth_table = "radpostauth"
1279
 
#               sql_user_name = "%{%{User-Name}:-DEFAULT}"
1280
 
#
1281
 
#               Start = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \
1282
 
#                NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
1283
 
#                AcctSessionTime, AcctTerminateCause) VALUES                 \
1284
 
#                ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
1285
 
#                '%{Framed-IP-Address}', '%S', '0', '0', '');"
1286
 
#               Stop = "INSERT INTO ${acct_table} (AcctSessionId, UserName,  \
1287
 
#                NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
1288
 
#                AcctSessionTime, AcctTerminateCause) VALUES                 \
1289
 
#                ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
1290
 
#                '%{Framed-IP-Address}', '0', '%S', '%{Acct-Session-Time}',  \
1291
 
#                '%{Acct-Terminate-Cause}');"
1292
 
#               Alive = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \
1293
 
#                NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \
1294
 
#                AcctSessionTime, AcctTerminateCause) VALUES                 \
1295
 
#                ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \
1296
 
#                '%{Framed-IP-Address}', '0', '0', '%{Acct-Session-Time}','');"
1297
 
#
1298
 
#               Post-Auth = "INSERT INTO ${postauth_table}                   \
1299
 
#                (username, pass, reply, authdate) VALUES                            \
1300
 
#                ('%{User-Name}', '%{User-Password:-Chap-Password}',         \
1301
 
#                '%{reply:Packet-Type}', '%S');"
1302
 
#       }
1303
 
 
1304
 
        #
1305
 
        #  Create a unique accounting session Id.  Many NASes re-use
1306
 
        #  or repeat values for Acct-Session-Id, causing no end of
1307
 
        #  confusion.
1308
 
        #
1309
 
        #  This module will add a (probably) unique session id 
1310
 
        #  to an accounting packet based on the attributes listed
1311
 
        #  below found in the packet.  See doc/rlm_acct_unique for
1312
 
        #  more information.
1313
 
        #
1314
 
        acct_unique {
1315
 
                key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
1316
 
        }
1317
 
 
 
678
        $INCLUDE eap.conf
1318
679
 
1319
680
        #  Include another file that has the SQL-related configuration.
1320
681
        #  This is another file only because it tends to be big.
1321
682
        #
1322
 
        #$INCLUDE sql.conf
1323
 
 
1324
 
 
1325
 
        #  For Cisco VoIP specific accounting with Postgresql,
1326
 
        #  use:         ${confdir}/sql/postgresql/voip-postpaid.conf
1327
 
        #
1328
 
        #  You will also need the sql schema from:
1329
 
        #        src/billing/cisco_h323_db_schema-postgres.sql
1330
 
        #  Note: This config can be use AS WELL AS the standard sql
1331
 
        #  config if you need SQL based Auth
1332
 
        
1333
 
 
1334
 
        #  Write a 'utmp' style file, of which users are currently
1335
 
        #  logged in, and where they've logged in from.
1336
 
        #
1337
 
        #  This file is used mainly for Simultaneous-Use checking,
1338
 
        #  and also 'radwho', to see who's currently logged in.
1339
 
        #
1340
 
        radutmp {
1341
 
                #  Where the file is stored.  It's not a log file,
1342
 
                #  so it doesn't need rotating.
1343
 
                #
1344
 
                filename = ${logdir}/radutmp
1345
 
 
1346
 
                #  The field in the packet to key on for the
1347
 
                #  'user' name,  If you have other fields which you want
1348
 
                #  to use to key on to control Simultaneous-Use,
1349
 
                #  then you can use them here.
1350
 
                #
1351
 
                #  Note, however, that the size of the field in the
1352
 
                #  'utmp' data structure is small, around 32
1353
 
                #  characters, so that will limit the possible choices
1354
 
                #  of keys.
1355
 
                #
1356
 
                #  You may want instead: %{Stripped-User-Name:-%{User-Name}}
1357
 
                username = %{User-Name}
1358
 
 
1359
 
 
1360
 
                #  Whether or not we want to treat "user" the same
1361
 
                #  as "USER", or "User".  Some systems have problems
1362
 
                #  with case sensitivity, so this should be set to
1363
 
                #  'no' to enable the comparisons of the key attribute
1364
 
                #  to be case insensitive.
1365
 
                #
1366
 
                case_sensitive = yes
1367
 
 
1368
 
                #  Accounting information may be lost, so the user MAY
1369
 
                #  have logged off of the NAS, but we haven't noticed.
1370
 
                #  If so, we can verify this information with the NAS,
1371
 
                #
1372
 
                #  If we want to believe the 'utmp' file, then this
1373
 
                #  configuration entry can be set to 'no'.
1374
 
                #
1375
 
                check_with_nas = yes            
1376
 
 
1377
 
                # Set the file permissions, as the contents of this file
1378
 
                # are usually private.
1379
 
                perm = 0600
1380
 
 
1381
 
                callerid = "yes"
1382
 
        }
1383
 
 
1384
 
        # "Safe" radutmp - does not contain caller ID, so it can be
1385
 
        # world-readable, and radwho can work for normal users, without
1386
 
        # exposing any information that isn't already exposed by who(1).
1387
 
        #
1388
 
        # This is another 'instance' of the radutmp module, but it is given
1389
 
        # then name "sradutmp" to identify it later in the "accounting"
1390
 
        # section.
1391
 
        radutmp sradutmp {
1392
 
                filename = ${logdir}/sradutmp
1393
 
                perm = 0644
1394
 
                callerid = "no"
1395
 
        }
1396
 
 
1397
 
        # attr_filter - filters the attributes received in replies from
1398
 
        # proxied servers, to make sure we send back to our RADIUS client
1399
 
        # only allowed attributes.
1400
 
        attr_filter attr_filter.post-proxy {
1401
 
                attrsfile = ${confdir}/attrs
1402
 
        }
1403
 
 
1404
 
        # attr_filter - filters the attributes in the packets we send to
1405
 
        # the RADIUS home servers.
1406
 
        attr_filter attr_filter.pre-proxy {
1407
 
                attrsfile = ${confdir}/attrs.pre-proxy
1408
 
        }
1409
 
 
1410
 
        # Enforce RFC requirements on the contents of Access-Reject
1411
 
        # packets.  See the comments at the top of the file for
1412
 
        # more details.
1413
 
        #
1414
 
        attr_filter attr_filter.access_reject {
1415
 
                key = %{User-Name}
1416
 
                attrsfile = ${confdir}/attrs.access_reject
1417
 
        }
1418
 
 
1419
 
        #  Enforce RFC requirements on the contents of the
1420
 
        #  Accounting-Response packets.  See the comments at the
1421
 
        #  top of the file for more details.
1422
 
        #
1423
 
        attr_filter attr_filter.accounting_response {
1424
 
                key = %{User-Name}
1425
 
                attrsfile = ${confdir}/attrs.accounting_response
1426
 
        }
1427
 
 
1428
 
        #  counter module:
1429
 
        #  This module takes an attribute (count-attribute).
1430
 
        #  It also takes a key, and creates a counter for each unique
1431
 
        #  key.  The count is incremented when accounting packets are
1432
 
        #  received by the server.  The value of the increment depends
1433
 
        #  on the attribute type.
1434
 
        #  If the attribute is Acct-Session-Time or of an integer type we add
1435
 
        #  the value of the attribute. If it is anything else we increase the
1436
 
        #  counter by one.
1437
 
        #
1438
 
        #  The 'reset' parameter defines when the counters are all reset to
1439
 
        #  zero.  It can be hourly, daily, weekly, monthly or never.
1440
 
        #
1441
 
        #  hourly: Reset on 00:00 of every hour
1442
 
        #  daily: Reset on 00:00:00 every day
1443
 
        #  weekly: Reset on 00:00:00 on sunday
1444
 
        #  monthly: Reset on 00:00:00 of the first day of each month
1445
 
        #
1446
 
        #  It can also be user defined. It should be of the form:
1447
 
        #  num[hdwm] where:
1448
 
        #  h: hours, d: days, w: weeks, m: months
1449
 
        #  If the letter is ommited days will be assumed. In example:
1450
 
        #  reset = 10h (reset every 10 hours)
1451
 
        #  reset = 12  (reset every 12 days)
1452
 
        #
1453
 
        #
1454
 
        #  The check-name attribute defines an attribute which will be
1455
 
        #  registered by the counter module and can be used to set the
1456
 
        #  maximum allowed value for the counter after which the user
1457
 
        #  is rejected.
1458
 
        #  Something like:
1459
 
        #
1460
 
        #  DEFAULT Max-Daily-Session := 36000
1461
 
        #          Fall-Through = 1
1462
 
        #
1463
 
        #  You should add the counter module in the instantiate
1464
 
        #  section so that it registers check-name before the files
1465
 
        #  module reads the users file.
1466
 
        #
1467
 
        #  If check-name is set and the user is to be rejected then we
1468
 
        #  send back a Reply-Message and we log a Failure-Message in
1469
 
        #  the radius.log
1470
 
        #
1471
 
        #  If the count attribute is Acct-Session-Time then on each
1472
 
        #  login we send back the remaining online time as a
1473
 
        #  Session-Timeout attribute ELSE and if the reply-name is
1474
 
        #  set, we send back that attribute.  The reply-name attribute
1475
 
        #  MUST be of an integer type.
1476
 
        #
1477
 
        #  The counter-name can also be used instead of using the check-name
1478
 
        #  like below:
1479
 
        #
1480
 
        #  DEFAULT  Daily-Session-Time > 3600, Auth-Type = Reject
1481
 
        #      Reply-Message = "You've used up more than one hour today"
1482
 
        #
1483
 
        #  The allowed-servicetype attribute can be used to only take
1484
 
        #  into account specific sessions. For example if a user first
1485
 
        #  logs in through a login menu and then selects ppp there will
1486
 
        #  be two sessions. One for Login-User and one for Framed-User
1487
 
        #  service type. We only need to take into account the second one.
1488
 
        #
1489
 
        #  The module should be added in the instantiate, authorize and
1490
 
        #  accounting sections.  Make sure that in the authorize
1491
 
        #  section it comes after any module which sets the
1492
 
        #  'check-name' attribute.
1493
 
        #
1494
 
        counter daily {
1495
 
                filename = ${db_dir}/db.daily
1496
 
                key = User-Name
1497
 
                count-attribute = Acct-Session-Time
1498
 
                reset = daily
1499
 
                counter-name = Daily-Session-Time
1500
 
                check-name = Max-Daily-Session
1501
 
                reply-name = Session-Timeout
1502
 
                allowed-servicetype = Framed-User
1503
 
                cache-size = 5000
1504
 
        }
 
683
#       $INCLUDE sql.conf
1505
684
 
1506
685
        #
1507
686
        #  This module is an SQL enabled version of the counter module.
1513
692
        #  totally dependent on the SQL module to process Accounting
1514
693
        #  packets.
1515
694
        #
1516
 
        #$INCLUDE sql/mysql/counter.conf
1517
 
        #$INCLUDE sql/postgresql/counter.conf
1518
 
 
1519
 
        #
1520
 
        # The "always" module is here for debugging purposes. Each
1521
 
        # instance simply returns the same result, always, without
1522
 
        # doing anything.
1523
 
        always fail {
1524
 
                rcode = fail
1525
 
        }
1526
 
        always reject {
1527
 
                rcode = reject
1528
 
        }
1529
 
        always noop {
1530
 
                rcode = noop
1531
 
        }
1532
 
        always handled {
1533
 
                rcode = handled
1534
 
        }
1535
 
        always updated {
1536
 
                rcode = updated
1537
 
        }
1538
 
        always notfound {
1539
 
                rcode = notfound
1540
 
        }
1541
 
        always ok {
1542
 
                rcode = ok
1543
 
                simulcount = 0
1544
 
                mpp = no
1545
 
        }
1546
 
 
1547
 
        #
1548
 
        #  The 'expression' module currently has no configuration.
1549
 
        #
1550
 
        #  This module is useful only for 'xlat'.  To use it,
1551
 
        #  put 'expr' into the 'instantiate' section.  You can then
1552
 
        #  do dynamic translation of attributes like:
1553
 
        #
1554
 
        #  Attribute-Name = `%{expr:2 + 3 + %{exec: uid -u}}`
1555
 
        #
1556
 
        #  The value of the attribute will be replaced with the output
1557
 
        #  of the program which is executed.  Due to RADIUS protocol
1558
 
        #  limitations, any output over 253 bytes will be ignored.
1559
 
        #
1560
 
        #  The module also registers a few paircompare functions
1561
 
        expr {
1562
 
        }
1563
 
 
1564
 
        #
1565
 
        #  The 'digest' module currently has no configuration.
1566
 
        #
1567
 
        #  "Digest" authentication against a Cisco SIP server.
1568
 
        #  See 'doc/rfc/draft-sterman-aaa-sip-00.txt' for details
1569
 
        #  on performing digest authentication for Cisco SIP servers.
1570
 
        #
1571
 
        digest {
1572
 
        }
1573
 
 
1574
 
        #
1575
 
        # The expiration module. This handles the Expiration attribute
1576
 
        # It should be included in the *end* of the authorize section
1577
 
        # in order to handle user Expiration. It should also be included
1578
 
        # in the instantiate section in order to register the Expiration
1579
 
        # compare function
1580
 
        #
1581
 
        expiration {
1582
 
                #
1583
 
                # The Reply-Message which will be sent back in case the
1584
 
                # account has expired. Dynamic substitution is supported
1585
 
                #
1586
 
                reply-message = "Password Has Expired\r\n" 
1587
 
#               reply-message = "Your account has expired, %{User-Name}\r\n"
1588
 
        }
1589
 
 
1590
 
        # The logintime module. This handles the Login-Time,
1591
 
        # Current-Time, and Time-Of-Day attributes.  It should be
1592
 
        # included in the *end* of the authorize section in order to
1593
 
        # handle Login-Time checks. It should also be included in the
1594
 
        # instantiate section in order to register the Current-Time
1595
 
        # and Time-Of-Day comparison functions.
1596
 
        #
1597
 
        # When the Login-Time attribute is set to some value, and the
1598
 
        # user has bene permitted to log in, a Session-Timeout is
1599
 
        # calculated based on the remaining time.  See "doc/README".
1600
 
        #
1601
 
        logintime {
1602
 
                #
1603
 
                # The Reply-Message which will be sent back in case
1604
 
                # the account is calling outside of the allowed
1605
 
                # timespan. Dynamic substitution is supported.
1606
 
                #
1607
 
                reply-message = "You are calling outside your allowed timespan\r\n"
1608
 
#               reply-message = "Outside allowed timespan (%{control:Login-Time}), %{User-Name}\r\n"
1609
 
 
1610
 
                # The minimum timeout (in seconds) a user is allowed
1611
 
                # to have. If the calculated timeout is lower we don't
1612
 
                # allow the logon. Some NASes do not handle values
1613
 
                # lower than 60 seconds well.
1614
 
                minimum-timeout = 60
1615
 
        }
1616
 
        #
1617
 
        #  Execute external programs
1618
 
        #
1619
 
        #  This module is useful only for 'xlat'.  To use it,
1620
 
        #  put 'exec' into the 'instantiate' section.  You can then
1621
 
        #  do dynamic translation of attributes like:
1622
 
        #
1623
 
        #  Attribute-Name = `%{exec:/path/to/program args}`
1624
 
        #
1625
 
        #  The value of the attribute will be replaced with the output
1626
 
        #  of the program which is executed.  Due to RADIUS protocol
1627
 
        #  limitations, any output over 253 bytes will be ignored.
1628
 
        #
1629
 
        #  The RADIUS attributes from the user request will be placed
1630
 
        #  into environment variables of the executed program, as
1631
 
        #  described in 'doc/variables.txt'
1632
 
        #
1633
 
        exec {
1634
 
                wait = yes
1635
 
                input_pairs = request
1636
 
                shell_escape = yes
1637
 
                output = none
1638
 
        }
1639
 
 
1640
 
        #
1641
 
        #  This is a more general example of the execute module.
1642
 
        #
1643
 
        #  This one is called "echo".
1644
 
        #
1645
 
        #  Attribute-Name = `%{echo:/path/to/program args}`
1646
 
        #
1647
 
        #  If you wish to execute an external program in more than
1648
 
        #  one section (e.g. 'authorize', 'pre_proxy', etc), then it
1649
 
        #  is probably best to define a different instance of the
1650
 
        #  'exec' module for every section.     
1651
 
        #
1652
 
        #  The return value of the program run determines the result
1653
 
        #  of the exec instance call as follows:
1654
 
        #  (See doc/configurable_failover for details)
1655
 
        #
1656
 
        #  < 0 : fail      the module failed
1657
 
        #  = 0 : ok        the module succeeded
1658
 
        #  = 1 : reject    the module rejected the user
1659
 
        #  = 2 : fail      the module failed
1660
 
        #  = 3 : ok        the module succeeded
1661
 
        #  = 4 : handled   the module has done everything to handle the request
1662
 
        #  = 5 : invalid   the user's configuration entry was invalid
1663
 
        #  = 6 : userlock  the user was locked out
1664
 
        #  = 7 : notfound  the user was not found
1665
 
        #  = 8 : noop      the module did nothing
1666
 
        #  = 9 : updated   the module updated information in the request
1667
 
        #  > 9 : fail      the module failed
1668
 
        #
1669
 
        exec echo {
1670
 
                #
1671
 
                #  Wait for the program to finish.
1672
 
                #
1673
 
                #  If we do NOT wait, then the program is "fire and
1674
 
                #  forget", and any output attributes from it are ignored.
1675
 
                #
1676
 
                #  If we are looking for the program to output
1677
 
                #  attributes, and want to add those attributes to the
1678
 
                #  request, then we MUST wait for the program to
1679
 
                #  finish, and therefore set 'wait=yes'
1680
 
                #
1681
 
                # allowed values: {no, yes}
1682
 
                wait = yes
1683
 
 
1684
 
                #
1685
 
                #  The name of the program to execute, and it's
1686
 
                #  arguments.  Dynamic translation is done on this
1687
 
                #  field, so things like the following example will
1688
 
                #  work.
1689
 
                #
1690
 
                program = "/bin/echo %{User-Name}"
1691
 
 
1692
 
                #
1693
 
                #  The attributes which are placed into the
1694
 
                #  environment variables for the program.
1695
 
                #
1696
 
                #  Allowed values are:
1697
 
                #
1698
 
                #       request         attributes from the request
1699
 
                #       config          attributes from the configuration items list
1700
 
                #       reply           attributes from the reply
1701
 
                #       proxy-request   attributes from the proxy request
1702
 
                #       proxy-reply     attributes from the proxy reply
1703
 
                #
1704
 
                #  Note that some attributes may not exist at some
1705
 
                #  stages.  e.g. There may be no proxy-reply
1706
 
                #  attributes if this module is used in the
1707
 
                #  'authorize' section.
1708
 
                #
1709
 
                input_pairs = request
1710
 
 
1711
 
                #
1712
 
                #  Where to place the output attributes (if any) from
1713
 
                #  the executed program.  The values allowed, and the
1714
 
                #  restrictions as to availability, are the same as
1715
 
                #  for the input_pairs.
1716
 
                #
1717
 
                output_pairs = reply
1718
 
 
1719
 
                #
1720
 
                #  When to execute the program.  If the packet
1721
 
                #  type does NOT match what's listed here, then
1722
 
                #  the module does NOT execute the program.
1723
 
                #
1724
 
                #  For a list of allowed packet types, see
1725
 
                #  the 'dictionary' file, and look for VALUEs
1726
 
                #  of the Packet-Type attribute.
1727
 
                #
1728
 
                #  By default, the module executes on ANY packet.
1729
 
                #  Un-comment out the following line to tell the
1730
 
                #  module to execute only if an Access-Accept is
1731
 
                #  being sent to the NAS.
1732
 
                #
1733
 
                #packet_type = Access-Accept
1734
 
 
1735
 
                #
1736
 
                #  Should we escape the environment variables?
1737
 
                #  
1738
 
                #  If this is set, all the RADIUS attributes
1739
 
                #  are capitalised and dashes replaced with
1740
 
                #  underscores. Also, RADIUS values are surrounded
1741
 
                #  with double-quotes.
1742
 
                #
1743
 
                #  That is to say: User-Name=BobUser => USER_NAME="BobUser"
1744
 
                shell_escape = yes
1745
 
 
1746
 
        }
1747
 
 
1748
 
        #  Do server side ip pool management. Should be added in
1749
 
        #  post-auth and accounting sections.
1750
 
        #
1751
 
        #  The module also requires the existance of the Pool-Name
1752
 
        #  attribute. That way the administrator can add the Pool-Name
1753
 
        #  attribute in the user profiles and use different pools for
1754
 
        #  different users. The Pool-Name attribute is a *check* item
1755
 
        #  not a reply item.
1756
 
        #
1757
 
        #  The Pool-Name should be set to the ippool module instance
1758
 
        #  name or to DEFAULT to match any module.
1759
 
 
1760
 
        #
1761
 
        # Example:
1762
 
        # radiusd.conf: ippool students { [...] }
1763
 
        #               ippool teachers { [...] }
1764
 
        # users file  : DEFAULT Group == students, Pool-Name := "students"
1765
 
        #               DEFAULT Group == teachers, Pool-Name := "teachers"
1766
 
        #               DEFAULT Group == other, Pool-Name := "DEFAULT"
1767
 
        #
1768
 
        # ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST *********
1769
 
        # ********* THEN ERASE THE DB FILES                     *********
1770
 
        #
1771
 
        ippool main_pool {
1772
 
 
1773
 
                #  range-start,range-stop:
1774
 
                #       The start and end ip addresses for this pool.
1775
 
                range-start = 192.168.1.1
1776
 
                range-stop = 192.168.3.254
1777
 
 
1778
 
                #  netmask:
1779
 
                #       The network mask used for this pool.
1780
 
                netmask = 255.255.255.0
1781
 
 
1782
 
                #  cache-size:
1783
 
                #       The gdbm cache size for the db files. Should
1784
 
                #       be equal to the number of ip's available in
1785
 
                #       the ip pool
1786
 
                cache-size = 800
1787
 
 
1788
 
                # session-db:
1789
 
                #       The main db file used to allocate addresses.
1790
 
                session-db = ${db_dir}/db.ippool
1791
 
 
1792
 
                # ip-index:
1793
 
                #       Helper db index file used in multilink
1794
 
                ip-index = ${db_dir}/db.ipindex
1795
 
 
1796
 
                # override:
1797
 
                #       If set, the Framed-IP-Address already in the
1798
 
                #       reply (if any) will be discarded, and replaced
1799
 
                #       with a Framed-IP-Address assigned here.
1800
 
                override = no
1801
 
 
1802
 
                # maximum-timeout:
1803
 
                #       Specifies the maximum time in seconds that an
1804
 
                #       entry may be active.  If set to zero, means
1805
 
                #       "no timeout".  The default value is 0
1806
 
                maximum-timeout = 0
1807
 
 
1808
 
                # key:
1809
 
                #       The key to use for the session database (which
1810
 
                #       holds the allocated ip's) normally it should
1811
 
                #       just be the nas ip/port (which is the default).
1812
 
                #
1813
 
                #       If your NAS sends the same value of NAS-Port
1814
 
                #       all requests, the key should be based on some
1815
 
                #       other attribute that is in ALL requests, AND
1816
 
                #       is unique to each machine needing an IP address.
1817
 
                #key = "%{NAS-IP-Address} %{NAS-Port}"
1818
 
        }
1819
 
 
1820
 
        # $INCLUDE sqlippool.conf
1821
 
 
1822
 
        # OTP token support.  Not included by default.
1823
 
        # $INCLUDE otp.conf
1824
 
 
1825
 
        #
1826
 
        #  Kerberos.  See doc/rlm_krb5 for minimal docs.
1827
 
        #
1828
 
#       krb5 {
1829
 
#               keytab = /path/to/keytab
1830
 
#               service_principal = name_of_principle
1831
 
#       }
1832
 
 
1833
 
        #
1834
 
        #  Module implementing a DIFFERENT policy language.
1835
 
        #  The syntax here is NOT "unlang", but something else.
1836
 
        #
1837
 
        #  See the "policy.txt" file for documentation and examples.
1838
 
        #
1839
 
        policy {
1840
 
               #  The only configuration item is a filename containing
1841
 
               #  the policies to execute.
1842
 
               #
1843
 
               #  When "policy" is listed in a section (e.g. "authorize"),
1844
 
               #  it will run a policy named for that section.
1845
 
               # 
1846
 
               filename = ${confdir}/policy.txt
1847
 
        }
1848
 
 
 
695
#       $INCLUDE sql/mysql/counter.conf
 
696
 
 
697
        #
 
698
        #  IP addresses managed in an SQL table.
 
699
        #
 
700
#       $INCLUDE sqlippool.conf
1849
701
}
1850
702
 
1851
703
# Instantiation
1919
771
 
1920
772
######################################################################
1921
773
#
1922
 
#       As of 2.0.0, the "authorize", "authenticate", etc. sections
1923
 
#       are in separate configuration files, per virtual host.
1924
 
#
1925
 
######################################################################
1926
 
 
1927
 
######################################################################
1928
 
#
1929
 
#       Include all enabled virtual hosts.
1930
 
#
1931
 
#       The following directory is searched for files that match
1932
 
#       the regex:
1933
 
#
1934
 
#               /[a-zA-Z0-9_.]+/
1935
 
#
1936
 
#       The files are then included here, just as if they were cut
1937
 
#       and pasted into this file.
1938
 
#
1939
 
#       See "sites-enabled/default" for some additional documentation.
 
774
#       Load virtual servers.
 
775
#
 
776
#       This next $INCLUDE line loads files in the directory that
 
777
#       match the regular expression: /[a-zA-Z0-9_.]+/
 
778
#
 
779
#       It allows you to define new virtual servers simply by placing
 
780
#       a file into the raddb/sites-enabled/ directory.
1940
781
#
1941
782
$INCLUDE sites-enabled/
 
783
 
 
784
######################################################################
 
785
#
 
786
#       All of the other configuration sections like "authorize {}",
 
787
#       "authenticate {}", "accounting {}", have been moved to the
 
788
#       the file:
 
789
#
 
790
#               raddb/sites-available/default
 
791
#
 
792
#       This is the "default" virtual server that has the same
 
793
#       configuration as in version 1.0.x and 1.1.x.  The default
 
794
#       installation enables this virtual server.  You should
 
795
#       edit it to create policies for your local site.
 
796
#
 
797
#       For more documentation on virtual servers, see:
 
798
#
 
799
#               raddb/sites-available/README
 
800
#
 
801
######################################################################