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