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