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