Disabled session caching in raddb/mods-available/eap in response to CVE-2017-9148.
[freeradius.git] / raddb / radiusd.conf.in
1 # -*- text -*-
2 ##
3 ## radiusd.conf -- FreeRADIUS server configuration file - @RADIUSD_VERSION_STRING@
4 ##
5 ##      http://www.freeradius.org/
6 ##      $Id$
7 ##
8
9 ######################################################################
10 #
11 #       Read "man radiusd" before editing this file.  See the section
12 #       titled DEBUGGING.  It outlines a method where you can quickly
13 #       obtain the configuration you want, without running into
14 #       trouble.
15 #
16 #       Run the server in debugging mode, and READ the output.
17 #
18 #               $ radiusd -X
19 #
20 #       We cannot emphasize this point strongly enough.  The vast
21 #       majority of problems can be solved by carefully reading the
22 #       debugging output, which includes warnings about common issues,
23 #       and suggestions for how they may be fixed.
24 #
25 #       There may be a lot of output, but look carefully for words like:
26 #       "warning", "error", "reject", or "failure".  The messages there
27 #       will usually be enough to guide you to a solution.
28 #
29 #       If you are going to ask a question on the mailing list, then
30 #       explain what you are trying to do, and include the output from
31 #       debugging mode (radiusd -X).  Failure to do so means that all
32 #       of the responses to your question will be people telling you
33 #       to "post the output of radiusd -X".
34
35 ######################################################################
36 #
37 #       The location of other config files and logfiles are declared
38 #       in this file.
39 #
40 #       Also general configuration for modules can be done in this
41 #       file, it is exported through the API to modules that ask for
42 #       it.
43 #
44 #       See "man radiusd.conf" for documentation on the format of this
45 #       file.  Note that the individual configuration items are NOT
46 #       documented in that "man" page.  They are only documented here,
47 #       in the comments.
48 #
49 #       The "unlang" policy language can be used to create complex
50 #       if / else policies.  See "man unlang" for details.
51 #
52
53 prefix = @prefix@
54 exec_prefix = @exec_prefix@
55 sysconfdir = @sysconfdir@
56 localstatedir = @localstatedir@
57 sbindir = @sbindir@
58 logdir = @logdir@
59 raddbdir = @raddbdir@
60 radacctdir = @radacctdir@
61
62 #
63 #  name of the running server.  See also the "-n" command-line option.
64 name = radiusd
65
66 #  Location of config and logfiles.
67 confdir = ${raddbdir}
68 modconfdir = ${confdir}/mods-config
69 certdir = ${confdir}/certs
70 cadir   = ${confdir}/certs
71 run_dir = ${localstatedir}/run/${name}
72
73 # Should likely be ${localstatedir}/lib/radiusd
74 db_dir = ${raddbdir}
75
76 #
77 # libdir: Where to find the rlm_* modules.
78 #
79 #   This should be automatically set at configuration time.
80 #
81 #   If the server builds and installs, but fails at execution time
82 #   with an 'undefined symbol' error, then you can use the libdir
83 #   directive to work around the problem.
84 #
85 #   The cause is usually that a library has been installed on your
86 #   system in a place where the dynamic linker CANNOT find it.  When
87 #   executing as root (or another user), your personal environment MAY
88 #   be set up to allow the dynamic linker to find the library.  When
89 #   executing as a daemon, FreeRADIUS MAY NOT have the same
90 #   personalized configuration.
91 #
92 #   To work around the problem, find out which library contains that symbol,
93 #   and add the directory containing that library to the end of 'libdir',
94 #   with a colon separating the directory names.  NO spaces are allowed.
95 #
96 #   e.g. libdir = /usr/local/lib:/opt/package/lib
97 #
98 #   You can also try setting the LD_LIBRARY_PATH environment variable
99 #   in a script which starts the server.
100 #
101 #   If that does not work, then you can re-configure and re-build the
102 #   server to NOT use shared libraries, via:
103 #
104 #       ./configure --disable-shared
105 #       make
106 #       make install
107 #
108 libdir = @libdir@
109
110 #  pidfile: Where to place the PID of the RADIUS server.
111 #
112 #  The server may be signalled while it's running by using this
113 #  file.
114 #
115 #  This file is written when ONLY running in daemon mode.
116 #
117 #  e.g.:  kill -HUP `cat /var/run/radiusd/radiusd.pid`
118 #
119 pidfile = ${run_dir}/${name}.pid
120
121 #
122 #  correct_escapes: use correct backslash escaping
123 #
124 #  Prior to version 3.0.5, the handling of backslashes was a little
125 #  awkward, i.e. "wrong".  In some cases, to get one backslash into
126 #  a regex, you had to put 4 in the config files.
127 #
128 #  Version 3.0.5 fixes that.  However, for backwards compatibility,
129 #  the new method of escaping is DISABLED BY DEFAULT.  This means
130 #  that upgrading to 3.0.5 won't break your configuration.
131 #
132 #  If you don't have double backslashes (i.e. \\) in your configuration,
133 #  this won't matter to you.  If you do have them, fix that to use only
134 #  one backslash, and then set "correct_escapes = true".
135 #
136 #  You can check for this by doing:
137 #
138 #       $ grep '\\\\' $(find raddb -type f -print)
139 #
140 correct_escapes = true
141
142 #  panic_action: Command to execute if the server dies unexpectedly.
143 #
144 #  FOR PRODUCTION SYSTEMS, ACTIONS SHOULD ALWAYS EXIT.
145 #  AN INTERACTIVE ACTION MEANS THE SERVER IS NOT RESPONDING TO REQUESTS.
146 #  AN INTERACTICE ACTION MEANS THE SERVER WILL NOT RESTART.
147 #
148 #  THE SERVER MUST NOT BE ALLOWED EXECUTE UNTRUSTED PANIC ACTION CODE
149 #  PATTACH CAN BE USED AS AN ATTACK VECTOR.
150 #
151 #  The panic action is a command which will be executed if the server
152 #  receives a fatal, non user generated signal, i.e. SIGSEGV, SIGBUS,
153 #  SIGABRT or SIGFPE.
154 #
155 #  This can be used to start an interactive debugging session so
156 #  that information regarding the current state of the server can
157 #  be acquired.
158 #
159 #  The following string substitutions are available:
160 #  - %e   The currently executing program e.g. /sbin/radiusd
161 #  - %p   The PID of the currently executing program e.g. 12345
162 #
163 #  Standard ${} substitutions are also allowed.
164 #
165 #  An example panic action for opening an interactive session in GDB would be:
166 #
167 #panic_action = "gdb %e %p"
168 #
169 #  Again, don't use that on a production system.
170 #
171 #  An example panic action for opening an automated session in GDB would be:
172 #
173 #panic_action = "gdb -silent -x ${raddbdir}/panic.gdb %e %p 2>&1 | tee ${logdir}/gdb-${name}-%p.log"
174 #
175 #  That command can be used on a production system.
176 #
177
178 #  max_request_time: The maximum time (in seconds) to handle a request.
179 #
180 #  Requests which take more time than this to process may be killed, and
181 #  a REJECT message is returned.
182 #
183 #  WARNING: If you notice that requests take a long time to be handled,
184 #  then this MAY INDICATE a bug in the server, in one of the modules
185 #  used to handle a request, OR in your local configuration.
186 #
187 #  This problem is most often seen when using an SQL database.  If it takes
188 #  more than a second or two to receive an answer from the SQL database,
189 #  then it probably means that you haven't indexed the database.  See your
190 #  SQL server documentation for more information.
191 #
192 #  Useful range of values: 5 to 120
193 #
194 max_request_time = 30
195
196 #  cleanup_delay: The time to wait (in seconds) before cleaning up
197 #  a reply which was sent to the NAS.
198 #
199 #  The RADIUS request is normally cached internally for a short period
200 #  of time, after the reply is sent to the NAS.  The reply packet may be
201 #  lost in the network, and the NAS will not see it.  The NAS will then
202 #  re-send the request, and the server will respond quickly with the
203 #  cached reply.
204 #
205 #  If this value is set too low, then duplicate requests from the NAS
206 #  MAY NOT be detected, and will instead be handled as separate requests.
207 #
208 #  If this value is set too high, then the server will cache too many
209 #  requests, and some new requests may get blocked.  (See 'max_requests'.)
210 #
211 #  Useful range of values: 2 to 10
212 #
213 cleanup_delay = 5
214
215 #  max_requests: The maximum number of requests which the server keeps
216 #  track of.  This should be 256 multiplied by the number of clients.
217 #  e.g. With 4 clients, this number should be 1024.
218 #
219 #  If this number is too low, then when the server becomes busy,
220 #  it will not respond to any new requests, until the 'cleanup_delay'
221 #  time has passed, and it has removed the old requests.
222 #
223 #  If this number is set too high, then the server will use a bit more
224 #  memory for no real benefit.
225 #
226 #  If you aren't sure what it should be set to, it's better to set it
227 #  too high than too low.  Setting it to 1000 per client is probably
228 #  the highest it should be.
229 #
230 #  Useful range of values: 256 to infinity
231 #
232 max_requests = 16384
233
234 #  hostname_lookups: Log the names of clients or just their IP addresses
235 #  e.g., www.freeradius.org (on) or 206.47.27.232 (off).
236 #
237 #  The default is 'off' because it would be overall better for the net
238 #  if people had to knowingly turn this feature on, since enabling it
239 #  means that each client request will result in AT LEAST one lookup
240 #  request to the nameserver.   Enabling hostname_lookups will also
241 #  mean that your server may stop randomly for 30 seconds from time
242 #  to time, if the DNS requests take too long.
243 #
244 #  Turning hostname lookups off also means that the server won't block
245 #  for 30 seconds, if it sees an IP address which has no name associated
246 #  with it.
247 #
248 #  allowed values: {no, yes}
249 #
250 hostname_lookups = no
251
252 #
253 #  Logging section.  The various "log_*" configuration items
254 #  will eventually be moved here.
255 #
256 log {
257         #
258         #  Destination for log messages.  This can be one of:
259         #
260         #       files - log to "file", as defined below.
261         #       syslog - to syslog (see also the "syslog_facility", below.
262         #       stdout - standard output
263         #       stderr - standard error.
264         #
265         #  The command-line option "-X" over-rides this option, and forces
266         #  logging to go to stdout.
267         #
268         destination = files
269
270         #
271         #  Highlight important messages sent to stderr and stdout.
272         #
273         #  Option will be ignored (disabled) if output if TERM is not
274         #  an xterm or output is not to a TTY.
275         #
276         colourise = yes
277
278         #
279         #  The logging messages for the server are appended to the
280         #  tail of this file if destination == "files"
281         #
282         #  If the server is running in debugging mode, this file is
283         #  NOT used.
284         #
285         file = ${logdir}/radius.log
286
287         #
288         #  If this configuration parameter is set, then log messages for
289         #  a *request* go to this file, rather than to radius.log.
290         #
291         #  i.e. This is a log file per request, once the server has accepted
292         #  the request as being from a valid client.  Messages that are
293         #  not associated with a request still go to radius.log.
294         #
295         #  Not all log messages in the server core have been updated to use
296         #  this new internal API.  As a result, some messages will still
297         #  go to radius.log.  Please submit patches to fix this behavior.
298         #
299         #  The file name is expanded dynamically.  You should ONLY user
300         #  server-side attributes for the filename (e.g. things you control).
301         #  Using this feature MAY also slow down the server substantially,
302         #  especially if you do thinks like SQL calls as part of the
303         #  expansion of the filename.
304         #
305         #  The name of the log file should use attributes that don't change
306         #  over the lifetime of a request, such as User-Name,
307         #  Virtual-Server or Packet-Src-IP-Address.  Otherwise, the log
308         #  messages will be distributed over multiple files.
309         #
310         #  Logging can be enabled for an individual request by a special
311         #  dynamic expansion macro:  %{debug: 1}, where the debug level
312         #  for this request is set to '1' (or 2, 3, etc.).  e.g.
313         #
314         #       ...
315         #       update control {
316         #              Tmp-String-0 = "%{debug:1}"
317         #       }
318         #       ...
319         #
320         #  The attribute that the value is assigned to is unimportant,
321         #  and should be a "throw-away" attribute with no side effects.
322         #
323         #requests = ${logdir}/radiusd-%{%{Virtual-Server}:-DEFAULT}-%Y%m%d.log
324
325         #
326         #  Which syslog facility to use, if ${destination} == "syslog"
327         #
328         #  The exact values permitted here are OS-dependent.  You probably
329         #  don't want to change this.
330         #
331         syslog_facility = daemon
332
333         #  Log the full User-Name attribute, as it was found in the request.
334         #
335         # allowed values: {no, yes}
336         #
337         stripped_names = no
338
339         #  Log authentication requests to the log file.
340         #
341         #  allowed values: {no, yes}
342         #
343         auth = no
344
345         #  Log passwords with the authentication requests.
346         #  auth_badpass  - logs password if it's rejected
347         #  auth_goodpass - logs password if it's correct
348         #
349         #  allowed values: {no, yes}
350         #
351         auth_badpass = no
352         auth_goodpass = no
353
354         #  Log additional text at the end of the "Login OK" messages.
355         #  for these to work, the "auth" and "auth_goodpass" or "auth_badpass"
356         #  configurations above have to be set to "yes".
357         #
358         #  The strings below are dynamically expanded, which means that
359         #  you can put anything you want in them.  However, note that
360         #  this expansion can be slow, and can negatively impact server
361         #  performance.
362         #
363 #       msg_goodpass = ""
364 #       msg_badpass = ""
365
366         #  The message when the user exceeds the Simultaneous-Use limit.
367         #
368         msg_denied = "You are already logged in - access denied"
369 }
370
371 #  The program to execute to do concurrency checks.
372 checkrad = ${sbindir}/checkrad
373
374 # SECURITY CONFIGURATION
375 #
376 #  There may be multiple methods of attacking on the server.  This
377 #  section holds the configuration items which minimize the impact
378 #  of those attacks
379 #
380 security {
381         #  chroot: directory where the server does "chroot".
382         #
383         #  The chroot is done very early in the process of starting
384         #  the server.  After the chroot has been performed it
385         #  switches to the "user" listed below (which MUST be
386         #  specified).  If "group" is specified, it switches to that
387         #  group, too.  Any other groups listed for the specified
388         #  "user" in "/etc/group" are also added as part of this
389         #  process.
390         #
391         #  The current working directory (chdir / cd) is left
392         #  *outside* of the chroot until all of the modules have been
393         #  initialized.  This allows the "raddb" directory to be left
394         #  outside of the chroot.  Once the modules have been
395         #  initialized, it does a "chdir" to ${logdir}.  This means
396         #  that it should be impossible to break out of the chroot.
397         #
398         #  If you are worried about security issues related to this
399         #  use of chdir, then simply ensure that the "raddb" directory
400         #  is inside of the chroot, end be sure to do "cd raddb"
401         #  BEFORE starting the server.
402         #
403         #  If the server is statically linked, then the only files
404         #  that have to exist in the chroot are ${run_dir} and
405         #  ${logdir}.  If you do the "cd raddb" as discussed above,
406         #  then the "raddb" directory has to be inside of the chroot
407         #  directory, too.
408         #
409 #       chroot = /path/to/chroot/directory
410
411         # user/group: The name (or #number) of the user/group to run radiusd as.
412         #
413         #   If these are commented out, the server will run as the
414         #   user/group that started it.  In order to change to a
415         #   different user/group, you MUST be root ( or have root
416         #   privileges ) to start the server.
417         #
418         #   We STRONGLY recommend that you run the server with as few
419         #   permissions as possible.  That is, if you're not using
420         #   shadow passwords, the user and group items below should be
421         #   set to radius'.
422         #
423         #  NOTE that some kernels refuse to setgid(group) when the
424         #  value of (unsigned)group is above 60000; don't use group
425         #  "nobody" on these systems!
426         #
427         #  On systems with shadow passwords, you might have to set
428         #  'group = shadow' for the server to be able to read the
429         #  shadow password file.  If you can authenticate users while
430         #  in debug mode, but not in daemon mode, it may be that the
431         #  debugging mode server is running as a user that can read
432         #  the shadow info, and the user listed below can not.
433         #
434         #  The server will also try to use "initgroups" to read
435         #  /etc/groups.  It will join all groups where "user" is a
436         #  member.  This can allow for some finer-grained access
437         #  controls.
438         #
439 #       user = radius
440 #       group = radius
441
442         #  Core dumps are a bad thing.  This should only be set to
443         #  'yes' if you're debugging a problem with the server.
444         #
445         #  allowed values: {no, yes}
446         #
447         allow_core_dumps = no
448
449         #
450         #  max_attributes: The maximum number of attributes
451         #  permitted in a RADIUS packet.  Packets which have MORE
452         #  than this number of attributes in them will be dropped.
453         #
454         #  If this number is set too low, then no RADIUS packets
455         #  will be accepted.
456         #
457         #  If this number is set too high, then an attacker may be
458         #  able to send a small number of packets which will cause
459         #  the server to use all available memory on the machine.
460         #
461         #  Setting this number to 0 means "allow any number of attributes"
462         max_attributes = 200
463
464         #
465         #  reject_delay: When sending an Access-Reject, it can be
466         #  delayed for a few seconds.  This may help slow down a DoS
467         #  attack.  It also helps to slow down people trying to brute-force
468         #  crack a users password.
469         #
470         #  Setting this number to 0 means "send rejects immediately"
471         #
472         #  If this number is set higher than 'cleanup_delay', then the
473         #  rejects will be sent at 'cleanup_delay' time, when the request
474         #  is deleted from the internal cache of requests.
475         #
476         #  As of Version 3.0.5, "reject_delay" has sub-second resolution.
477         #  e.g. "reject_delay =  1.4" seconds is possible.
478         #
479         #  Useful ranges: 1 to 5
480         reject_delay = 1
481
482         #
483         #  status_server: Whether or not the server will respond
484         #  to Status-Server requests.
485         #
486         #  When sent a Status-Server message, the server responds with
487         #  an Access-Accept or Accounting-Response packet.
488         #
489         #  This is mainly useful for administrators who want to "ping"
490         #  the server, without adding test users, or creating fake
491         #  accounting packets.
492         #
493         #  It's also useful when a NAS marks a RADIUS server "dead".
494         #  The NAS can periodically "ping" the server with a Status-Server
495         #  packet.  If the server responds, it must be alive, and the
496         #  NAS can start using it for real requests.
497         #
498         #  See also raddb/sites-available/status
499         #
500         status_server = yes
501
502 @openssl_version_check_config@
503 }
504
505 # PROXY CONFIGURATION
506 #
507 #  proxy_requests: Turns proxying of RADIUS requests on or off.
508 #
509 #  The server has proxying turned on by default.  If your system is NOT
510 #  set up to proxy requests to another server, then you can turn proxying
511 #  off here.  This will save a small amount of resources on the server.
512 #
513 #  If you have proxying turned off, and your configuration files say
514 #  to proxy a request, then an error message will be logged.
515 #
516 #  To disable proxying, change the "yes" to "no", and comment the
517 #  $INCLUDE line.
518 #
519 #  allowed values: {no, yes}
520 #
521 proxy_requests  = yes
522 $INCLUDE proxy.conf
523
524
525 # CLIENTS CONFIGURATION
526 #
527 #  Client configuration is defined in "clients.conf".
528 #
529
530 #  The 'clients.conf' file contains all of the information from the old
531 #  'clients' and 'naslist' configuration files.  We recommend that you
532 #  do NOT use 'client's or 'naslist', although they are still
533 #  supported.
534 #
535 #  Anything listed in 'clients.conf' will take precedence over the
536 #  information from the old-style configuration files.
537 #
538 $INCLUDE clients.conf
539
540
541 # THREAD POOL CONFIGURATION
542 #
543 #  The thread pool is a long-lived group of threads which
544 #  take turns (round-robin) handling any incoming requests.
545 #
546 #  You probably want to have a few spare threads around,
547 #  so that high-load situations can be handled immediately.  If you
548 #  don't have any spare threads, then the request handling will
549 #  be delayed while a new thread is created, and added to the pool.
550 #
551 #  You probably don't want too many spare threads around,
552 #  otherwise they'll be sitting there taking up resources, and
553 #  not doing anything productive.
554 #
555 #  The numbers given below should be adequate for most situations.
556 #
557 thread pool {
558         #  Number of servers to start initially --- should be a reasonable
559         #  ballpark figure.
560         start_servers = 5
561
562         #  Limit on the total number of servers running.
563         #
564         #  If this limit is ever reached, clients will be LOCKED OUT, so it
565         #  should NOT BE SET TOO LOW.  It is intended mainly as a brake to
566         #  keep a runaway server from taking the system with it as it spirals
567         #  down...
568         #
569         #  You may find that the server is regularly reaching the
570         #  'max_servers' number of threads, and that increasing
571         #  'max_servers' doesn't seem to make much difference.
572         #
573         #  If this is the case, then the problem is MOST LIKELY that
574         #  your back-end databases are taking too long to respond, and
575         #  are preventing the server from responding in a timely manner.
576         #
577         #  The solution is NOT do keep increasing the 'max_servers'
578         #  value, but instead to fix the underlying cause of the
579         #  problem: slow database, or 'hostname_lookups=yes'.
580         #
581         #  For more information, see 'max_request_time', above.
582         #
583         max_servers = 32
584
585         #  Server-pool size regulation.  Rather than making you guess
586         #  how many servers you need, FreeRADIUS dynamically adapts to
587         #  the load it sees, that is, it tries to maintain enough
588         #  servers to handle the current load, plus a few spare
589         #  servers to handle transient load spikes.
590         #
591         #  It does this by periodically checking how many servers are
592         #  waiting for a request.  If there are fewer than
593         #  min_spare_servers, it creates a new spare.  If there are
594         #  more than max_spare_servers, some of the spares die off.
595         #  The default values are probably OK for most sites.
596         #
597         min_spare_servers = 3
598         max_spare_servers = 10
599
600         #  When the server receives a packet, it places it onto an
601         #  internal queue, where the worker threads (configured above)
602         #  pick it up for processing.  The maximum size of that queue
603         #  is given here.
604         #
605         #  When the queue is full, any new packets will be silently
606         #  discarded.
607         #
608         #  The most common cause of the queue being full is that the
609         #  server is dependent on a slow database, and it has received
610         #  a large "spike" of traffic.  When that happens, there is
611         #  very little you can do other than make sure the server
612         #  receives less traffic, or make sure that the database can
613         #  handle the load.
614         #
615 #       max_queue_size = 65536
616
617         #  There may be memory leaks or resource allocation problems with
618         #  the server.  If so, set this value to 300 or so, so that the
619         #  resources will be cleaned up periodically.
620         #
621         #  This should only be necessary if there are serious bugs in the
622         #  server which have not yet been fixed.
623         #
624         #  '0' is a special value meaning 'infinity', or 'the servers never
625         #  exit'
626         max_requests_per_server = 0
627
628         #  Automatically limit the number of accounting requests.
629         #  This configuration item tracks how many requests per second
630         #  the server can handle.  It does this by tracking the
631         #  packets/s received by the server for processing, and
632         #  comparing that to the packets/s handled by the child
633         #  threads.
634         #
635
636         #  If the received PPS is larger than the processed PPS, *and*
637         #  the queue is more than half full, then new accounting
638         #  requests are probabilistically discarded.  This lowers the
639         #  number of packets that the server needs to process.  Over
640         #  time, the server will "catch up" with the traffic.
641         #
642         #  Throwing away accounting packets is usually safe and low
643         #  impact.  The NAS will retransmit them in a few seconds, or
644         #  even a few minutes.  Vendors should read RFC 5080 Section 2.2.1
645         #  to see how accounting packets should be retransmitted.  Using
646         #  any other method is likely to cause network meltdowns.
647         #
648         auto_limit_acct = no
649 }
650
651 ######################################################################
652 #
653 #  SNMP notifications.  Uncomment the following line to enable
654 #  snmptraps.  Note that you MUST also configure the full path
655 #  to the "snmptrap" command in the "trigger.conf" file.
656 #
657 #$INCLUDE trigger.conf
658
659 # MODULE CONFIGURATION
660 #
661 #  The names and configuration of each module is located in this section.
662 #
663 #  After the modules are defined here, they may be referred to by name,
664 #  in other sections of this configuration file.
665 #
666 modules {
667         #
668         #  Each module has a configuration as follows:
669         #
670         #       name [ instance ] {
671         #               config_item = value
672         #               ...
673         #       }
674         #
675         #  The 'name' is used to load the 'rlm_name' library
676         #  which implements the functionality of the module.
677         #
678         #  The 'instance' is optional.  To have two different instances
679         #  of a module, it first must be referred to by 'name'.
680         #  The different copies of the module are then created by
681         #  inventing two 'instance' names, e.g. 'instance1' and 'instance2'
682         #
683         #  The instance names can then be used in later configuration
684         #  INSTEAD of the original 'name'.  See the 'radutmp' configuration
685         #  for an example.
686         #
687
688         #
689         #  As of 3.0, modules are in mods-enabled/.  Files matching
690         #  the regex /[a-zA-Z0-9_.]+/ are loaded.  The modules are
691         #  initialized ONLY if they are referenced in a processing
692         #  section, such as authorize, authenticate, accounting,
693         #  pre/post-proxy, etc.
694         #
695         $INCLUDE mods-enabled/
696 }
697
698 # Instantiation
699 #
700 #  This section orders the loading of the modules.  Modules
701 #  listed here will get loaded BEFORE the later sections like
702 #  authorize, authenticate, etc. get examined.
703 #
704 #  This section is not strictly needed.  When a section like
705 #  authorize refers to a module, it's automatically loaded and
706 #  initialized.  However, some modules may not be listed in any
707 #  of the following sections, so they can be listed here.
708 #
709 #  Also, listing modules here ensures that you have control over
710 #  the order in which they are initialized.  If one module needs
711 #  something defined by another module, you can list them in order
712 #  here, and ensure that the configuration will be OK.
713 #
714 #  After the modules listed here have been loaded, all of the modules
715 #  in the "mods-enabled" directory will be loaded.  Loading the
716 #  "mods-enabled" directory means that unlike Version 2, you usually
717 #  don't need to list modules here.
718 #
719 instantiate {
720         #
721         # We list the counter module here so that it registers
722         # the check_name attribute before any module which sets
723         # it
724 #       daily
725
726         # subsections here can be thought of as "virtual" modules.
727         #
728         # e.g. If you have two redundant SQL servers, and you want to
729         # use them in the authorize and accounting sections, you could
730         # place a "redundant" block in each section, containing the
731         # exact same text.  Or, you could uncomment the following
732         # lines, and list "redundant_sql" in the authorize and
733         # accounting sections.
734         #
735         #  The "virtual" module defined here can also be used with
736         #  dynamic expansions, under a few conditions:
737         #
738         #  * The section is "redundant", or "load-balance", or
739         #    "redundant-load-balance"
740         #  * The section contains modules ONLY, and no sub-sections
741         #  * all modules in the section are using the same rlm_
742         #    driver, e.g. They are all sql, or all ldap, etc.
743         #
744         #  When those conditions are satisfied, the server will
745         #  automatically register a dynamic expansion, using the
746         #  name of the "virtual" module.  In the example below,
747         #  it will be "redundant_sql".  You can then use this expansion
748         #  just like any other:
749         #
750         #       update reply {
751         #               Filter-Id := "%{redundant_sql: ... }"
752         #       }
753         #
754         #  In this example, the expansion is done via module "sql1",
755         #  and if that expansion fails, using module "sql2".
756         #
757         #  For best results, configure the "pool" subsection of the
758         #  module so that "retry_delay" is non-zero.  That will allow
759         #  the redundant block to quickly ignore all "down" SQL
760         #  databases.  If instead we have "retry_delay = 0", then
761         #  every time the redundant block is used, the server will try
762         #  to open a connection to every "down" database, causing
763         #  problems.
764         #
765         #redundant redundant_sql {
766         #       sql1
767         #       sql2
768         #}
769 }
770
771 ######################################################################
772 #
773 #  Policies are virtual modules, similar to those defined in the
774 #  "instantiate" section above.
775 #
776 #  Defining a policy in one of the policy.d files means that it can be
777 #  referenced in multiple places as a *name*, rather than as a series of
778 #  conditions to match, and actions to take.
779 #
780 #  Policies are something like subroutines in a normal language, but
781 #  they cannot be called recursively. They MUST be defined in order.
782 #  If policy A calls policy B, then B MUST be defined before A.
783 #
784 ######################################################################
785 policy {
786         $INCLUDE policy.d/
787 }
788
789 ######################################################################
790 #
791 #       Load virtual servers.
792 #
793 #       This next $INCLUDE line loads files in the directory that
794 #       match the regular expression: /[a-zA-Z0-9_.]+/
795 #
796 #       It allows you to define new virtual servers simply by placing
797 #       a file into the raddb/sites-enabled/ directory.
798 #
799 $INCLUDE sites-enabled/
800
801 ######################################################################
802 #
803 #       All of the other configuration sections like "authorize {}",
804 #       "authenticate {}", "accounting {}", have been moved to the
805 #       the file:
806 #
807 #               raddb/sites-available/default
808 #
809 #       This is the "default" virtual server that has the same
810 #       configuration as in version 1.0.x and 1.1.x.  The default
811 #       installation enables this virtual server.  You should
812 #       edit it to create policies for your local site.
813 #
814 #       For more documentation on virtual servers, see:
815 #
816 #               raddb/sites-available/README
817 #
818 ######################################################################