Add second patch from Novell for creating a postauth method in order to
[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                 #
807                 # Un-comment the following to disable Novell eDirectory account
808                 # policy check and intruder detection. This will work *only if*
809                 # FreeRADIUS is configured to build with --with-edir option.
810                 #
811                 # edir_account_policy_check=no
812                 #
813                 # groupname_attribute = cn
814                 # groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
815                 # groupmembership_attribute = radiusGroupName
816                 timeout = 4
817                 timelimit = 3
818                 net_timeout = 1
819                 # compare_check_items = yes
820                 # do_xlat = yes
821                 # access_attr_used_for_allow = yes
822         }
823
824         # passwd module allows to do authorization via any passwd-like
825         # file and to extract any attributes from these modules
826         #
827         # parameters are:
828         #   filename - path to filename
829         #   format - format for filename record. This parameters
830         #            correlates record in the passwd file and RADIUS
831         #            attributes.
832         #
833         #            Field marked as '*' is key field. That is, the parameter
834         #            with this name from the request is used to search for
835         #            the record from passwd file
836         #            Attribute marked as '=' is added to reply_itmes instead
837         #            of default configure_itmes
838         #            Attribute marked as '~' is added to request_items
839         #
840         #            Field marked as ',' may contain a comma separated list
841         #            of attributes.
842         #   authtype - if record found this Auth-Type is used to authenticate
843         #            user
844         #   hashsize - hashtable size. If 0 or not specified records are not
845         #            stored in memory and file is red on every request.
846         #   allowmultiplekeys - if few records for every key are allowed
847         #   ignorenislike - ignore NIS-related records
848         #   delimiter - symbol to use as a field separator in passwd file,
849         #            for format ':' symbol is always used. '\0', '\n' are
850         #            not allowed 
851         #
852
853         #  An example configuration for using /etc/smbpasswd.
854         #
855         #passwd etc_smbpasswd {
856         #       filename = /etc/smbpasswd
857         #       format = "*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::"
858         #       authtype = MS-CHAP
859         #       hashsize = 100
860         #       ignorenislike = no
861         #       allowmultiplekeys = no
862         #}
863
864         #  Similar configuration, for the /etc/group file. Adds a Group-Name
865         #  attribute for every group that the user is member of.
866         #
867         #passwd etc_group {
868         #       filename = /etc/group
869         #       format = "=Group-Name:::*,User-Name"
870         #       hashsize = 50
871         #       ignorenislike = yes
872         #       allowmultiplekeys = yes
873         #       delimiter = ":"
874         #}
875
876         # Realm module, for proxying.
877         #
878         #  You can have multiple instances of the realm module to
879         #  support multiple realm syntaxs at the same time.  The
880         #  search order is defined by the order in the authorize and
881         #  preacct sections.
882         #
883         #  Four config options:
884         #       format         -  must be 'prefix' or 'suffix'
885         #       delimiter      -  must be a single character
886         #       ignore_default -  set to 'yes' or 'no'
887         #       ignore_null    -  set to 'yes' or 'no'
888         #
889         #  ignore_default and ignore_null can be set to 'yes' to prevent
890         #  the module from matching against DEFAULT or NULL realms.  This
891         #  may be useful if you have have multiple instances of the
892         #  realm module.
893         #
894         #  They both default to 'no'.
895         #
896
897         #  'realm/username'
898         #
899         #  Using this entry, IPASS users have their realm set to "IPASS".
900         realm IPASS {
901                 format = prefix
902                 delimiter = "/"
903                 ignore_default = no
904                 ignore_null = no
905         }
906
907         #  'username@realm'
908         #
909         realm suffix {
910                 format = suffix
911                 delimiter = "@"
912                 ignore_default = no
913                 ignore_null = no
914         }
915
916         #  'username%realm'
917         #
918         realm realmpercent {
919                 format = suffix
920                 delimiter = "%"
921                 ignore_default = no
922                 ignore_null = no
923         }
924
925         #
926         #  'domain\user'
927         #
928         realm ntdomain {
929                 format = prefix
930                 delimiter = "\\"
931                 ignore_default = no
932                 ignore_null = no
933         }       
934
935         #  A simple value checking module
936         #
937         #  It can be used to check if an attribute value in the request
938         #  matches a (possibly multi valued) attribute in the check
939         #  items This can be used for example for caller-id
940         #  authentication.  For the module to run, both the request
941         #  attribute and the check items attribute must exist
942         #
943         #  i.e.
944         #  A user has an ldap entry with 2 radiusCallingStationId
945         #  attributes with values "12345678" and "12345679".  If we
946         #  enable rlm_checkval, then any request which contains a
947         #  Calling-Station-Id with one of those two values will be
948         #  accepted.  Requests with other values for
949         #  Calling-Station-Id will be rejected.
950         #
951         #  Regular expressions in the check attribute value are allowed
952         #  as long as the operator is '=~'
953         #
954         checkval {
955                 # The attribute to look for in the request
956                 item-name = Calling-Station-Id
957
958                 # The attribute to look for in check items. Can be multi valued
959                 check-name = Calling-Station-Id
960
961                 # The data type. Can be
962                 # string,integer,ipaddr,date,abinary,octets
963                 data-type = string
964
965                 # If set to yes and we dont find the item-name attribute in the
966                 # request then we send back a reject
967                 # DEFAULT is no
968                 #notfound-reject = no
969         }
970         
971         #  rewrite arbitrary packets.  Useful in accounting and authorization.
972         #
973         #
974         #  The module can also use the Rewrite-Rule attribute. If it
975         #  is set and matches the name of the module instance, then
976         #  that module instance will be the only one which runs.
977         #
978         #  Also if new_attribute is set to yes then a new attribute
979         #  will be created containing the value replacewith and it
980         #  will be added to searchin (packet, reply, proxy, proxy_reply or config).
981         # searchfor,ignore_case and max_matches will be ignored in that case.
982         #
983         # Backreferences are supported: %{0} will contain the string the whole match
984         # and %{1} to %{8} will contain the contents of the 1st to the 8th parentheses
985         #
986         # If max_matches is greater than one the backreferences will correspond to the
987         # first match
988
989         #
990         #attr_rewrite sanecallerid {
991         #       attribute = Called-Station-Id
992                 # may be "packet", "reply", "proxy", "proxy_reply" or "config"
993         #       searchin = packet
994         #       searchfor = "[+ ]"
995         #       replacewith = ""
996         #       ignore_case = no
997         #       new_attribute = no
998         #       max_matches = 10
999         #       ## If set to yes then the replace string will be appended to the original string
1000         #       append = no
1001         #}
1002
1003         # Preprocess the incoming RADIUS request, before handing it off
1004         # to other modules.
1005         #
1006         #  This module processes the 'huntgroups' and 'hints' files.
1007         #  In addition, it re-writes some weird attributes created
1008         #  by some NASes, and converts the attributes into a form which
1009         #  is a little more standard.
1010         #
1011         preprocess {
1012                 huntgroups = ${confdir}/huntgroups
1013                 hints = ${confdir}/hints
1014
1015                 # This hack changes Ascend's wierd port numberings
1016                 # to standard 0-??? port numbers so that the "+" works
1017                 # for IP address assignments.
1018                 with_ascend_hack = no
1019                 ascend_channels_per_line = 23
1020
1021                 # Windows NT machines often authenticate themselves as
1022                 # NT_DOMAIN\username
1023                 #
1024                 # If this is set to 'yes', then the NT_DOMAIN portion
1025                 # of the user-name is silently discarded.
1026                 #
1027                 # This configuration entry SHOULD NOT be used.
1028                 # See the "realms" module for a better way to handle
1029                 # NT domains.
1030                 with_ntdomain_hack = no
1031
1032                 # Specialix Jetstream 8500 24 port access server.
1033                 #
1034                 # If the user name is 10 characters or longer, a "/"
1035                 # and the excess characters after the 10th are
1036                 # appended to the user name.
1037                 #
1038                 # If you're not running that NAS, you don't need
1039                 # this hack.
1040                 with_specialix_jetstream_hack = no
1041
1042                 # Cisco (and Quintum in Cisco mode) sends it's VSA attributes
1043                 # with the attribute name *again* in the string, like:
1044                 #
1045                 #   H323-Attribute = "h323-attribute=value".
1046                 #
1047                 # If this configuration item is set to 'yes', then
1048                 # the redundant data in the the attribute text is stripped
1049                 # out.  The result is:
1050                 #
1051                 #  H323-Attribute = "value"
1052                 #
1053                 # If you're not running a Cisco or Quintum NAS, you don't
1054                 # need this hack.
1055                 with_cisco_vsa_hack = no
1056         }
1057
1058         # Livingston-style 'users' file
1059         #
1060         files {
1061                 usersfile = ${confdir}/users
1062                 acctusersfile = ${confdir}/acct_users
1063
1064                 #  If you want to use the old Cistron 'users' file
1065                 #  with FreeRADIUS, you should change the next line
1066                 #  to 'compat = cistron'.  You can the copy your 'users'
1067                 #  file from Cistron.
1068                 compat = no
1069         }
1070
1071         # Write a detailed log of all accounting records received.
1072         #
1073         detail {
1074                 #  Note that we do NOT use NAS-IP-Address here, as
1075                 #  that attribute MAY BE from the originating NAS, and
1076                 #  NOT from the proxy which actually sent us the
1077                 #  request.  The Client-IP-Address attribute is ALWAYS
1078                 #  the address of the client which sent us the
1079                 #  request.
1080                 #
1081                 #  The following line creates a new detail file for
1082                 #  every radius client (by IP address or hostname).
1083                 #  In addition, a new detail file is created every
1084                 #  day, so that the detail file doesn't have to go
1085                 #  through a 'log rotation'
1086                 #
1087                 #  If your detail files are large, you may also want
1088                 #  to add a ':%H' (see doc/variables.txt) to the end
1089                 #  of it, to create a new detail file every hour, e.g.:
1090                 #
1091                 #   ..../detail-%Y%m%d:%H
1092                 #
1093                 #  This will create a new detail file for every hour.
1094                 #
1095                 detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d
1096
1097                 #
1098                 #  The Unix-style permissions on the 'detail' file.
1099                 #
1100                 #  The detail file often contains secret or private
1101                 #  information about users.  So by keeping the file
1102                 #  permissions restrictive, we can prevent unwanted
1103                 #  people from seeing that information.
1104                 detailperm = 0600
1105         }
1106
1107         #
1108         #  Many people want to log authentication requests.
1109         #  Rather than modifying the server core to print out more
1110         #  messages, we can use a different instance of the 'detail'
1111         #  module, to log the authentication requests to a file.
1112         #
1113         #  You will also need to un-comment the 'auth_log' line
1114         #  in the 'authorize' section, below.
1115         #
1116         # detail auth_log {
1117                 # detailfile = ${radacctdir}/%{Client-IP-Address}/auth-detail-%Y%m%d
1118
1119                 #
1120                 #  This MUST be 0600, otherwise anyone can read
1121                 #  the users passwords!
1122                 # detailperm = 0600
1123         # }
1124
1125         #
1126         #  This module logs authentication reply packets sent
1127         #  to a NAS.  Both Access-Accept and Access-Reject packets
1128         #  are logged.
1129         #
1130         #  You will also need to un-comment the 'reply_log' line
1131         #  in the 'post-auth' section, below.
1132         #
1133         # detail reply_log {
1134                 # detailfile = ${radacctdir}/%{Client-IP-Address}/reply-detail-%Y%m%d
1135
1136                 #
1137                 #  This MUST be 0600, otherwise anyone can read
1138                 #  the users passwords!
1139                 # detailperm = 0600
1140         # }
1141
1142         #
1143         #  This module logs packets proxied to a home server.
1144         #
1145         #  You will also need to un-comment the 'pre_proxy_log' line
1146         #  in the 'pre-proxy' section, below.
1147         #
1148         # detail pre_proxy_log {
1149                 # detailfile = ${radacctdir}/%{Client-IP-Address}/pre-proxy-detail-%Y%m%d
1150
1151                 #
1152                 #  This MUST be 0600, otherwise anyone can read
1153                 #  the users passwords!
1154                 # detailperm = 0600
1155         # }
1156
1157         #
1158         #  This module logs response packets from a home server.
1159         #
1160         #  You will also need to un-comment the 'post_proxy_log' line
1161         #  in the 'post-proxy' section, below.
1162         #
1163         # detail post_proxy_log {
1164                 # detailfile = ${radacctdir}/%{Client-IP-Address}/post-proxy-detail-%Y%m%d
1165
1166                 #
1167                 #  This MUST be 0600, otherwise anyone can read
1168                 #  the users passwords!
1169                 # detailperm = 0600
1170         # }
1171
1172         # Create a unique accounting session Id.  Many NASes re-use or
1173         # repeat values for Acct-Session-Id, causing no end of
1174         # confusion.
1175         #
1176         #  This module will add a (probably) unique session id 
1177         #  to an accounting packet based on the attributes listed
1178         #  below found in the packet.  See doc/rlm_acct_unique for
1179         #  more information.
1180         #
1181         acct_unique {
1182                 key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
1183         }
1184
1185
1186         #  Include another file that has the SQL-related configuration.
1187         #  This is another file only because it tends to be big.
1188         #
1189         #  The following configuration file is for use with MySQL.
1190         #
1191         #  For Postgresql, use:         ${confdir}/postgresql.conf
1192         #  For MS-SQL, use:             ${confdir}/mssql.conf
1193         #  For Oracle, use:             ${confdir}/oraclesql.conf
1194         #
1195         $INCLUDE  ${confdir}/sql.conf
1196
1197
1198         #  For Cisco VoIP specific accounting with Postgresql,
1199         #  use:         ${confdir}/pgsql-voip.conf
1200         #
1201         #  You will also need the sql schema from:
1202         #        src/billing/cisco_h323_db_schema-postgres.sql
1203         #  Note: This config can be use AS WELL AS the standard sql
1204         #  config if you need SQL based Auth
1205         
1206
1207         #  Write a 'utmp' style file, of which users are currently
1208         #  logged in, and where they've logged in from.
1209         #
1210         #  This file is used mainly for Simultaneous-Use checking,
1211         #  and also 'radwho', to see who's currently logged in.
1212         #
1213         radutmp {
1214                 #  Where the file is stored.  It's not a log file,
1215                 #  so it doesn't need rotating.
1216                 #
1217                 filename = ${logdir}/radutmp
1218
1219                 #  The field in the packet to key on for the
1220                 #  'user' name,  If you have other fields which you want
1221                 #  to use to key on to control Simultaneous-Use,
1222                 #  then you can use them here.
1223                 #
1224                 #  Note, however, that the size of the field in the
1225                 #  'utmp' data structure is small, around 32
1226                 #  characters, so that will limit the possible choices
1227                 #  of keys.
1228                 #
1229                 #  You may want instead: %{Stripped-User-Name:-%{User-Name}}
1230                 username = %{User-Name}
1231
1232
1233                 #  Whether or not we want to treat "user" the same
1234                 #  as "USER", or "User".  Some systems have problems
1235                 #  with case sensitivity, so this should be set to
1236                 #  'no' to enable the comparisons of the key attribute
1237                 #  to be case insensitive.
1238                 #
1239                 case_sensitive = yes
1240
1241                 #  Accounting information may be lost, so the user MAY
1242                 #  have logged off of the NAS, but we haven't noticed.
1243                 #  If so, we can verify this information with the NAS,
1244                 #
1245                 #  If we want to believe the 'utmp' file, then this
1246                 #  configuration entry can be set to 'no'.
1247                 #
1248                 check_with_nas = yes            
1249
1250                 # Set the file permissions, as the contents of this file
1251                 # are usually private.
1252                 perm = 0600
1253
1254                 callerid = "yes"
1255         }
1256
1257         # "Safe" radutmp - does not contain caller ID, so it can be
1258         # world-readable, and radwho can work for normal users, without
1259         # exposing any information that isn't already exposed by who(1).
1260         #
1261         # This is another 'instance' of the radutmp module, but it is given
1262         # then name "sradutmp" to identify it later in the "accounting"
1263         # section.
1264         radutmp sradutmp {
1265                 filename = ${logdir}/sradutmp
1266                 perm = 0644
1267                 callerid = "no"
1268         }
1269
1270         # attr_filter - filters the attributes received in replies from
1271         # proxied servers, to make sure we send back to our RADIUS client
1272         # only allowed attributes.
1273         attr_filter {
1274                 attrsfile = ${confdir}/attrs
1275         }
1276
1277         #  counter module:
1278         #  This module takes an attribute (count-attribute).
1279         #  It also takes a key, and creates a counter for each unique
1280         #  key.  The count is incremented when accounting packets are
1281         #  received by the server.  The value of the increment depends
1282         #  on the attribute type.
1283         #  If the attribute is Acct-Session-Time or of an integer type we add the
1284         #  value of the attribute. If it is anything else we increase the
1285         #  counter by one.
1286         #
1287         #  The 'reset' parameter defines when the counters are all reset to
1288         #  zero.  It can be hourly, daily, weekly, monthly or never.
1289         #
1290         #  hourly: Reset on 00:00 of every hour
1291         #  daily: Reset on 00:00:00 every day
1292         #  weekly: Reset on 00:00:00 on sunday
1293         #  monthly: Reset on 00:00:00 of the first day of each month
1294         #
1295         #  It can also be user defined. It should be of the form:
1296         #  num[hdwm] where:
1297         #  h: hours, d: days, w: weeks, m: months
1298         #  If the letter is ommited days will be assumed. In example:
1299         #  reset = 10h (reset every 10 hours)
1300         #  reset = 12  (reset every 12 days)
1301         #
1302         #
1303         #  The check-name attribute defines an attribute which will be
1304         #  registered by the counter module and can be used to set the
1305         #  maximum allowed value for the counter after which the user
1306         #  is rejected.
1307         #  Something like:
1308         #
1309         #  DEFAULT Max-Daily-Session := 36000
1310         #          Fall-Through = 1
1311         #
1312         #  You should add the counter module in the instantiate
1313         #  section so that it registers check-name before the files
1314         #  module reads the users file.
1315         #
1316         #  If check-name is set and the user is to be rejected then we
1317         #  send back a Reply-Message and we log a Failure-Message in
1318         #  the radius.log
1319         #  If the count attribute is Acct-Session-Time then on each login
1320         #  we send back the remaining online time as a Session-Timeout attribute
1321         #  ELSE and if the return-attribute is set, we send back that attribute.
1322         #  The return-attribute is set MUST be of an integer type
1323         #
1324         #  The counter-name can also be used instead of using the check-name
1325         #  like below:
1326         #
1327         #  DEFAULT  Daily-Session-Time > 3600, Auth-Type = Reject
1328         #      Reply-Message = "You've used up more than one hour today"
1329         #
1330         #  The allowed-servicetype attribute can be used to only take
1331         #  into account specific sessions. For example if a user first
1332         #  logs in through a login menu and then selects ppp there will
1333         #  be two sessions. One for Login-User and one for Framed-User
1334         #  service type. We only need to take into account the second one.
1335         #
1336         #  The module should be added in the instantiate, authorize and
1337         #  accounting sections.  Make sure that in the authorize
1338         #  section it comes after any module which sets the
1339         #  'check-name' attribute.
1340         #
1341         counter daily {
1342                 filename = ${raddbdir}/db.daily
1343                 key = User-Name
1344                 count-attribute = Acct-Session-Time
1345                 reset = daily
1346                 counter-name = Daily-Session-Time
1347                 check-name = Max-Daily-Session
1348                 allowed-servicetype = Framed-User
1349                 #return-attribute = Session-Timeout
1350                 cache-size = 5000
1351         }
1352
1353         # The "always" module is here for debugging purposes. Each
1354         # instance simply returns the same result, always, without
1355         # doing anything.
1356         always fail {
1357                 rcode = fail
1358         }
1359         always reject {
1360                 rcode = reject
1361         }
1362         always ok {
1363                 rcode = ok
1364                 simulcount = 0
1365                 mpp = no
1366         }
1367
1368         #
1369         #  The 'expression' module currently has no configuration.
1370         #
1371         #  This module is useful only for 'xlat'.  To use it,
1372         #  put 'exec' into the 'instantiate' section.  You can then
1373         #  do dynamic translation of attributes like:
1374         #
1375         #  Attribute-Name = `%{expr:2 + 3 + %{exec: uid -u}}`
1376         #
1377         #  The value of the attribute will be replaced with the output
1378         #  of the program which is executed.  Due to RADIUS protocol
1379         #  limitations, any output over 253 bytes will be ignored.
1380         #
1381         #  The module also registers a few paircompare functions
1382         expr {
1383         }
1384
1385         #
1386         #  The 'digest' module currently has no configuration.
1387         #
1388         #  "Digest" authentication against a Cisco SIP server.
1389         #  See 'doc/rfc/draft-sterman-aaa-sip-00.txt' for details
1390         #  on performing digest authentication for Cisco SIP servers.
1391         #
1392         digest {
1393         }
1394
1395         #
1396         # The expiration module. This handles the Expiration attribute
1397         # It should be included in the *end* of the authorize section
1398         # in order to handle user Expiration. It should also be included
1399         # in the instantiate section in order to register the Expiration
1400         # compare function
1401         #
1402         expiration {
1403                 #
1404                 # The Reply-Message which will be sent back in case the
1405                 # account has expired. Dynamic substitution is supported
1406                 #
1407                 reply-message = "Password Has Expired\r\n" 
1408 #               reply-message = "Your account has expired, %{User-Name}\r\n"
1409         }
1410
1411         # The logintime module. This handles the Login-Time,
1412         # Current-Time, and Time-Of-Day attributes.  It should be
1413         # included in the *end* of the authorize section in order to
1414         # handle Login-Time checks. It should also be included in the
1415         # instantiate section in order to register the Current-Time
1416         # and Time-Of-Day comparison functions.
1417         #
1418         # When the Login-Time attribute is set to some value, and the
1419         # user has bene permitted to log in, a Session-Timeout is
1420         # calculated based on the remaining time.  See "doc/README".
1421         #
1422         logintime {
1423                 #
1424                 # The Reply-Message which will be sent back in case
1425                 # the account is calling outside of the allowed
1426                 # timespan. Dynamic substitution is supported.
1427                 #
1428                 reply-message = "You are calling outside your allowed timespan\r\n"
1429 #               reply-message = "Outside allowed timespan (%{check:Login-Time}), %{User-Name}\r\n"
1430
1431                 # The minimum timeout (in seconds) a user is allowed
1432                 # to have. If the calculated timeout is lower we don't
1433                 # allow the logon. Some NASes do not handle values
1434                 # lower than 60 seconds well.
1435                 minimum-timeout = 60
1436         }
1437         #
1438         #  Execute external programs
1439         #
1440         #  This module is useful only for 'xlat'.  To use it,
1441         #  put 'exec' into the 'instantiate' section.  You can then
1442         #  do dynamic translation of attributes like:
1443         #
1444         #  Attribute-Name = `%{exec:/path/to/program args}`
1445         #
1446         #  The value of the attribute will be replaced with the output
1447         #  of the program which is executed.  Due to RADIUS protocol
1448         #  limitations, any output over 253 bytes will be ignored.
1449         #
1450         #  The RADIUS attributes from the user request will be placed
1451         #  into environment variables of the executed program, as
1452         #  described in 'doc/variables.txt'
1453         #
1454         exec {
1455                 wait = yes
1456                 input_pairs = request
1457                 shell_escape = yes
1458         }
1459
1460         #
1461         #  This is a more general example of the execute module.
1462         #
1463         #  This one is called "echo".
1464         #
1465         #  Attribute-Name = `%{echo:/path/to/program args}`
1466         #
1467         #  If you wish to execute an external program in more than
1468         #  one section (e.g. 'authorize', 'pre_proxy', etc), then it
1469         #  is probably best to define a different instance of the
1470         #  'exec' module for every section.     
1471         #
1472         #  The return value of the program run determines the result
1473         #  of the exec instance call as follows:
1474         #  (See doc/configurable_failover for details)
1475         #
1476         #  < 0 : fail      the module failed
1477         #  = 0 : ok        the module succeeded
1478         #  = 1 : reject    the module rejected the user
1479         #  = 2 : fail      the module failed
1480         #  = 3 : ok        the module succeeded
1481         #  = 4 : handled   the module has done everything to handle the request
1482         #  = 5 : invalid   the user's configuration entry was invalid
1483         #  = 6 : userlock  the user was locked out
1484         #  = 7 : notfound  the user was not found
1485         #  = 8 : noop      the module did nothing
1486         #  = 9 : updated   the module updated information in the request
1487         #  > 9 : fail      the module failed
1488         #
1489         exec echo {
1490                 #
1491                 #  Wait for the program to finish.
1492                 #
1493                 #  If we do NOT wait, then the program is "fire and
1494                 #  forget", and any output attributes from it are ignored.
1495                 #
1496                 #  If we are looking for the program to output
1497                 #  attributes, and want to add those attributes to the
1498                 #  request, then we MUST wait for the program to
1499                 #  finish, and therefore set 'wait=yes'
1500                 #
1501                 # allowed values: {no, yes}
1502                 wait = yes
1503
1504                 #
1505                 #  The name of the program to execute, and it's
1506                 #  arguments.  Dynamic translation is done on this
1507                 #  field, so things like the following example will
1508                 #  work.
1509                 #
1510                 program = "/bin/echo %{User-Name}"
1511
1512                 #
1513                 #  The attributes which are placed into the
1514                 #  environment variables for the program.
1515                 #
1516                 #  Allowed values are:
1517                 #
1518                 #       request         attributes from the request
1519                 #       config          attributes from the configuration items list
1520                 #       reply           attributes from the reply
1521                 #       proxy-request   attributes from the proxy request
1522                 #       proxy-reply     attributes from the proxy reply
1523                 #
1524                 #  Note that some attributes may not exist at some
1525                 #  stages.  e.g. There may be no proxy-reply
1526                 #  attributes if this module is used in the
1527                 #  'authorize' section.
1528                 #
1529                 input_pairs = request
1530
1531                 #
1532                 #  Where to place the output attributes (if any) from
1533                 #  the executed program.  The values allowed, and the
1534                 #  restrictions as to availability, are the same as
1535                 #  for the input_pairs.
1536                 #
1537                 output_pairs = reply
1538
1539                 #
1540                 #  When to execute the program.  If the packet
1541                 #  type does NOT match what's listed here, then
1542                 #  the module does NOT execute the program.
1543                 #
1544                 #  For a list of allowed packet types, see
1545                 #  the 'dictionary' file, and look for VALUEs
1546                 #  of the Packet-Type attribute.
1547                 #
1548                 #  By default, the module executes on ANY packet.
1549                 #  Un-comment out the following line to tell the
1550                 #  module to execute only if an Access-Accept is
1551                 #  being sent to the NAS.
1552                 #
1553                 #packet_type = Access-Accept
1554
1555                 #
1556                 #  Should we escape the environment variables?
1557                 #  
1558                 #  If this is set, all the RADIUS attributes
1559                 #  are capitalised and dashes replaced with
1560                 #  underscores. Also, RADIUS values are surrounded
1561                 #  with double-quotes.
1562                 #
1563                 #  That is to say: User-Name=BobUser => USER_NAME="BobUser"
1564                 shell_escape = yes
1565
1566         }
1567
1568         #  Do server side ip pool management. Should be added in post-auth and
1569         #  accounting sections.
1570         #
1571         #  The module also requires the existance of the Pool-Name
1572         #  attribute. That way the administrator can add the Pool-Name
1573         #  attribute in the user profiles and use different pools
1574         #  for different users. The Pool-Name attribute is a *check* item not
1575         #  a reply item.
1576         #  The Pool-Name should be set to the ippool module instance name or to
1577         #  DEFAULT to much any module.
1578         #
1579         # Example:
1580         # radiusd.conf: ippool students { [...] }
1581         #               ippool teachers { [...] }
1582         # users file  : DEFAULT Group == students, Pool-Name := "students"
1583         #               DEFAULT Group == teachers, Pool-Name := "teachers"
1584         #               DEFAULT Group == other, Pool-Name := "DEFAULT"
1585         #
1586         # ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST *********
1587         # ********* THEN ERASE THE DB FILES                     *********
1588         #
1589         ippool main_pool {
1590
1591                 #  range-start,range-stop: The start and end ip
1592                 #  addresses for the ip pool
1593                 range-start = 192.168.1.1
1594                 range-stop = 192.168.3.254
1595
1596                 #  netmask: The network mask used for the ip's
1597                 netmask = 255.255.255.0
1598
1599                 #  cache-size: The gdbm cache size for the db
1600                 #  files. Should be equal to the number of ip's
1601                 #  available in the ip pool
1602                 cache-size = 800
1603
1604                 # session-db: The main db file used to allocate ip's to clients
1605                 session-db = ${raddbdir}/db.ippool
1606
1607                 # ip-index: Helper db index file used in multilink
1608                 ip-index = ${raddbdir}/db.ipindex
1609
1610                 # override: Will this ippool override a Framed-IP-Address already set
1611                 override = no
1612
1613                 # maximum-timeout: If not zero specifies the maximum time in seconds an
1614                 # entry may be active. Default: 0
1615                 maximum-timeout = 0
1616         }
1617
1618         # ANSI X9.9 token support.  Not included by default.
1619         # $INCLUDE  ${confdir}/x99.conf
1620
1621         #
1622         #  Implements Login-Time, Current-Time, and Time-Of-Day
1623         #
1624         logintime {
1625                 #
1626                 #  Don't worry about anything here for now..
1627                 #
1628         }
1629 }
1630
1631 # Instantiation
1632 #
1633 #  This section orders the loading of the modules.  Modules
1634 #  listed here will get loaded BEFORE the later sections like
1635 #  authorize, authenticate, etc. get examined.
1636 #
1637 #  This section is not strictly needed.  When a section like
1638 #  authorize refers to a module, it's automatically loaded and
1639 #  initialized.  However, some modules may not be listed in any
1640 #  of the following sections, so they can be listed here.
1641 #
1642 #  Also, listing modules here ensures that you have control over
1643 #  the order in which they are initalized.  If one module needs
1644 #  something defined by another module, you can list them in order
1645 #  here, and ensure that the configuration will be OK.
1646 #
1647 instantiate {
1648         #
1649         #  Allows the execution of external scripts.
1650         #  The entire command line (and output) must fit into 253 bytes.
1651         #
1652         #  e.g. Framed-Pool = `%{exec:/bin/echo foo}`
1653         exec
1654
1655         #
1656         #  The expression module doesn't do authorization,
1657         #  authentication, or accounting.  It only does dynamic
1658         #  translation, of the form:
1659         #
1660         #       Session-Timeout = `%{expr:2 + 3}`
1661         #
1662         #  So the module needs to be instantiated, but CANNOT be
1663         #  listed in any other section.  See 'doc/rlm_expr' for
1664         #  more information.
1665         #
1666         expr
1667
1668         #
1669         # We add the counter module here so that it registers
1670         # the check-name attribute before any module which sets
1671         # it
1672 #       daily
1673         expiration
1674         logintime
1675 }
1676
1677 #  Authorization. First preprocess (hints and huntgroups files),
1678 #  then realms, and finally look in the "users" file.
1679 #
1680 #  The order of the realm modules will determine the order that
1681 #  we try to find a matching realm.
1682 #
1683 #  Make *sure* that 'preprocess' comes before any realm if you 
1684 #  need to setup hints for the remote radius server
1685 authorize {
1686         #
1687         #  The preprocess module takes care of sanitizing some bizarre
1688         #  attributes in the request, and turning them into attributes
1689         #  which are more standard.
1690         #
1691         #  It takes care of processing the 'raddb/hints' and the
1692         #  'raddb/huntgroups' files.
1693         #
1694         #  It also adds the %{Client-IP-Address} attribute to the request.
1695         preprocess
1696
1697         #
1698         #  If you want to have a log of authentication requests,
1699         #  un-comment the following line, and the 'detail auth_log'
1700         #  section, above.
1701 #       auth_log
1702         
1703 #       attr_filter
1704
1705         #
1706         #  The chap module will set 'Auth-Type := CHAP' if we are
1707         #  handling a CHAP request and Auth-Type has not already been set
1708         chap
1709
1710         #
1711         #  If the users are logging in with an MS-CHAP-Challenge
1712         #  attribute for authentication, the mschap module will find
1713         #  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
1714         #  to the request, which will cause the server to then use
1715         #  the mschap module for authentication.
1716         mschap
1717
1718         #
1719         #  If you have a Cisco SIP server authenticating against
1720         #  FreeRADIUS, uncomment the following line, and the 'digest'
1721         #  line in the 'authenticate' section.
1722 #       digest
1723
1724         #
1725         #  Look for IPASS style 'realm/', and if not found, look for
1726         #  '@realm', and decide whether or not to proxy, based on
1727         #  that.
1728 #       IPASS
1729
1730         #
1731         #  If you are using multiple kinds of realms, you probably
1732         #  want to set "ignore_null = yes" for all of them.
1733         #  Otherwise, when the first style of realm doesn't match,
1734         #  the other styles won't be checked.
1735         #
1736         suffix
1737 #       ntdomain
1738
1739         #
1740         #  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
1741         #  authentication.
1742         #
1743         #  It also sets the EAP-Type attribute in the request
1744         #  attribute list to the EAP type from the packet.
1745         eap
1746
1747         #
1748         #  Read the 'users' file
1749         files
1750
1751         #
1752         #  Look in an SQL database.  The schema of the database
1753         #  is meant to mirror the "users" file.
1754         #
1755         #  See "Authorization Queries" in sql.conf
1756 #       sql
1757
1758         #
1759         #  If you are using /etc/smbpasswd, and are also doing
1760         #  mschap authentication, the un-comment this line, and
1761         #  configure the 'etc_smbpasswd' module, above.
1762 #       etc_smbpasswd
1763
1764         #
1765         #  The ldap module will set Auth-Type to LDAP if it has not
1766         #  already been set
1767 #       ldap
1768
1769         #
1770         #  Enforce daily limits on time spent logged in.
1771 #       daily
1772
1773         #
1774         # Use the checkval module
1775 #       checkval
1776
1777         expiration
1778         logintime
1779 }
1780
1781
1782 #  Authentication.
1783 #
1784 #
1785 #  This section lists which modules are available for authentication.
1786 #  Note that it does NOT mean 'try each module in order'.  It means
1787 #  that a module from the 'authorize' section adds a configuration
1788 #  attribute 'Auth-Type := FOO'.  That authentication type is then
1789 #  used to pick the apropriate module from the list below.
1790 #
1791
1792 #  In general, you SHOULD NOT set the Auth-Type attribute.  The server
1793 #  will figure it out on its own, and will do the right thing.  The
1794 #  most common side effect of erroneously setting the Auth-Type
1795 #  attribute is that one authentication method will work, but the
1796 #  others will not.
1797 #
1798 #  The common reasons to set the Auth-Type attribute by hand
1799 #  is to either forcibly reject the user, or forcibly accept him.
1800 #
1801 authenticate {
1802         #
1803         #  PAP authentication, when a back-end database listed
1804         #  in the 'authorize' section supplies a password.  The
1805         #  password can be clear-text, or encrypted.
1806         Auth-Type PAP {
1807                 pap
1808         }
1809
1810         #
1811         #  Most people want CHAP authentication
1812         #  A back-end database listed in the 'authorize' section
1813         #  MUST supply a CLEAR TEXT password.  Encrypted passwords
1814         #  won't work.
1815         Auth-Type CHAP {
1816                 chap
1817         }
1818
1819         #
1820         #  MSCHAP authentication.
1821         Auth-Type MS-CHAP {
1822                 mschap
1823         }
1824
1825         #
1826         #  If you have a Cisco SIP server authenticating against
1827         #  FreeRADIUS, uncomment the following line, and the 'digest'
1828         #  line in the 'authorize' section.
1829 #       digest
1830
1831         #
1832         #  Pluggable Authentication Modules.
1833 #       pam
1834
1835         #
1836         #  See 'man getpwent' for information on how the 'unix'
1837         #  module checks the users password.  Note that packets
1838         #  containing CHAP-Password attributes CANNOT be authenticated
1839         #  against /etc/passwd!  See the FAQ for details.
1840         #  
1841         unix
1842
1843         # Uncomment it if you want to use ldap for authentication
1844         #
1845         # Note that this means "check plain-text password against
1846         # the ldap database", which means that EAP won't work,
1847         # as it does not supply a plain-text password.
1848 #       Auth-Type LDAP {
1849 #               ldap
1850 #       }
1851
1852         #
1853         #  Allow EAP authentication.
1854         eap
1855 }
1856
1857
1858 #
1859 #  Pre-accounting.  Decide which accounting type to use.
1860 #
1861 preacct {
1862         preprocess
1863
1864         #
1865         #  Ensure that we have a semi-unique identifier for every
1866         #  request, and many NAS boxes are broken.
1867         acct_unique
1868
1869         #
1870         #  Look for IPASS-style 'realm/', and if not found, look for
1871         #  '@realm', and decide whether or not to proxy, based on
1872         #  that.
1873         #
1874         #  Accounting requests are generally proxied to the same
1875         #  home server as authentication requests.
1876 #       IPASS
1877         suffix
1878 #       ntdomain
1879
1880         #
1881         #  Read the 'acct_users' file
1882         files
1883 }
1884
1885 #
1886 #  Accounting.  Log the accounting data.
1887 #
1888 accounting {
1889         #
1890         #  Create a 'detail'ed log of the packets.
1891         #  Note that accounting requests which are proxied
1892         #  are also logged in the detail file.
1893         detail
1894 #       daily
1895
1896         #  Update the wtmp file
1897         #
1898         #  If you don't use "radlast", you can delete this line.
1899         unix
1900
1901         #
1902         #  For Simultaneous-Use tracking.
1903         #
1904         #  Due to packet losses in the network, the data here
1905         #  may be incorrect.  There is little we can do about it.
1906         radutmp
1907 #       sradutmp
1908
1909         #  Return an address to the IP Pool when we see a stop record.
1910 #       main_pool
1911
1912         #
1913         #  Log traffic to an SQL database.
1914         #
1915         #  See "Accounting queries" in sql.conf
1916 #       sql
1917
1918
1919         #  Cisco VoIP specific bulk accounting
1920 #       pgsql-voip
1921
1922 }
1923
1924
1925 #  Session database, used for checking Simultaneous-Use. Either the radutmp 
1926 #  or rlm_sql module can handle this.
1927 #  The rlm_sql module is *much* faster
1928 session {
1929         radutmp
1930
1931         #
1932         #  See "Simultaneous Use Checking Querie" in sql.conf
1933 #       sql
1934 }
1935
1936
1937 #  Post-Authentication
1938 #  Once we KNOW that the user has been authenticated, there are
1939 #  additional steps we can take.
1940 post-auth {
1941         #  Get an address from the IP Pool.
1942 #       main_pool
1943
1944         #
1945         #  If you want to have a log of authentication replies,
1946         #  un-comment the following line, and the 'detail reply_log'
1947         #  section, above.
1948 #       reply_log
1949
1950         #
1951         #  After authenticating the user, do another SQL qeury.
1952         #
1953         #  See "Authentication Logging Queries" in sql.conf
1954 #       sql
1955
1956         #
1957         #  Un-comment the following if you have set
1958         #  'edir_account_policy_check = yes' in the ldap module sub-section of
1959         #  the 'modules' section.
1960         #
1961 #       ldap
1962         #
1963         #  Access-Reject packets are sent through the REJECT sub-section of the
1964         #  post-auth section.
1965         #  Uncomment the following and set the module name to the ldap instance
1966         #  name if you have set 'edir_account_policy_check = yes' in the ldap
1967         #  module sub-section of the 'modules' section.
1968         #
1969 #       Post-Auth-Type REJECT {
1970 #               insert-module-name-here
1971 #       }
1972
1973 }
1974
1975 #
1976 #  When the server decides to proxy a request to a home server,
1977 #  the proxied request is first passed through the pre-proxy
1978 #  stage.  This stage can re-write the request, or decide to
1979 #  cancel the proxy.
1980 #
1981 #  Only a few modules currently have this method.
1982 #
1983 pre-proxy {
1984 #       attr_rewrite
1985
1986         #  If you want to have a log of packets proxied to a home
1987         #  server, un-comment the following line, and the
1988         #  'detail pre_proxy_log' section, above.
1989 #       pre_proxy_log
1990 }
1991
1992 #
1993 #  When the server receives a reply to a request it proxied
1994 #  to a home server, the request may be massaged here, in the
1995 #  post-proxy stage.
1996 #
1997 post-proxy {
1998         #
1999
2000         #  If you want to have a log of replies from a home server,
2001         #  un-comment the following line, and the 'detail post_proxy_log'
2002         #  section, above.
2003 #       post_proxy_log
2004
2005 #       attr_rewrite
2006
2007         #  Uncomment the following line if you want to filter replies from
2008         #  remote proxies based on the rules defined in the 'attrs' file.
2009
2010 #       attr_filter
2011
2012         #
2013         #  If you are proxying LEAP, you MUST configure the EAP
2014         #  module, and you MUST list it here, in the post-proxy
2015         #  stage.
2016         #
2017         #  You MUST also use the 'nostrip' option in the 'realm'
2018         #  configuration.  Otherwise, the User-Name attribute
2019         #  in the proxied request will not match the user name
2020         #  hidden inside of the EAP packet, and the end server will
2021         #  reject the EAP request.
2022         #
2023         eap
2024 }