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