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