Added rants about setting Auth-Type := EAP, and additional comments
[freeradius.git] / raddb / radiusd.conf.in
1 ##
2 ## radiusd.conf -- FreeRADIUS server configuration file.
3 ##
4 ##      http://www.freeradius.org/
5 ##      $Id$
6 ##
7
8 #       The location of other config files and
9 #       logfiles are declared in this file
10 #
11 #       Also general configuration for modules can be done
12 #       in this file, it is exported through the API to
13 #       modules that ask for it.
14 #
15 #       The configuration variables defined here are of the form ${foo}
16 #       They are local to this file, and do not change from request to
17 #       request.
18 #
19 #       The per-request variables are of the form %{Attribute-Name}, and
20 #       are taken from the values of the attribute in the incoming
21 #       request.  See 'doc/variables.txt' for more information.
22
23 prefix = @prefix@
24 exec_prefix = @exec_prefix@
25 sysconfdir = @sysconfdir@
26 localstatedir = @localstatedir@
27 sbindir = @sbindir@
28 logdir = @logdir@
29 raddbdir = @raddbdir@
30 radacctdir = @radacctdir@
31
32 #  Location of config and logfiles.
33 confdir = ${raddbdir}
34 run_dir = ${localstatedir}/run/radiusd
35
36 #
37 #  The logging messages for the server are appended to the
38 #  tail of this file.
39 #
40 log_file = ${logdir}/radius.log
41
42 #
43 # libdir: Where to find the rlm_* modules.
44 #
45 #   This should be automatically set at configuration time.
46 #
47 #   If the server builds and installs, but fails at execution time
48 #   with an 'undefined symbol' error, then you can use the libdir
49 #   directive to work around the problem.
50 #
51 #   The cause is usually that a library has been installed on your
52 #   system in a place where the dynamic linker CANNOT find it.  When
53 #   executing as root (or another user), your personal environment MAY
54 #   be set up to allow the dynamic linker to find the library.  When
55 #   executing as a daemon, FreeRADIUS MAY NOT have the same
56 #   personalized configuration.
57 #
58 #   To work around the problem, find out which library contains that symbol,
59 #   and add the directory containing that library to the end of 'libdir',
60 #   with a colon separating the directory names.  NO spaces are allowed.
61 #
62 #   e.g. libdir = /usr/local/lib:/opt/package/lib
63 #
64 #   You can also try setting the LD_LIBRARY_PATH environment variable
65 #   in a script which starts the server.
66 #
67 #   If that does not work, then you can re-configure and re-build the
68 #   server to NOT use shared libraries, via:
69 #
70 #       ./configure --disable-shared
71 #       make
72 #       make install
73 #
74 libdir = @libdir@
75
76 #  pidfile: Where to place the PID of the RADIUS server.
77 #
78 #  The server may be signalled while it's running by using this
79 #  file.
80 #
81 #  This file is written when ONLY running in daemon mode.
82 #
83 #  e.g.:  kill -HUP `cat /var/run/radiusd/radiusd.pid`
84 #
85 pidfile = ${run_dir}/radiusd.pid
86
87
88 # user/group: The name (or #number) of the user/group to run radiusd as.
89 #
90 #   If these are commented out, the server will run as the user/group
91 #   that started it.  In order to change to a different user/group, you
92 #   MUST be root ( or have root privleges ) to start the server.
93 #
94 #   We STRONGLY recommend that you run the server with as few permissions
95 #   as possible.  That is, if you're not using shadow passwords, the
96 #   user and group items below should be set to 'nobody'.
97 #
98 #    On SCO (ODT 3) use "user = nouser" and "group = nogroup".
99 #
100 #  NOTE that some kernels refuse to setgid(group) when the value of
101 #  (unsigned)group is above 60000; don't use group nobody on these systems!
102 #
103 #  On systems with shadow passwords, you might have to set 'group = shadow'
104 #  for the server to be able to read the shadow password file.  If you can
105 #  authenticate users while in debug mode, but not in daemon mode, it may be
106 #  that the debugging mode server is running as a user that can read the
107 #  shadow info, and the user listed below can not.
108 #
109 #user = nobody
110 #group = nobody
111
112 #  max_request_time: The maximum time (in seconds) to handle a request.
113 #
114 #  Requests which take more time than this to process may be killed, and
115 #  a REJECT message is returned.
116 #
117 #  WARNING: If you notice that requests take a long time to be handled,
118 #  then this MAY INDICATE a bug in the server, in one of the modules
119 #  used to handle a request, OR in your local configuration.
120 #
121 #  This problem is most often seen when using an SQL database.  If it takes
122 #  more than a second or two to receive an answer from the SQL database,
123 #  then it probably means that you haven't indexed the database.  See your
124 #  SQL server documentation for more information.
125 #
126 #  Useful range of values: 5 to 120
127 #
128 max_request_time = 30
129
130 #  delete_blocked_requests: If the request takes MORE THAN 'max_request_time'
131 #  to be handled, then maybe the server should delete it.
132 #
133 #  If you're running in threaded, or thread pool mode, this setting
134 #  should probably be 'no'.  Setting it to 'yes' when using a threaded
135 #  server MAY cause the server to crash!
136 #
137 delete_blocked_requests = no
138
139 #  cleanup_delay: The time to wait (in seconds) before cleaning up
140 #  a reply which was sent to the NAS.
141 #
142 #  The RADIUS request is normally cached internally for a short period
143 #  of time, after the reply is sent to the NAS.  The reply packet may be
144 #  lost in the network, and the NAS will not see it.  The NAS will then
145 #  re-send the request, and the server will respond quickly with the
146 #  cached reply.
147 #
148 #  If this value is set too low, then duplicate requests from the NAS
149 #  MAY NOT be detected, and will instead be handled as seperate requests.
150 #
151 #  If this value is set too high, then the server will cache too many
152 #  requests, and some new requests may get blocked.  (See 'max_requests'.)
153 #
154 #  Useful range of values: 2 to 10
155 #
156 cleanup_delay = 5
157
158 #  max_requests: The maximum number of requests which the server keeps
159 #  track of.  This should be 256 multiplied by the number of clients.
160 #  e.g. With 4 clients, this number should be 1024.
161 #
162 #  If this number is too low, then when the server becomes busy,
163 #  it will not respond to any new requests, until the 'cleanup_delay'
164 #  time has passed, and it has removed the old requests.
165 #
166 #  If this number is set too high, then the server will use a bit more
167 #  memory for no real benefit.
168 #
169 #  If you aren't sure what it should be set to, it's better to set it
170 #  too high than too low.  Setting it to 1000 per client is probably
171 #  the highest it should be.
172 #
173 #  Useful range of values: 256 to infinity
174 #
175 max_requests = 1024
176
177 #  bind_address:  Make the server listen on a particular IP address, and
178 #  send replies out from that address.  This directive is most useful
179 #  for machines with multiple IP addresses on one interface.
180 #
181 #  It can either contain "*", or an IP address, or a fully qualified
182 #  Internet domain name.  The default is "*"
183 #
184 bind_address = *
185
186 #  port: Allows you to bind FreeRADIUS to a specific port.
187 #
188 #  The default port that most NAS boxes use is 1645, which is historical.
189 #  RFC 2138 defines 1812 to be the new port.  Many new servers and
190 #  NAS boxes use 1812, which can create interoperability problems.
191 #
192 #  The port is defined here to be 0 so that the server will pick up
193 #  the machine's local configuration for the radius port, as defined
194 #  in /etc/services.
195 #
196 #  If you want to use the default RADIUS port as defined on your server,
197 #  (usually through 'grep radius /etc/services') set this to 0 (zero).
198 #
199 #  A port given on the command-line via '-p' over-rides this one.
200 #
201 port = 0
202
203 #  hostname_lookups: Log the names of clients or just their IP addresses
204 #  e.g., www.freeradius.org (on) or 206.47.27.232 (off).
205 #
206 #  The default is 'off' because it would be overall better for the net
207 #  if people had to knowingly turn this feature on, since enabling it
208 #  means that each client request will result in AT LEAST one lookup
209 #  request to the nameserver.   Enabling hostname_lookups will also
210 #  mean that your server may stop randomly for 30 seconds from time
211 #  to time, if the DNS requests take too long.
212 #
213 #  Turning hostname lookups off also means that the server won't block
214 #  for 30 seconds, if it sees an IP address which has no name associated
215 #  with it.
216 #
217 #  allowed values: {no, yes}
218 #
219 hostname_lookups = no
220
221 #  Core dumps are a bad thing.  This should only be set to 'yes'
222 #  if you're debugging a problem with the server.
223 #
224 #  allowed values: {no, yes}
225 #
226 allow_core_dumps = no
227
228 #  Regular expressions
229 #
230 #  These items are set at configure time.  If they're set to "yes",
231 #  then setting them to "no" turns off regular expression support.
232 #
233 #  If they're set to "no" at configure time, then setting them to "yes"
234 #  WILL NOT WORK.  It will give you an error.
235 #
236 regular_expressions     = @REGEX@
237 extended_expressions    = @REGEX_EXTENDED@
238
239 #  Log the full User-Name attribute, as it was found in the request.
240 #
241 # allowed values: {no, yes}
242 #
243 log_stripped_names = no
244
245 #  Log authentication requests to the log file.
246 #
247 #  allowed values: {no, yes}
248 #
249 log_auth = no
250
251 #  Log passwords with the authentication requests.
252 #  log_auth_badpass  - logs password if it's rejected
253 #  log_auth_goodpass - logs password if it's correct
254 #
255 #  allowed values: {no, yes}
256 #
257 log_auth_badpass = no
258 log_auth_goodpass = no
259
260 # usercollide:  Turn "username collision" code on and off.  See the
261 # "doc/duplicate-users" file
262 #
263 usercollide = no
264
265 # lower_user / lower_pass:  
266 # Lower case the username/password "before" or "after"
267 # attempting to authenticate.  
268 #
269 #  If "before", the server will first modify the request and then try
270 #  to auth the user.  If "after", the server will first auth using the
271 #  values provided by the user.  If that fails it will reprocess the
272 #  request after modifying it as you specify below.
273 #
274 #  This is as close as we can get to case insensitivity.  It is the
275 #  admin's job to ensure that the username on the auth db side is
276 #  *also* lowercase to make this work
277 #
278 # Default is 'no' (don't lowercase values)
279 # Valid values = "before" / "after" / "no"
280 #
281 lower_user = no
282 lower_pass = no
283
284 # nospace_user / nospace_pass:
285 #
286 #  Some users like to enter spaces in their username or password
287 #  incorrectly.  To save yourself the tech support call, you can
288 #  eliminate those spaces here:
289 #
290 # Default is 'no' (don't remove spaces)
291 # Valid values = "before" / "after" / "no" (explanation above)
292 #
293 nospace_user = no
294 nospace_pass = no
295
296 #  The program to execute to do concurrency checks.
297 checkrad = ${sbindir}/checkrad
298
299 # SECURITY CONFIGURATION
300 #
301 #  There may be multiple methods of attacking on the server.  This
302 #  section holds the configuration items which minimize the impact
303 #  of those attacks
304 #
305 security {
306         #
307         #  max_attributes: The maximum number of attributes
308         #  permitted in a RADIUS packet.  Packets which have MORE
309         #  than this number of attributes in them will be dropped.
310         #
311         #  If this number is set too low, then no RADIUS packets
312         #  will be accepted.
313         #
314         #  If this number is set too high, then an attacker may be
315         #  able to send a small number of packets which will cause
316         #  the server to use all available memory on the machine.
317         #
318         #  Setting this number to 0 means "allow any number of attributes"
319         max_attributes = 200
320
321         #
322         #  delayed_reject: When sending an Access-Reject, it can be
323         #  delayed for a few seconds.  This may help slow down a DoS
324         #  attack.  It also helps to slow down people trying to brute-force
325         #  crack a users password.
326         #
327         #  Setting this number to 0 means "send rejects immediately"
328         #
329         #  If this number is set higher than 'cleanup_delay', then the
330         #  rejects will be sent at 'cleanup_delay' time, when the request
331         #  is deleted from the internal cache of requests.
332         #
333         #  Useful ranges: 1 to 5
334         reject_delay = 1
335
336         #
337         #  status_server: Whether or not the server will respond
338         #  to Status-Server requests.
339         #
340         #  Normally this should be set to "no", because they're useless.
341         #  See: http://www.freeradius.org/rfc/rfc2865.html#Keep-Alives
342         #
343         #  However, certain NAS boxes may require them. 
344         #
345         #  When sent a Status-Server message, the server responds with
346         #  and Access-Accept packet, containing a Reply-Message attribute,
347         #  which is a string describing how long the server has been
348         #  running.
349         #
350         status_server = no
351 }
352
353 # PROXY CONFIGURATION
354 #
355 #  proxy_requests: Turns proxying of RADIUS requests on or off.
356 #
357 #  The server has proxying turned on by default.  If your system is NOT
358 #  set up to proxy requests to another server, then you can turn proxying
359 #  off here.  This will save a small amount of resources on the server.
360 #
361 #  If you have proxying turned off, and your configuration files say
362 #  to proxy a request, then an error message will be logged.
363 #
364 #  To disable proxying, change the "yes" to "no", and comment the
365 #  $INCLUDE line.
366 #
367 #  allowed values: {no, yes}
368 #
369 proxy_requests  = yes
370 $INCLUDE  ${confdir}/proxy.conf
371
372
373 # CLIENTS CONFIGURATION
374 #
375 #  Client configuration is defined in "clients.conf".  
376 #
377
378 #  The 'clients.conf' file contains all of the information from the old
379 #  'clients' and 'naslist' configuration files.  We recommend that you
380 #  do NOT use 'client's or 'naslist', although they are still
381 #  supported.
382 #
383 #  Anything listed in 'clients.conf' will take precedence over the
384 #  information from the old-style configuration files.
385 #
386 $INCLUDE  ${confdir}/clients.conf
387
388
389 # SNMP CONFIGURATION
390 #
391 #  Snmp configuration is only valid if SNMP support was enabled
392 #  at compile time.
393 #
394 #  To enable SNMP querying of the server, set the value of the
395 #  'snmp' attribute to 'yes'
396 #
397 snmp    = no
398 $INCLUDE  ${confdir}/snmp.conf
399
400
401 # THREAD POOL CONFIGURATION
402 #
403 #  The thread pool is a long-lived group of threads which
404 #  take turns (round-robin) handling any incoming requests.
405 #
406 #  You probably want to have a few spare threads around,
407 #  so that high-load situations can be handled immediately.  If you
408 #  don't have any spare threads, then the request handling will
409 #  be delayed while a new thread is created, and added to the pool.
410 #
411 #  You probably don't want too many spare threads around,
412 #  otherwise they'll be sitting there taking up resources, and
413 #  not doing anything productive.
414 #
415 #  The numbers given below should be adequate for most situations.
416 #
417 thread pool {
418         #  Number of servers to start initially --- should be a reasonable
419         #  ballpark figure.
420         start_servers = 5
421
422         #  Limit on the total number of servers running.
423         #
424         #  If this limit is ever reached, clients will be LOCKED OUT, so it
425         #  should NOT BE SET TOO LOW.  It is intended mainly as a brake to
426         #  keep a runaway server from taking the system with it as it spirals
427         #  down...
428         #
429         #  You may find that the server is regularly reaching the
430         #  'max_servers' number of threads, and that increasing
431         #  'max_servers' doesn't seem to make much difference.
432         #
433         #  If this is the case, then the problem is MOST LIKELY that
434         #  your back-end databases are taking too long to respond, and
435         #  are preventing the server from responding in a timely manner.
436         #
437         #  The solution is NOT do keep increasing the 'max_servers'
438         #  value, but instead to fix the underlying cause of the
439         #  problem: slow database, or 'hostname_lookups=yes'.
440         #
441         #  For more information, see 'max_request_time', above.
442         #
443         max_servers = 32
444
445         #  Server-pool size regulation.  Rather than making you guess
446         #  how many servers you need, FreeRADIUS dynamically adapts to
447         #  the load it sees, that is, it tries to maintain enough
448         #  servers to handle the current load, plus a few spare
449         #  servers to handle transient load spikes.
450         #
451         #  It does this by periodically checking how many servers are
452         #  waiting for a request.  If there are fewer than
453         #  min_spare_servers, it creates a new spare.  If there are
454         #  more than max_spare_servers, some of the spares die off.
455         #  The default values are probably OK for most sites.
456         #
457         min_spare_servers = 3
458         max_spare_servers = 10
459
460         #  There may be memory leaks or resource allocation problems with
461         #  the server.  If so, set this value to 300 or so, so that the
462         #  resources will be cleaned up periodically.
463         #
464         #  This should only be necessary if there are serious bugs in the
465         #  server which have not yet been fixed.
466         #
467         #  '0' is a special value meaning 'infinity', or 'the servers never
468         #  exit'
469         max_requests_per_server = 0
470 }
471
472 # MODULE CONFIGURATION
473 #
474 #  The names and configuration of each module is located in this section.
475 #
476 #  After the modules are defined here, they may be referred to by name,
477 #  in other sections of this configuration file.
478 #
479 modules {
480         #
481         #  Each module has a configuration as follows:
482         #
483         #       name [ instance ] {
484         #               config_item = value
485         #               ...
486         #       }
487         #
488         #  The 'name' is used to load the 'rlm_name' library
489         #  which implements the functionality of the module.
490         #
491         #  The 'instance' is optional.  To have two different instances
492         #  of a module, it first must be referred to by 'name'.
493         #  The different copies of the module are then created by
494         #  inventing two 'instance' names, e.g. 'instance1' and 'instance2'
495         #
496         #  The instance names can then be used in later configuration
497         #  INSTEAD of the original 'name'.  See the 'radutmp' configuration
498         #  below for an example.
499         #
500
501         # PAP module to authenticate users based on their stored password
502         #
503         #  Supports multiple encryption schemes
504         #  clear: Clear text
505         #  crypt: Unix crypt
506         #    md5: MD5 ecnryption
507         #   sha1: SHA1 encryption.
508         #  DEFAULT: crypt
509         pap {
510                 encryption_scheme = crypt
511         }
512
513         # CHAP module
514         #
515         #  To authenticate requests containing a CHAP-Password attribute.
516         #
517         chap {
518                 authtype = CHAP
519         }
520
521         # Pluggable Authentication Modules
522         #
523         #  For Linux, see:
524         #       http://www.kernel.org/pub/linux/libs/pam/index.html
525         #
526         #  WARNING: On many systems, the system PAM libraries have
527         #           memory leaks!  We STRONGLY SUGGEST that you do not
528         #           use PAM for authentication, due to those memory leaks.
529         #
530         pam {
531                 #
532                 #  The name to use for PAM authentication.
533                 #  PAM looks in /etc/pam.d/${pam_auth_name}
534                 #  for it's configuration.  See 'redhat/radiusd-pam'
535                 #  for a sample PAM configuration file.
536                 #
537                 #  Note that any Pam-Auth attribute set in the 'authorize'
538                 #  section will over-ride this one.
539                 #
540                 pam_auth = radiusd
541         }
542
543         # Unix /etc/passwd style authentication
544         #
545         unix {
546                 #
547                 #  Cache /etc/passwd, /etc/shadow, and /etc/group
548                 #
549                 #  The default is to NOT cache them.
550                 #
551                 #  For FreeBSD, you do NOT want to enable the cache,
552                 #  as it's password lookups are done via a database, so
553                 #  set this value to 'no'.
554                 #
555                 #  Some systems (e.g. RedHat Linux with pam_pwbd) can
556                 #  take *seconds* to check a password, from a passwd
557                 #  file containing 1000's of entries.  For those systems,
558                 #  you should set the cache value to 'yes', and set
559                 #  the locations of the 'passwd', 'shadow', and 'group'
560                 #  files, below.
561                 #
562                 # allowed values: {no, yes}
563                 cache = no
564
565                 # Reload the cache every 600 seconds (10mins). 0 to disable.
566                 cache_reload = 600
567
568                 #
569                 #  Define the locations of the normal passwd, shadow, and
570                 #  group files.
571                 #
572                 #  'shadow' is commented out by default, because not all
573                 #  systems have shadow passwords.
574                 #
575                 #  To force the module to use the system password functions,
576                 #  instead of reading the files, leave the following entries
577                 #  commented out.
578                 #
579                 #  This is required for some systems, like FreeBSD,
580                 #  and Mac OSX.
581                 #
582                 #       passwd = /etc/passwd
583                 #       shadow = /etc/shadow
584                 #       group = /etc/group
585
586
587                 #
588                 #  Where the 'wtmp' file is located.
589                 #  This should be moved to it's own module soon.
590                 #
591                 #  The only use for 'radlast'.  If you don't use
592                 #  'radlast', then you can comment out this item.
593                 #
594                 radwtmp = ${logdir}/radwtmp
595         }
596
597         #  Extensible Authentication Protocol
598         #
599         #  For all EAP related authentications 
600         #
601         #  Whatever you do, do NOT set 'Auth-Type := EAP'.  The server
602         #  is smart enough to figure this out on its own.  The most
603         #  common side effect of setting 'Auth-Type := EAP' is that the
604         #  users then cannot use ANY other authentication method.
605         #
606         eap {
607                 #  Invoke the default supported EAP type when
608                 #  EAP-Identity response is received.
609                 #
610                 #  The incoming EAP messages DO NOT specify which EAP
611                 #  type they will be using, so it MUST be set here.
612                 #
613                 #  For now, only one default EAP type may be used at a time.
614                 #
615                 default_eap_type = md5
616
617                 #  Default expiry time to clean the EAP list, It is
618                 #  maintained to correlate the EAP-Response for each
619                 #  EAP-request sent.
620                 timer_expire     = 60
621
622                 #  There are many EAP types, but the server has support
623                 #  for only a limited subset.  If the server receives
624                 #  a request for an EAP type it does not support, then
625                 #  it normally rejects the request.  By setting this
626                 #  configuration to "yes", you can tell the server to
627                 #  instead keep processing the request.  Another module
628                 #  MUST then be configured to proxy the request to
629                 #  another RADIUS server which supports that EAP type.
630                 #
631                 #  If another module is NOT configured to handle the
632                 #  request, then the request will still end up being
633                 #  rejected.
634                 ignore_unknown_eap_types = no
635
636                 # Supported EAP-types
637
638                 #
639                 #  We do NOT recommend using EAP-MD5 authentication
640                 #  for wireless connections.  It is insecure, and does
641                 #  not provide for dynamic WEP keys.
642                 #
643                 md5 {
644                 }
645
646                 # Cisco LEAP
647                 #
648                 #  Cisco LEAP uses the MS-CHAP algorithm (but not
649                 #  the MS-CHAP attributes) to perform it's authentication.
650                 #
651                 #  As a result, LEAP *requires* access to the plain-text
652                 #  User-Password, or the NT-Password attributes.
653                 #  'System' authentication is impossible with LEAP.
654                 #
655                 leap {
656                 }
657
658                 ## EAP-TLS is highly experimental EAP-Type at the moment.  
659                 #       Please give feedback on the mailing list.
660                 #tls {
661                 #       private_key_password = password
662                 #       private_key_file = /path/filename
663
664                         #  If Private key & Certificate are located in
665                         #  the same file, then private_key_file &
666                         #  certificate_file must contain the same file
667                         #  name.
668                 #       certificate_file = /path/filename
669
670                         #  Trusted Root CA list
671                 #       CA_file = /path/filename
672
673                 #       dh_file = /path/filename
674                 #       random_file = /path/filename
675
676                         #
677                         #  This can never exceed the size of a RADIUS
678                         #  packet (4096 bytes), and is preferably half
679                         #  that, to accomodate other attributes in
680                         #  RADIUS packet.  On most APs the MAX packet
681                         #  length is configured between 1500 - 1600
682                         #  In these cases, fragment size should be
683                         #  1024 or less.
684                         #
685                 #       fragment_size = 1024
686
687                         #  include_length is a flag which is
688                         #  by default set to yes If set to
689                         #  yes, Total Length of the message is
690                         #  included in EVERY packet we send.
691                         #  If set to no, Total Length of the
692                         #  message is included ONLY in the
693                         #  First packet of a fragment series.
694                         #
695                 #       include_length = yes
696
697                         #  Check the Certificate Revocation List
698                         #  
699                         #  1) Copy CA certificates and CRLs to same directory.
700                         #  2) Execute 'c_rehash <CA certs&CRLs Directory>'.
701                         #    'c_rehash' is OpenSSL's command.
702                         #  3) Add 'CA_path=<CA certs&CRLs directory>'
703                         #      to radiusd.conf's tls section.
704                         #  4) uncomment the line below.
705                         #  5) Restart radiusd
706                 #       check_crl = yes
707                 #}
708
709                 #  The TTLS module implements the EAP-TTLS protocol,
710                 #  which can be described as EAP inside of Diameter,
711                 #  inside of TLS, inside of EAP, inside of RADIUS...
712                 #
713                 #  Surprisingly, it works quite well.
714                 #
715                 #ttls {
716                         #  The tunneled EAP session needs a default
717                         #  EAP type which is separate from the one for
718                         #  the non-tunneled EAP module.  Inside of the
719                         #  TTLS tunnel, we recommend using EAP-MD5.
720                         #  If the request does not contain an EAP
721                         #  conversation, then this configuration entry
722                         #  is ignored.
723                 #       default_eap_type = md5
724
725                         #  The tunneled authentication request does
726                         #  not usually contain useful attributes
727                         #  like 'Calling-Station-Id', etc.  These
728                         #  attributes are outside of the tunnel,
729                         #  and normally unavailable to the tunneled
730                         #  authentication request.
731                         #
732                         #  By setting this configuration entry to
733                         #  'yes', any attribute which NOT in the
734                         #  tunneled authentication request, but
735                         #  which IS available outside of the tunnel,
736                         #  is copied to the tunneled request.
737                         #
738                         # allowed values: {no, yes}
739                 #       copy_request_to_tunnel = no
740
741                         #  The reply attributes sent to the NAS are
742                         #  usually based on the name of the user
743                         #  'outside' of the tunnel (usually
744                         #  'anonymous').  If you want to send the
745                         #  reply attributes based on the user name
746                         #  inside of the tunnel, then set this
747                         #  configuration entry to 'yes', and the reply
748                         #  to the NAS will be taken from the reply to
749                         #  the tunneled request.
750                         #
751                         # allowed values: {no, yes}
752                 #       use_tunneled_reply = no                 
753                            
754                 #}
755
756                 #
757                 #  The tunneled EAP session needs a default EAP type
758                 #  which is separate from the one for the non-tunneled
759                 #  EAP module.  Inside of the TLS/PEAP tunnel, we
760                 #  recommend using EAP-MS-CHAPv2.
761                 #
762                 # peap {
763                         #  The tunneled EAP session needs a default
764                         #  EAP type which is separate from the one for
765                         #  the non-tunneled EAP module.  Inside of the
766                         #  PEAP tunnel, we recommend using MS-CHAPv2,
767                         #  as that is the default type supported by
768                         #  Windows clients.
769                 #       default_eap_type = mschapv2
770                 #}
771
772                 #
773                 #  This takes no configuration.
774                 #
775                 #  Note that it is the EAP MS-CHAPv2 sub-module, not
776                 #  the main 'mschap' module.
777                 #
778                 #  Note also that in order for this sub-module to work,
779                 #  the main 'mschap' module MUST ALSO be configured.
780                 #
781                 #  This module is the *Microsoft* implementation of MS-CHAPv2
782                 #  in EAP.  There is another (incompatible) implementation
783                 #  of MS-CHAPv2 in EAP by Cisco, which FreeRADIUS does not
784                 #  currently support.
785                 #
786                 mschapv2 {
787                 }
788         }
789
790         # Microsoft CHAP authentication
791         #
792         #  This module supports MS-CHAP and MS-CHAPv2 authentication.
793         #  It also enforces the SMB-Account-Ctrl attribute.
794         #
795         mschap {
796                 #
797                 #  As of 0.9, the mschap module does NOT support
798                 #  reading from /etc/smbpasswd.
799                 #
800                 #  If you are using /etc/smbpasswd, see the 'passwd'
801                 #  module for an example of how to use /etc/smbpasswd
802
803                 # authtype value, if present, will be used
804                 # to overwrite (or add) Auth-Type during
805                 # authorization. Normally should be MS-CHAP
806                 authtype = MS-CHAP
807                 
808                 # if use_mppe is not set to no mschap will
809                 # add MS-CHAP-MPPE-Keys for MS-CHAPv1 and
810                 # MS-MPPE-Recv-Key/MS-MPPE-Send-Key for MS-CHAPv2
811                 #       use_mppe = no
812
813                 # if mppe is enabled require_encryption makes
814                 # encryption moderate
815                 #       require_encryption = yes
816
817                 # require_strong always requires 128 bit key
818                 # encryption
819                 #       require_strong = yes
820         }
821
822         # Lightweight Directory Access Protocol (LDAP)
823         #
824         #  This module definition allows you to use LDAP for
825         #  authorization and authentication (Auth-Type := LDAP)
826         #
827         #  See doc/rlm_ldap for description of configuration options 
828         #  and sample authorize{} and authenticate{} blocks 
829         ldap {
830                 server = "ldap.your.domain"
831                 # identity = "cn=admin,o=My Org,c=UA"
832                 # password = mypass
833                 basedn = "o=My Org,c=UA"
834                 filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
835                 # base_filter = "(objectclass=radiusprofile)"
836
837                 # set this to 'yes' to use TLS encrypted connections
838                 # to the LDAP database by using the StartTLS extended
839                 # operation.
840                 # The StartTLS operation is supposed to be used with normal
841                 # ldap connections instead of using ldaps (port 689) connections
842                 start_tls = no
843
844                 # default_profile = "cn=radprofile,ou=dialup,o=My Org,c=UA"
845                 # profile_attribute = "radiusProfileDn"
846                 access_attr = "dialupAccess"
847
848                 # Mapping of RADIUS dictionary attributes to LDAP
849                 # directory attributes.
850                 dictionary_mapping = ${raddbdir}/ldap.attrmap
851
852                 ldap_connections_number = 5
853
854                 #
855                 # NOTICE: The password_header directive is NOT case insensitive
856                 #
857                 # password_header = "{clear}"
858                 #
859                 #  The server can usually figure this out on its own, and pull
860                 #  the correct User-Password or NT-Password from the database.
861                 #
862                 #  Note that NT-Passwords MUST be stored as a 32-digit hex
863                 #  string, and MUST start off with "0x", such as:
864                 #
865                 #       0x000102030405060708090a0b0c0d0e0f
866                 #
867                 #  Without the leading "0x", NT-Passwords will not work.
868                 #  This goes for NT-Passwords stored in SQL, too.
869                 #
870                 # password_attribute = userPassword
871                 # groupname_attribute = cn
872                 # groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
873                 # groupmembership_attribute = radiusGroupName
874                 timeout = 4
875                 timelimit = 3
876                 net_timeout = 1
877                 # compare_check_items = yes
878                 # access_attr_used_for_allow = yes
879         }
880
881         # passwd module allows to do authorization via any passwd-like
882         # file and to extract any attributes from these modules
883         #
884         # parameters are:
885         #   filename - path to filename
886         #   format - format for filename record. This parameters
887         #            correlates record in the passwd file and RADIUS
888         #            attributes.
889         #
890         #            Field marked as '*' is key field. That is, the parameter
891         #            with this name from the request is used to search for
892         #            the record from passwd file
893         #            Attribute marked as '=' is added to reply_itmes instead
894         #            of default configure_itmes
895         #            Attribute marked as '~' is added to request_items
896         #
897         #            Field marked as ',' may contain a comma separated list
898         #            of attributes.
899         #   authtype - if record found this Auth-Type is used to authenticate
900         #            user
901         #   hashsize - hashtable size. If 0 or not specified records are not
902         #            stored in memory and file is red on every request.
903         #   allowmultiplekeys - if few records for every key are allowed
904         #   ignorenislike - ignore NIS-related records
905         #   delimiter - symbol to use as a field separator in passwd file,
906         #            for format ':' symbol is always used. '\0', '\n' are
907         #            not allowed 
908         #
909
910         #  An example configuration for using /etc/smbpasswd.
911         #
912         #passwd etc_smbpasswd {
913         #       filename = /etc/smbpasswd
914         #       format = "*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::"
915         #       authtype = MS-CHAP
916         #       hashsize = 100
917         #       ignorenislike = no
918         #       allowmultiplekeys = no
919         #}
920
921         #  Similar configuration, for the /etc/group file. Adds a Group-Name
922         #  attribute for every group that the user is member of.
923         #
924         #passwd etc_group {
925         #       filename = /etc/group
926         #       format = "=Group-Name:::*,User-Name"
927         #       hashsize = 50
928         #       ignorenislike = yes
929         #       allowmultiplekeys = yes
930         #       delimiter = ":"
931         #}
932
933         # Realm module, for proxying.
934         #
935         #  You can have multiple instances of the realm module to
936         #  support multiple realm syntaxs at the same time.  The
937         #  search order is defined the order in the authorize and
938         #  preacct blocks after the module config block.
939         #
940         #  Two config options:
941         #       format     -  must be 'prefix' or 'suffix'
942         #       delimiter  -  must be a single character
943
944         #  'realm/username'
945         #
946         #  Using this entry, IPASS users have their realm set to "IPASS".
947         realm realmslash {
948                 format = prefix
949                 delimiter = "/"
950         }
951
952         #  'username@realm'
953         #
954         realm suffix {
955                 format = suffix
956                 delimiter = "@"
957         }
958
959         #  'username%realm'
960         #
961         realm realmpercent {
962                 format = suffix
963                 delimiter = "%"
964         }
965         
966         #  rewrite arbitrary packets.  Useful in accounting and authorization.
967         #
968         ## This module is highly experimental at the moment.  Please give 
969         ## feedback to the mailing list.
970         #
971         #  The module can also use the Rewrite-Rule attribute. If it
972         #  is set and matches the name of the module instance, then
973         #  that module instance will be the only one which runs.
974         #
975         #  Also if new_attribute is set to yes then a new attribute
976         #  will be created containing the value replacewith and it
977         #  will be added to searchin (packet, reply or config).
978         # searchfor,ignore_case and max_matches will be ignored in that case.
979
980         #
981         #attr_rewrite sanecallerid {
982         #       attribute = Called-Station-Id
983                 # may be "packet", "reply", or "config"
984         #       searchin = packet
985         #       searchfor = "[+ ]"
986         #       replacewith = ""
987         #       ignore_case = no
988         #       new_attribute = no
989         #       max_matches = 10
990         #       ## If set to yes then the replace string will be appended to the original string
991         #       append = no
992         #}
993
994         # Preprocess the incoming RADIUS request, before handing it off
995         # to other modules.
996         #
997         #  This module processes the 'huntgroups' and 'hints' files.
998         #  In addition, it re-writes some weird attributes created
999         #  by some NASes, and converts the attributes into a form which
1000         #  is a little more standard.
1001         #
1002         preprocess {
1003                 huntgroups = ${confdir}/huntgroups
1004                 hints = ${confdir}/hints
1005
1006                 # This hack changes Ascend's wierd port numberings
1007                 # to standard 0-??? port numbers so that the "+" works
1008                 # for IP address assignments.
1009                 with_ascend_hack = no
1010                 ascend_channels_per_line = 23
1011
1012                 # Windows NT machines often authenticate themselves as
1013                 # NT_DOMAIN\username
1014                 #
1015                 # If this is set to 'yes', then the NT_DOMAIN portion
1016                 # of the user-name is silently discarded.
1017                 with_ntdomain_hack = no
1018
1019                 # Specialix Jetstream 8500 24 port access server.
1020                 #
1021                 # If the user name is 10 characters or longer, a "/"
1022                 # and the excess characters after the 10th are
1023                 # appended to the user name.
1024                 #
1025                 # If you're not running that NAS, you don't need
1026                 # this hack.
1027                 with_specialix_jetstream_hack = no
1028
1029                 # Cisco sends it's VSA attributes with the attribute
1030                 # name *again* in the string, like:
1031                 #
1032                 #   H323-Attribute = "h323-attribute=value".
1033                 #
1034                 # If this configuration item is set to 'yes', then
1035                 # the redundant data in the the attribute text is stripped
1036                 # out.  The result is:
1037                 #
1038                 #  H323-Attribute = "value"
1039                 #
1040                 # If you're not running a Cisco NAS, you don't need
1041                 # this hack.
1042                 with_cisco_vsa_hack = no
1043         }
1044
1045         # Livingston-style 'users' file
1046         #
1047         files {
1048                 usersfile = ${confdir}/users
1049                 acctusersfile = ${confdir}/acct_users
1050
1051                 #  If you want to use the old Cistron 'users' file
1052                 #  with FreeRADIUS, you should change the next line
1053                 #  to 'compat = cistron'.  You can the copy your 'users'
1054                 #  file from Cistron.
1055                 compat = no
1056         }
1057
1058         # Write a detailed log of all accounting records received.
1059         #
1060         detail {
1061                 #  Note that we do NOT use NAS-IP-Address here, as
1062                 #  that attribute MAY BE from the originating NAS, and
1063                 #  NOT from the proxy which actually sent us the
1064                 #  request.  The Client-IP-Address attribute is ALWAYS
1065                 #  the address of the client which sent us the
1066                 #  request.
1067                 #
1068                 #  The following line creates a new detail file for
1069                 #  every radius client (by IP address or hostname).
1070                 #  In addition, a new detail file is created every
1071                 #  day, so that the detail file doesn't have to go
1072                 #  through a 'log rotation'
1073                 #
1074                 #  If your detail files are large, you may also want
1075                 #  to add a ':%H' (see doc/variables.txt) to the end
1076                 #  of it, to create a new detail file every hour, e.g.:
1077                 #
1078                 #   ..../detail-%Y%m%d:%H
1079                 #
1080                 #  This will create a new detail file for every hour.
1081                 #
1082                 detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d
1083
1084                 #
1085                 #  The Unix-style permissions on the 'detail' file.
1086                 #
1087                 #  The detail file often contains secret or private
1088                 #  information about users.  So by keeping the file
1089                 #  permissions restrictive, we can prevent unwanted
1090                 #  people from seeing that information.
1091                 detailperm = 0600
1092         }
1093
1094         #
1095         #  Many people want to log authentication requests.
1096         #  Rather than modifying the server core to print out more
1097         #  messages, we can use a different instance of the 'detail'
1098         #  module, to log the authentication requests to a file.
1099         #
1100         #  You will also need to un-comment the 'auth_log' line
1101         #  in the 'authorize' section, below.
1102         #
1103         # detail auth_log {
1104                 # detailfile = ${radacctdir}/%{Client-IP-Address}/auth-detail-%Y%m%d
1105
1106                 #
1107                 #  This MUST be 0600, otherwise anyone can read
1108                 #  the users passwords!
1109                 # detailperm = 0600
1110         # }
1111
1112         #
1113         #  This module logs authentication reply packets sent
1114         #  to a NAS.  Both Access-Accept and Access-Reject packets
1115         #  are logged.
1116         #
1117         #  You will also need to un-comment the 'reply_log' line
1118         #  in the 'post-auth' section, below.
1119         #
1120         # detail reply_log {
1121                 # detailfile = ${radacctdir}/%{Client-IP-Address}/reply-detail-%Y%m%d
1122
1123                 #
1124                 #  This MUST be 0600, otherwise anyone can read
1125                 #  the users passwords!
1126                 # detailperm = 0600
1127         # }
1128
1129         #
1130         #  This module logs packets proxied to a home server.
1131         #
1132         #  You will also need to un-comment the 'pre_proxy_log' line
1133         #  in the 'pre-proxy' section, below.
1134         #
1135         # detail pre_proxy_log {
1136                 # detailfile = ${radacctdir}/%{Client-IP-Address}/pre-proxy-detail-%Y%m%d
1137
1138                 #
1139                 #  This MUST be 0600, otherwise anyone can read
1140                 #  the users passwords!
1141                 # detailperm = 0600
1142         # }
1143
1144         #
1145         #  This module logs response packets from a home server.
1146         #
1147         #  You will also need to un-comment the 'post_proxy_log' line
1148         #  in the 'post-post' section, below.
1149         #
1150         # detail post_proxy_log {
1151                 # detailfile = ${radacctdir}/%{Client-IP-Address}/post-proxy-detail-%Y%m%d
1152
1153                 #
1154                 #  This MUST be 0600, otherwise anyone can read
1155                 #  the users passwords!
1156                 # detailperm = 0600
1157         # }
1158
1159         # Create a unique accounting session Id.  Many NASes re-use or
1160         # repeat values for Acct-Session-Id, causing no end of
1161         # confusion.
1162         #
1163         #  This module will add a (probably) unique session id 
1164         #  to an accounting packet based on the attributes listed
1165         #  below found in the packet.  See doc/rlm_acct_unique for
1166         #  more information.
1167         #
1168         acct_unique {
1169                 key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port-Id"
1170         }
1171
1172
1173         #  Include another file that has the SQL-related configuration.
1174         #  This is another file only because it tends to be big.
1175         #
1176         #  The following configuration file is for use with MySQL.
1177         #
1178         #  For Postgresql, use:         ${confdir}/postgresql.conf
1179         #  For MS-SQL, use:             ${confdir}/mssql.conf
1180         #  For Oracle, use:             ${confdir}/oraclesql.conf
1181         #
1182         $INCLUDE  ${confdir}/sql.conf
1183
1184         #  Write a 'utmp' style file, of which users are currently
1185         #  logged in, and where they've logged in from.
1186         #
1187         #  This file is used mainly for Simultaneous-Use checking,
1188         #  and also 'radwho', to see who's currently logged in.
1189         #
1190         radutmp {
1191                 #  Where the file is stored.  It's not a log file,
1192                 #  so it doesn't need rotating.
1193                 #
1194                 filename = ${logdir}/radutmp
1195
1196                 #  The field in the packet to key on for the
1197                 #  'user' name,  If you have other fields which you want
1198                 #  to use to key on to control Simultaneous-Use,
1199                 #  then you can use them here.
1200                 #
1201                 #  Note, however, that the size of the field in the
1202                 #  'utmp' data structure is small, around 32
1203                 #  characters, so that will limit the possible choices
1204                 #  of keys.
1205                 #
1206                 username = %{User-Name}
1207
1208                 #  Whether or not we want to treat "user" the same
1209                 #  as "USER", or "User".  Some systems have problems
1210                 #  with case sensitivity, so this should be set to
1211                 #  'no' to enable the comparisons of the key attribute
1212                 #  to be case insensitive.
1213                 #
1214                 case_sensitive = yes
1215
1216                 #  Accounting information may be lost, so the user MAY
1217                 #  have logged off of the NAS, but we haven't noticed.
1218                 #  If so, we can verify this information with the NAS,
1219                 #
1220                 #  If we want to believe the 'utmp' file, then this
1221                 #  configuration entry can be set to 'no'.
1222                 #
1223                 check_with_nas = yes            
1224
1225                 # Set the file permissions, as the contents of this file
1226                 # are usually private.
1227                 perm = 0600
1228
1229                 callerid = "yes"
1230         }
1231
1232         # "Safe" radutmp - does not contain caller ID, so it can be
1233         # world-readable, and radwho can work for normal users, without
1234         # exposing any information that isn't already exposed by who(1).
1235         #
1236         # This is another 'instance' of the radutmp module, but it is given
1237         # then name "sradutmp" to identify it later in the "accounting"
1238         # section.
1239         radutmp sradutmp {
1240                 filename = ${logdir}/sradutmp
1241                 perm = 0644
1242                 callerid = "no"
1243         }
1244
1245         # attr_filter - filters the attributes received in replies from
1246         # proxied servers, to make sure we send back to our RADIUS client
1247         # only allowed attributes.
1248         attr_filter {
1249                 attrsfile = ${confdir}/attrs
1250         }
1251
1252         #  counter module:
1253         #  This module takes an attribute (count-attribute).
1254         #  It also takes a key, and creates a counter for each unique
1255         #  key.  The count is incremented when accounting packets are
1256         #  received by the server.  The value of the increment depends
1257         #  on the attribute type.
1258         #  If the attribute is Acct-Session-Time or of an integer type we add the
1259         #  value of the attribute. If it is anything else we increase the
1260         #  counter by one.
1261         #
1262         #  The 'reset' parameter defines when the counters are all reset to
1263         #  zero.  It can be hourly, daily, weekly, monthly or never.
1264         #
1265         #  hourly: Reset on 00:00 of every hour
1266         #  daily: Reset on 00:00:00 every day
1267         #  weekly: Reset on 00:00:00 on sunday
1268         #  monthly: Reset on 00:00:00 of the first day of each month
1269         #
1270         #  It can also be user defined. It should be of the form:
1271         #  num[hdwm] where:
1272         #  h: hours, d: days, w: weeks, m: months
1273         #  If the letter is ommited days will be assumed. In example:
1274         #  reset = 10h (reset every 10 hours)
1275         #  reset = 12  (reset every 12 days)
1276         #
1277         #
1278         #  The check-name attribute defines an attribute which will be
1279         #  registered by the counter module and can be used to set the
1280         #  maximum allowed value for the counter after which the user
1281         #  is rejected.
1282         #  Something like:
1283         #
1284         #  DEFAULT Max-Daily-Session := 36000
1285         #          Fall-Through = 1
1286         #
1287         #  You should add the counter module in the instantiate
1288         #  section so that it registers check-name before the files
1289         #  module reads the users file.
1290         #
1291         #  If check-name is set and the user is to be rejected then we
1292         #  send back a Reply-Message and we log a Failure-Message in
1293         #  the radius.log
1294         #  If the count attribute is Acct-Session-Time then on each login
1295         #  we send back the remaining online time as a Session-Timeout attribute
1296         #
1297         #  The counter-name can also be used instead of using the check-name
1298         #  like below:
1299         #
1300         #  DEFAULT  Daily-Session-Time > 3600, Auth-Type = Reject
1301         #      Reply-Message = "You've used up more than one hour today"
1302         #
1303         #  The allowed-servicetype attribute can be used to only take
1304         #  into account specific sessions. For example if a user first
1305         #  logs in through a login menu and then selects ppp there will
1306         #  be two sessions. One for Login-User and one for Framed-User
1307         #  service type. We only need to take into account the second one.
1308         #
1309         #  The module should be added in the instantiate, authorize and
1310         #  accounting sections.  Make sure that in the authorize
1311         #  section it comes after any module which sets the
1312         #  'check-name' attribute.
1313         #
1314         counter daily {
1315                 filename = ${raddbdir}/db.daily
1316                 key = User-Name
1317                 count-attribute = Acct-Session-Time
1318                 reset = daily
1319                 counter-name = Daily-Session-Time
1320                 check-name = Max-Daily-Session
1321                 allowed-servicetype = Framed-User
1322                 cache-size = 5000
1323         }
1324
1325         # The "always" module is here for debugging purposes. Each
1326         # instance simply returns the same result, always, without
1327         # doing anything.
1328         always fail {
1329                 rcode = fail
1330         }
1331         always reject {
1332                 rcode = reject
1333         }
1334         always ok {
1335                 rcode = ok
1336                 simulcount = 0
1337                 mpp = no
1338         }
1339
1340         #
1341         #  The 'expression' module currently has no configuration.
1342         expr {
1343         }
1344
1345         #
1346         #  The 'digest' module currently has no configuration.
1347         #
1348         #  "Digest" authentication against a Cisco SIP server.
1349         #  See 'doc/rfc/draft-sterman-aaa-sip-00.txt' for details
1350         #  on performing digest authentication for Cisco SIP servers.
1351         #
1352         digest {
1353         }
1354
1355         #
1356         #  Execute external programs
1357         #
1358         #  The first example is useful only for 'xlat'.  To use it,
1359         #  put 'exec' into the 'instantiate' section.  You can then
1360         #  do dynamic translation of attributes like:
1361         #
1362         #  Attribute-Name = `{%exec:/path/to/program args}`
1363         #
1364         #  The value of the attribute will be replaced with the output
1365         #  of the program which is executed.  Due to RADIUS protocol
1366         #  limitations, any output over 253 bytes will be ignored.
1367         #
1368         #  The RADIUS attributes from the user request will be placed
1369         #  into environment variables of the executed program, as
1370         #  described in 'doc/variables.txt'
1371         #
1372         exec {
1373                 wait = yes
1374                 input_pairs = request
1375         }
1376
1377         #
1378         #  This is a more general example of the execute module.
1379         #
1380         #  If you wish to execute an external program in more than
1381         #  one section (e.g. 'authorize', 'pre_proxy', etc), then it
1382         #  is probably best to define a different instance of the
1383         #  'exec' module for every section.     
1384         #       
1385         exec echo {
1386                 #
1387                 #  Wait for the program to finish.
1388                 #
1389                 #  If we do NOT wait, then the program is "fire and
1390                 #  forget", and any output attributes from it are ignored.
1391                 #
1392                 #  If we are looking for the program to output
1393                 #  attributes, and want to add those attributes to the
1394                 #  request, then we MUST wait for the program to
1395                 #  finish, and therefore set 'wait=yes'
1396                 #
1397                 # allowed values: {no, yes}
1398                 wait = yes
1399
1400                 #
1401                 #  The name of the program to execute, and it's
1402                 #  arguments.  Dynamic translation is done on this
1403                 #  field, so things like the following example will
1404                 #  work.
1405                 #
1406                 program = "/bin/echo %{User-Name}"
1407
1408                 #
1409                 #  The attributes which are placed into the
1410                 #  environment variables for the program.
1411                 #
1412                 #  Allowed values are:
1413                 #
1414                 #       request         attributes from the request
1415                 #       config          attributes from the configuration items list
1416                 #       reply           attributes from the reply
1417                 #       proxy-request   attributes from the proxy request
1418                 #       proxy-reply     attributes from the proxy reply
1419                 #
1420                 #  Note that some attributes may not exist at some
1421                 #  stages.  e.g. There may be no proxy-reply
1422                 #  attributes if this module is used in the
1423                 #  'authorize' section.
1424                 #
1425                 input_pairs = request
1426
1427                 #
1428                 #  Where to place the output attributes (if any) from
1429                 #  the executed program.  The values allowed, and the
1430                 #  restrictions as to availability, are the same as
1431                 #  for the input_pairs.
1432                 #
1433                 output_pairs = reply
1434
1435                 #
1436                 #  When to execute the program.  If the packet
1437                 #  type does NOT match what's listed here, then
1438                 #  the module does NOT execute the program.
1439                 #
1440                 #  For a list of allowed packet types, see
1441                 #  the 'dictionary' file, and look for VALUEs
1442                 #  of the Packet-Type attribute.
1443                 #
1444                 #  By default, the module executes on ANY packet.
1445                 #  Un-comment out the following line to tell the
1446                 #  module to execute only if an Access-Accept is
1447                 #  being sent to the NAS.
1448                 #
1449                 #packet_type = Access-Accept
1450         }
1451
1452         #  Do server side ip pool management. Should be added in post-auth and
1453         #  accounting sections.
1454         #
1455         #  The module also requires the existance of the Pool-Name
1456         #  attribute. That way the administrator can add the Pool-Name
1457         #  attribute in the user profiles and use different pools
1458         #  for different users. The Pool-Name attribute is a *check* item not
1459         #  a reply item.
1460         #
1461         # Example:
1462         # radiusd.conf: ippool students { [...] }
1463         # users file  : DEFAULT Group == students, Pool-Name := "students"
1464         #
1465         # ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST THEN ERASE THE DB FILES *******
1466         #
1467         ippool main_pool {
1468
1469                 #  range-start,range-stop: The start and end ip
1470                 #  addresses for the ip pool
1471                 range-start = 192.168.1.1
1472                 range-stop = 192.168.3.254
1473
1474                 #  netmask: The network mask used for the ip's
1475                 netmask = 255.255.255.0
1476
1477                 #  cache-size: The gdbm cache size for the db
1478                 #  files. Should be equal to the number of ip's
1479                 #  available in the ip pool
1480                 cache-size = 800
1481
1482                 # session-db: The main db file used to allocate ip's to clients
1483                 session-db = ${raddbdir}/db.ippool
1484
1485                 # ip-index: Helper db index file used in multilink
1486                 ip-index = ${raddbdir}/db.ipindex
1487
1488                 # override: Will this ippool override a Framed-IP-Address already set
1489                 override = no
1490         }
1491
1492         # ANSI X9.9 token support.  Not included by default.
1493         # $INCLUDE  ${confdir}/x99.conf
1494
1495 }
1496
1497 # Instantiation
1498 #
1499 #  This section orders the loading of the modules.  Modules
1500 #  listed here will get loaded BEFORE the later sections like
1501 #  authorize, authenticate, etc. get examined.
1502 #
1503 #  This section is not strictly needed.  When a section like
1504 #  authorize refers to a module, it's automatically loaded and
1505 #  initialized.  However, some modules may not be listed in any
1506 #  of the following sections, so they can be listed here.
1507 #
1508 #  Also, listing modules here ensures that you have control over
1509 #  the order in which they are initalized.  If one module needs
1510 #  something defined by another module, you can list them in order
1511 #  here, and ensure that the configuration will be OK.
1512 #
1513 instantiate {
1514         #
1515         #  The expression module doesn't do authorization,
1516         #  authentication, or accounting.  It only does dynamic
1517         #  translation, of the form:
1518         #
1519         #       Session-Timeout = `%{expr:2 + 3}`
1520         #
1521         #  So the module needs to be instantiated, but CANNOT be
1522         #  listed in any other section.  See 'doc/rlm_expr' for
1523         #  more information.
1524         #
1525         expr
1526
1527         #
1528         # We add the counter module here so that it registers
1529         # the check-name attribute before any module which sets
1530         # it
1531 #       daily
1532 }
1533
1534 #  Authorization. First preprocess (hints and huntgroups files),
1535 #  then realms, and finally look in the "users" file.
1536 #
1537 #  The order of the realm modules will determine the order that
1538 #  we try to find a matching realm.
1539 #
1540 #  Make *sure* that 'preprocess' comes before any realm if you 
1541 #  need to setup hints for the remote radius server
1542 authorize {
1543         #
1544         #  The preprocess module takes care of sanitizing some bizarre
1545         #  attributes in the request, and turning them into attributes
1546         #  which are more standard.
1547         #
1548         #  It takes care of processing the 'raddb/hints' and the
1549         #  'raddb/huntgroups' files.
1550         #
1551         #  It also adds a Client-IP-Address attribute to the request.
1552         preprocess
1553
1554         #
1555         #  If you want to have a log of authentication requests,
1556         #  un-comment the following line, and the 'detail auth_log'
1557         #  section, above.
1558 #       auth_log
1559         
1560         #
1561         #  The chap module will set 'Auth-Type := CHAP' if we are
1562         #  handling a CHAP request and Auth-Type has not already been set
1563         chap
1564
1565 #       attr_filter
1566
1567         #
1568         #  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
1569         #  authentication.
1570         eap
1571
1572         #
1573         #  If you have a Cisco SIP server authenticating against
1574         #  FreeRADIUS, uncomment the following line.
1575         # digest
1576
1577         #
1578         #  Look for IPASS style 'realm/', and if not found, look for
1579         #  '@realm', and decide whether or not to proxy, based on
1580         #  that.
1581 #       realmslash
1582         suffix
1583
1584         #
1585         #  Read the 'users' file
1586         files
1587
1588         #
1589         #  If you are using /etc/smbpasswd, and are also doing
1590         #  mschap authentication, the un-comment this line, and
1591         #  configure the 'etc_smbpasswd' module, above.
1592 #       etc_smbpasswd
1593
1594         #
1595         #  If the users are logging in with an MS-CHAP-Challenge
1596         #  attribute for authentication, the mschap module will find
1597         #  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
1598         #  to the request, which will cause the server to then use
1599         #  the mschap module for authentication.
1600         mschap
1601
1602
1603 # The ldap module will set Auth-Type to LDAP if it has not already been set
1604 #       ldap
1605 #       daily
1606 }
1607
1608
1609 # Authentication.
1610 #
1611 #  This section lists which modules are available for authentication.
1612 #  Note that it does NOT mean 'try each module in order'.  It means
1613 #  that you have to have a module from the 'authorize' section add
1614 #  a configuration attribute 'Auth-Type := FOO'.  That authentication type
1615 #  is then used to pick the apropriate module from the list below.
1616 #
1617 #  The default Auth-Type is Local.  That is, whatever is not included inside
1618 # an authtype section will be called only if Auth-Type is set to Local.
1619 #
1620 # So you should do the following:
1621 # - Set Auth-Type to an appropriate value in the authorize modules above.
1622 #   For example, the chap module will set Auth-Type to CHAP, ldap to LDAP, etc.
1623 # - After that create corresponding authtype sections in the
1624 #   authenticate section below and call the appropriate modules.
1625 authenticate {
1626         #
1627         #  PAP authentication, when a back-end database listed
1628         #  in the 'authorize' section supplies a password.  The
1629         #  password can be clear-text, or encrypted.
1630         Auth-Type PAP {
1631                 pap
1632         }
1633
1634         #
1635         #  Most people want CHAP authentication
1636         #  A back-end database listed in the 'authorize' section
1637         #  MUST supply a CLEAR TEXT password.  Encrypted passwords
1638         #  won't work.
1639         Auth-Type CHAP {
1640                 chap
1641         }
1642
1643         #
1644         #  MSCHAP authentication.
1645         Auth-Type MS-CHAP {
1646                 mschap
1647         }
1648
1649         #
1650         #  If you have a Cisco SIP server authenticating against
1651         #  FreeRADIUS, uncomment the following line.
1652         # digest
1653
1654         #
1655         #  Pluggable Authentication Modules.
1656 #       pam
1657
1658         #
1659         #  See 'man getpwent' for information on how the 'unix'
1660         #  module checks the users password.  Note that packets
1661         #  containing CHAP-Password attributes CANNOT be authenticated
1662         #  against /etc/passwd!  See the FAQ for details.
1663         #  
1664         unix
1665
1666         # Uncomment it if you want to use ldap for authentication
1667 #       Auth-Type LDAP {
1668 #               ldap
1669 #       }
1670
1671
1672         #
1673         #  Allow EAP authentication.
1674         eap
1675 }
1676
1677
1678 #
1679 #  Pre-accounting.  Decide which accounting type to use.
1680 #
1681 preacct {
1682         preprocess
1683
1684         #
1685         #  Look for IPASS-style 'realm/', and if not found, look for
1686         #  '@realm', and decide whether or not to proxy, based on
1687         #  that.
1688         #
1689         #  Accounting requests are generally proxied to the same
1690         #  home server as authentication requests.
1691 #       realmslash
1692         suffix
1693
1694         #
1695         #  Read the 'acct_users' file
1696         files
1697 }
1698
1699 #
1700 #  Accounting.  Log the accounting data.
1701 #
1702 accounting {
1703         #
1704         #  Ensure that we have a semi-unique identifier for every
1705         #  request, and many NAS boxes are broken.
1706         acct_unique
1707
1708         #
1709         #  Create a 'detail'ed log of the packets.
1710         #  Note that accounting requests which are proxied
1711         #  are also logged in the detail file.
1712         detail
1713 #       daily
1714
1715         unix            # wtmp file
1716
1717         #
1718         #  For Simultaneous-Use tracking.
1719         #
1720         #  Due to packet losses in the network, the data here
1721         #  may be incorrect.  There's little we can do about it.
1722         radutmp
1723 #       sradutmp
1724
1725         #  Return an address to the IP Pool when we see a stop record.
1726 #       main_pool
1727 }
1728
1729
1730 #  Session database, used for checking Simultaneous-Use. Either the radutmp 
1731 #  or rlm_sql module can handle this.
1732 #  The rlm_sql module is *much* faster
1733 session {
1734         radutmp
1735 #       sql
1736 }
1737
1738
1739 #  Post-Authentication
1740 #  Once we KNOW that the user has been authenticated, there are
1741 #  additional steps we can take.
1742 post-auth {
1743         #  Get an address from the IP Pool.
1744 #       main_pool
1745
1746         #
1747         #  If you want to have a log of authentication replies,
1748         #  un-comment the following line, and the 'detail reply_log'
1749         #  section, above.
1750 #       reply_log
1751 }
1752
1753 #
1754 #  When the server decides to proxy a request to a home server,
1755 #  the proxied request is first passed through the pre-proxy
1756 #  stage.  This stage can re-write the request, or decide to
1757 #  cancel the proxy.
1758 #
1759 #  Only a few modules currently have this method.
1760 #
1761 pre-proxy {
1762 #       attr_rewrite
1763
1764         #  If you want to have a log of packets proxied to a home
1765         #  server, un-comment the following line, and the
1766         #  'detail pre_proxy_log' section, above.
1767 #       pre_proxy_log
1768 }
1769
1770 #
1771 #  When the server receives a reply to a request it proxied
1772 #  to a home server, the request may be massaged here, in the
1773 #  post-proxy stage.
1774 #
1775 post-proxy {
1776         #
1777
1778         #  If you want to have a log of replies from a home server,
1779         #  un-comment the following line, and the 'detail post_proxy_log'
1780         #  section, above.
1781 #       post_proxy_log
1782
1783 #       attr_rewrite
1784
1785         #  Uncomment the following line if you want to filter replies from
1786         #  remote proxies based on the rules defined in the 'attrs' file.
1787
1788 #       attr_filter
1789
1790         #
1791         #  If you are proxing LEAP, you MUST configure the EAP
1792         #  module, and you MUST list it here, in the post-proxy
1793         #  stage.
1794         #
1795         #  You MUST also use the 'nostrip' option in the 'realm'
1796         #  configuration.  Otherwise, the User-Name attribute
1797         #  in the proxied request will not match the user name
1798         #  hidden inside of the EAP packet, and the end server will
1799         #  reject the EAP request.
1800         #
1801         eap
1802 }