Remove redundant file from freeradius-abfab list.
[freeradius.git] / raddb / sites-available / default
1 ######################################################################
2 #
3 #       As of 2.0.0, FreeRADIUS supports virtual hosts using the
4 #       "server" section, and configuration directives.
5 #
6 #       Virtual hosts should be put into the "sites-available"
7 #       directory.  Soft links should be created in the "sites-enabled"
8 #       directory to these files.  This is done in a normal installation.
9 #
10 #       If you are using 802.1X (EAP) authentication, please see also
11 #       the "inner-tunnel" virtual server.  You will likely have to edit
12 #       that, too, for authentication to work.
13 #
14 #       $Id$
15 #
16 ######################################################################
17 #
18 #       Read "man radiusd" before editing this file.  See the section
19 #       titled DEBUGGING.  It outlines a method where you can quickly
20 #       obtain the configuration you want, without running into
21 #       trouble.  See also "man unlang", which documents the format
22 #       of this file.
23 #
24 #       This configuration is designed to work in the widest possible
25 #       set of circumstances, with the widest possible number of
26 #       authentication methods.  This means that in general, you should
27 #       need to make very few changes to this file.
28 #
29 #       The best way to configure the server for your local system
30 #       is to CAREFULLY edit this file.  Most attempts to make large
31 #       edits to this file will BREAK THE SERVER.  Any edits should
32 #       be small, and tested by running the server with "radiusd -X".
33 #       Once the edits have been verified to work, save a copy of these
34 #       configuration files somewhere.  (e.g. as a "tar" file).  Then,
35 #       make more edits, and test, as above.
36 #
37 #       There are many "commented out" references to modules such
38 #       as ldap, sql, etc.  These references serve as place-holders.
39 #       If you need the functionality of that module, then configure
40 #       it in radiusd.conf, and un-comment the references to it in
41 #       this file.  In most cases, those small changes will result
42 #       in the server being able to connect to the DB, and to
43 #       authenticate users.
44 #
45 ######################################################################
46
47 server default {
48 #
49 #  If you want the server to listen on additional addresses, or on
50 #  additional ports, you can use multiple "listen" sections.
51 #
52 #  Each section make the server listen for only one type of packet,
53 #  therefore authentication and accounting have to be configured in
54 #  different sections.
55 #
56 #  The server ignore all "listen" section if you are using '-i' and '-p'
57 #  on the command line.
58 #
59 listen {
60         #  Type of packets to listen for.
61         #  Allowed values are:
62         #       auth    listen for authentication packets
63         #       acct    listen for accounting packets
64         #       proxy   IP to use for sending proxied packets
65         #       detail  Read from the detail file.  For examples, see
66         #               raddb/sites-available/copy-acct-to-home-server
67         #       status  listen for Status-Server packets.  For examples,
68         #               see raddb/sites-available/status
69         #       coa     listen for CoA-Request and Disconnect-Request
70         #               packets.  For examples, see the file
71         #               raddb/sites-available/coa
72         #
73         type = auth
74
75         #  Note: "type = proxy" lets you control the source IP used for
76         #        proxying packets, with some limitations:
77         #
78         #    * A proxy listener CANNOT be used in a virtual server section.
79         #    * You should probably set "port = 0".
80         #    * Any "clients" configuration will be ignored.
81         #
82         #  See also proxy.conf, and the "src_ipaddr" configuration entry
83         #  in the sample "home_server" section.  When you specify the
84         #  source IP address for packets sent to a home server, the
85         #  proxy listeners are automatically created.
86
87         #  ipaddr/ipv4addr/ipv6addr - IP address on which to listen.
88         #  Out of several options the first one will be used.
89         #
90         #  Allowed values are:
91         #       IPv4 address (e.g. 1.2.3.4, for ipv4addr/ipaddr)
92         #       IPv6 address (e.g. 2001:db8::1, for ipv6addr/ipaddr)
93         #       hostname     (radius.example.com,
94         #                       A record for ipv4addr,
95         #                       AAAA record for ipv6addr,
96         #                       A or AAAA record for ipaddr)
97         #       wildcard     (*)
98         #
99         # ipv4addr = *
100         # ipv6addr = *
101         ipaddr = *
102
103         #  Port on which to listen.
104         #  Allowed values are:
105         #       integer port number (1812)
106         #       0 means "use /etc/services for the proper port"
107         port = 0
108
109         #  Some systems support binding to an interface, in addition
110         #  to the IP address.  This feature isn't strictly necessary,
111         #  but for sites with many IP addresses on one interface,
112         #  it's useful to say "listen on all addresses for eth0".
113         #
114         #  If your system does not support this feature, you will
115         #  get an error if you try to use it.
116         #
117 #       interface = eth0
118
119         #  Per-socket lists of clients.  This is a very useful feature.
120         #
121         #  The name here is a reference to a section elsewhere in
122         #  radiusd.conf, or clients.conf.  Having the name as
123         #  a reference allows multiple sockets to use the same
124         #  set of clients.
125         #
126         #  If this configuration is used, then the global list of clients
127         #  is IGNORED for this "listen" section.  Take care configuring
128         #  this feature, to ensure you don't accidentally disable a
129         #  client you need.
130         #
131         #  See clients.conf for the configuration of "per_socket_clients".
132         #
133 #       clients = per_socket_clients
134
135         #
136         #  Connection limiting for sockets with "proto = tcp".
137         #
138         #  This section is ignored for other kinds of sockets.
139         #
140         limit {
141               #
142               #  Limit the number of simultaneous TCP connections to the socket
143               #
144               #  The default is 16.
145               #  Setting this to 0 means "no limit"
146               max_connections = 16
147
148               #  The per-socket "max_requests" option does not exist.
149
150               #
151               #  The lifetime, in seconds, of a TCP connection.  After
152               #  this lifetime, the connection will be closed.
153               #
154               #  Setting this to 0 means "forever".
155               lifetime = 0
156
157               #
158               #  The idle timeout, in seconds, of a TCP connection.
159               #  If no packets have been received over the connection for
160               #  this time, the connection will be closed.
161               #
162               #  Setting this to 0 means "no timeout".
163               #
164               #  We STRONGLY RECOMMEND that you set an idle timeout.
165               #
166               idle_timeout = 30
167         }
168 }
169
170 #
171 #  This second "listen" section is for listening on the accounting
172 #  port, too.
173 #
174 listen {
175         ipaddr = *
176 #       ipv6addr = ::
177         port = 0
178         type = acct
179 #       interface = eth0
180 #       clients = per_socket_clients
181
182         limit {
183                 #  The number of packets received can be rate limited via the
184                 #  "max_pps" configuration item.  When it is set, the server
185                 #  tracks the total number of packets received in the previous
186                 #  second.  If the count is greater than "max_pps", then the
187                 #  new packet is silently discarded.  This helps the server
188                 #  deal with overload situations.
189                 #
190                 #  The packets/s counter is tracked in a sliding window.  This
191                 #  means that the pps calculation is done for the second
192                 #  before the current packet was received.  NOT for the current
193                 #  wall-clock second, and NOT for the previous wall-clock second.
194                 #
195                 #  Useful values are 0 (no limit), or 100 to 10000.
196                 #  Values lower than 100 will likely cause the server to ignore
197                 #  normal traffic.  Few systems are capable of handling more than
198                 #  10K packets/s.
199                 #
200                 #  It is most useful for accounting systems.  Set it to 50%
201                 #  more than the normal accounting load, and you can be sure that
202                 #  the server will never get overloaded
203                 #
204 #               max_pps = 0
205
206                 # Only for "proto = tcp". These are ignored for "udp" sockets.
207                 #
208 #               idle_timeout = 0
209 #               lifetime = 0
210 #               max_connections = 0
211         }
212 }
213
214 # IPv6 versions of the above - read their full config to understand options
215 listen {
216         type = auth
217         ipv6addr = ::   # any.  ::1 == localhost
218         port = 0
219 #       interface = eth0
220 #       clients = per_socket_clients
221         limit {
222               max_connections = 16
223               lifetime = 0
224               idle_timeout = 30
225         }
226 }
227
228 listen {
229         ipv6addr = ::
230         port = 0
231         type = acct
232 #       interface = eth0
233 #       clients = per_socket_clients
234
235         limit {
236 #               max_pps = 0
237 #               idle_timeout = 0
238 #               lifetime = 0
239 #               max_connections = 0
240         }
241 }
242
243 #  Authorization. First preprocess (hints and huntgroups files),
244 #  then realms, and finally look in the "users" file.
245 #
246 #  Any changes made here should also be made to the "inner-tunnel"
247 #  virtual server.
248 #
249 #  The order of the realm modules will determine the order that
250 #  we try to find a matching realm.
251 #
252 #  Make *sure* that 'preprocess' comes before any realm if you
253 #  need to setup hints for the remote radius server
254 authorize {
255         #
256         #  Take a User-Name, and perform some checks on it, for spaces and other
257         #  invalid characters.  If the User-Name appears invalid, reject the
258         #  request.
259         #
260         #  See policy.d/filter for the definition of the filter_username policy.
261         #
262         filter_username
263
264         #
265         #  The preprocess module takes care of sanitizing some bizarre
266         #  attributes in the request, and turning them into attributes
267         #  which are more standard.
268         #
269         #  It takes care of processing the 'raddb/hints' and the
270         #  'raddb/huntgroups' files.
271         preprocess
272
273         #  If you intend to use CUI and you require that the Operator-Name
274         #  be set for CUI generation and you want to generate CUI also
275         #  for your local clients then uncomment the operator-name
276         #  below and set the operator-name for your clients in clients.conf
277 #       operator-name
278
279         #
280         #  If you want to generate CUI for some clients that do not
281         #  send proper CUI requests, then uncomment the
282         #  cui below and set "add_cui = yes" for these clients in clients.conf
283 #       cui
284
285         #
286         #  If you want to have a log of authentication requests,
287         #  un-comment the following line.
288 #       auth_log
289
290         #
291         #  The chap module will set 'Auth-Type := CHAP' if we are
292         #  handling a CHAP request and Auth-Type has not already been set
293         chap
294
295         #
296         #  If the users are logging in with an MS-CHAP-Challenge
297         #  attribute for authentication, the mschap module will find
298         #  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
299         #  to the request, which will cause the server to then use
300         #  the mschap module for authentication.
301         mschap
302
303         #
304         #  If you have a Cisco SIP server authenticating against
305         #  FreeRADIUS, uncomment the following line, and the 'digest'
306         #  line in the 'authenticate' section.
307         digest
308
309         #
310         #  The WiMAX specification says that the Calling-Station-Id
311         #  is 6 octets of the MAC.  This definition conflicts with
312         #  RFC 3580, and all common RADIUS practices.  Un-commenting
313         #  the "wimax" module here means that it will fix the
314         #  Calling-Station-Id attribute to the normal format as
315         #  specified in RFC 3580 Section 3.21
316 #       wimax
317
318         #
319         #  Look for IPASS style 'realm/', and if not found, look for
320         #  '@realm', and decide whether or not to proxy, based on
321         #  that.
322 #       IPASS
323
324         #
325         #  If you are using multiple kinds of realms, you probably
326         #  want to set "ignore_null = yes" for all of them.
327         #  Otherwise, when the first style of realm doesn't match,
328         #  the other styles won't be checked.
329         #
330         suffix
331 #       ntdomain
332
333         #
334         #  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
335         #  authentication.
336         #
337         #  It also sets the EAP-Type attribute in the request
338         #  attribute list to the EAP type from the packet.
339         #
340         #  The EAP module returns "ok" if it is not yet ready to
341         #  authenticate the user.  The configuration below checks for
342         #  that code, and stops processing the "authorize" section if
343         #  so.
344         #
345         #  Any LDAP and/or SQL servers will not be queried for the
346         #  initial set of packets that go back and forth to set up
347         #  TTLS or PEAP.
348         #
349         eap {
350                 ok = return
351         }
352
353         #
354         #  Pull crypt'd passwords from /etc/passwd or /etc/shadow,
355         #  using the system API's to get the password.  If you want
356         #  to read /etc/passwd or /etc/shadow directly, see the
357         #  mods-available/passwd module.
358         #
359 #       unix
360
361         #
362         #  Read the 'users' file.  In v3, this is located in
363         #  raddb/mods-config/files/authorize
364         files
365
366         #
367         #  Look in an SQL database.  The schema of the database
368         #  is meant to mirror the "users" file.
369         #
370         #  See "Authorization Queries" in mods-available/sql
371         -sql
372
373         #
374         #  If you are using /etc/smbpasswd, and are also doing
375         #  mschap authentication, the un-comment this line, and
376         #  configure the 'smbpasswd' module.
377 #       smbpasswd
378
379         #
380         #  The ldap module reads passwords from the LDAP database.
381         -ldap
382
383         #
384         #  Enforce daily limits on time spent logged in.
385 #       daily
386
387         #
388         expiration
389         logintime
390
391         #
392         #  If no other module has claimed responsibility for
393         #  authentication, then try to use PAP.  This allows the
394         #  other modules listed above to add a "known good" password
395         #  to the request, and to do nothing else.  The PAP module
396         #  will then see that password, and use it to do PAP
397         #  authentication.
398         #
399         #  This module should be listed last, so that the other modules
400         #  get a chance to set Auth-Type for themselves.
401         #
402         pap
403
404         #
405         #  If "status_server = yes", then Status-Server messages are passed
406         #  through the following section, and ONLY the following section.
407         #  This permits you to do DB queries, for example.  If the modules
408         #  listed here return "fail", then NO response is sent.
409         #
410 #       Autz-Type Status-Server {
411 #
412 #       }
413 }
414
415
416 #  Authentication.
417 #
418 #
419 #  This section lists which modules are available for authentication.
420 #  Note that it does NOT mean 'try each module in order'.  It means
421 #  that a module from the 'authorize' section adds a configuration
422 #  attribute 'Auth-Type := FOO'.  That authentication type is then
423 #  used to pick the appropriate module from the list below.
424 #
425
426 #  In general, you SHOULD NOT set the Auth-Type attribute.  The server
427 #  will figure it out on its own, and will do the right thing.  The
428 #  most common side effect of erroneously setting the Auth-Type
429 #  attribute is that one authentication method will work, but the
430 #  others will not.
431 #
432 #  The common reasons to set the Auth-Type attribute by hand
433 #  is to either forcibly reject the user (Auth-Type := Reject),
434 #  or to or forcibly accept the user (Auth-Type := Accept).
435 #
436 #  Note that Auth-Type := Accept will NOT work with EAP.
437 #
438 #  Please do not put "unlang" configurations into the "authenticate"
439 #  section.  Put them in the "post-auth" section instead.  That's what
440 #  the post-auth section is for.
441 #
442 authenticate {
443         #
444         #  PAP authentication, when a back-end database listed
445         #  in the 'authorize' section supplies a password.  The
446         #  password can be clear-text, or encrypted.
447         Auth-Type PAP {
448                 pap
449         }
450
451         #
452         #  Most people want CHAP authentication
453         #  A back-end database listed in the 'authorize' section
454         #  MUST supply a CLEAR TEXT password.  Encrypted passwords
455         #  won't work.
456         Auth-Type CHAP {
457                 chap
458         }
459
460         #
461         #  MSCHAP authentication.
462         Auth-Type MS-CHAP {
463                 mschap
464         }
465
466         #
467         #  If you have a Cisco SIP server authenticating against
468         #  FreeRADIUS, uncomment the following line, and the 'digest'
469         #  line in the 'authorize' section.
470         digest
471
472         #
473         #  Pluggable Authentication Modules.
474 #       pam
475
476         #  Uncomment it if you want to use ldap for authentication
477         #
478         #  Note that this means "check plain-text password against
479         #  the ldap database", which means that EAP won't work,
480         #  as it does not supply a plain-text password.
481         #
482         #  We do NOT recommend using this.  LDAP servers are databases.
483         #  They are NOT authentication servers.  FreeRADIUS is an
484         #  authentication server, and knows what to do with authentication.
485         #  LDAP servers do not.
486         #
487 #       Auth-Type LDAP {
488 #               ldap
489 #       }
490
491         #
492         #  Allow EAP authentication.
493         eap
494
495         #
496         #  The older configurations sent a number of attributes in
497         #  Access-Challenge packets, which wasn't strictly correct.
498         #  If you want to filter out these attributes, uncomment
499         #  the following lines.
500         #
501 #       Auth-Type eap {
502 #               eap {
503 #                       handled = 1
504 #               }
505 #               if (handled && (Response-Packet-Type == Access-Challenge)) {
506 #                       attr_filter.access_challenge.post-auth
507 #                       handled  # override the "updated" code from attr_filter
508 #               }
509 #       }
510 }
511
512
513 #
514 #  Pre-accounting.  Decide which accounting type to use.
515 #
516 preacct {
517         preprocess
518
519         #
520         #  Merge Acct-[Input|Output]-Gigawords and Acct-[Input-Output]-Octets
521         #  into a single 64bit counter Acct-[Input|Output]-Octets64.
522         #
523 #       acct_counters64
524
525         #
526         #  Session start times are *implied* in RADIUS.
527         #  The NAS never sends a "start time".  Instead, it sends
528         #  a start packet, *possibly* with an Acct-Delay-Time.
529         #  The server is supposed to conclude that the start time
530         #  was "Acct-Delay-Time" seconds in the past.
531         #
532         #  The code below creates an explicit start time, which can
533         #  then be used in other modules.  It will be *mostly* correct.
534         #  Any errors are due to the 1-second resolution of RADIUS,
535         #  and the possibility that the time on the NAS may be off.
536         #
537         #  The start time is: NOW - delay - session_length
538         #
539
540 #       update request {
541 #               FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
542 #       }
543
544
545         #
546         #  Ensure that we have a semi-unique identifier for every
547         #  request, and many NAS boxes are broken.
548         acct_unique
549
550         #
551         #  Look for IPASS-style 'realm/', and if not found, look for
552         #  '@realm', and decide whether or not to proxy, based on
553         #  that.
554         #
555         #  Accounting requests are generally proxied to the same
556         #  home server as authentication requests.
557 #       IPASS
558         suffix
559 #       ntdomain
560
561         #
562         #  Read the 'acct_users' file
563         files
564 }
565
566 #
567 #  Accounting.  Log the accounting data.
568 #
569 accounting {
570         #  Update accounting packet by adding the CUI attribute
571         #  recorded from the corresponding Access-Accept
572         #  use it only if your NAS boxes do not support CUI themselves
573 #       cui
574         #
575         #  Create a 'detail'ed log of the packets.
576         #  Note that accounting requests which are proxied
577         #  are also logged in the detail file.
578         detail
579 #       daily
580
581         #  Update the wtmp file
582         #
583         #  If you don't use "radlast", you can delete this line.
584         unix
585
586         #
587         #  For Simultaneous-Use tracking.
588         #
589         #  Due to packet losses in the network, the data here
590         #  may be incorrect.  There is little we can do about it.
591 #       radutmp
592 #       sradutmp
593
594         #  Return an address to the IP Pool when we see a stop record.
595 #       main_pool
596
597         #
598         #  Log traffic to an SQL database.
599         #
600         #  See "Accounting queries" in mods-available/sql
601         -sql
602
603         #
604         #  If you receive stop packets with zero session length,
605         #  they will NOT be logged in the database.  The SQL module
606         #  will print a message (only in debugging mode), and will
607         #  return "noop".
608         #
609         #  You can ignore these packets by uncommenting the following
610         #  three lines.  Otherwise, the server will not respond to the
611         #  accounting request, and the NAS will retransmit.
612         #
613 #       if (noop) {
614 #               ok
615 #       }
616
617         #
618         #  Instead of sending the query to the SQL server,
619         #  write it into a log file.
620         #
621 #       sql_log
622
623         #  Cisco VoIP specific bulk accounting
624 #       pgsql-voip
625
626         # For Exec-Program and Exec-Program-Wait
627         exec
628
629         #  Filter attributes from the accounting response.
630         attr_filter.accounting_response
631
632         #
633         #  See "Autz-Type Status-Server" for how this works.
634         #
635 #       Acct-Type Status-Server {
636 #
637 #       }
638 }
639
640
641 #  Session database, used for checking Simultaneous-Use. Either the radutmp
642 #  or rlm_sql module can handle this.
643 #  The rlm_sql module is *much* faster
644 session {
645 #       radutmp
646
647         #
648         #  See "Simultaneous Use Checking Queries" in mods-available/sql
649 #       sql
650 }
651
652
653 #  Post-Authentication
654 #  Once we KNOW that the user has been authenticated, there are
655 #  additional steps we can take.
656 post-auth {
657         #
658         #  If you need to have a State attribute, you can
659         #  add it here.  e.g. for later CoA-Request with
660         #  State, and Service-Type = Authorize-Only.
661         #
662 #       if (!&reply:State) {
663 #               update reply {
664 #                       State := "0x%{randstr:16h}"
665 #               }
666 #       }
667
668         #
669         #  For EAP-TTLS and PEAP, add the cached attributes to the reply.
670         #  The "session-state" attributes are automatically cached when
671         #  an Access-Challenge is sent, and automatically retrieved
672         #  when an Access-Request is received.
673         #
674         #  The session-state attributes are automatically deleted after
675         #  an Access-Reject or Access-Accept is sent.
676         #
677         update {
678                 &reply: += &session-state:
679         }
680
681         #  Get an address from the IP Pool.
682 #       main_pool
683
684
685         #  Create the CUI value and add the attribute to Access-Accept.
686         #  Uncomment the line below if *returning* the CUI.
687 #       cui
688
689         #
690         #  If you want to have a log of authentication replies,
691         #  un-comment the following line, and enable the
692         #  'detail reply_log' module.
693 #       reply_log
694
695         #
696         #  After authenticating the user, do another SQL query.
697         #
698         #  See "Authentication Logging Queries" in mods-available/sql
699         -sql
700
701         #
702         #  Instead of sending the query to the SQL server,
703         #  write it into a log file.
704         #
705 #       sql_log
706
707         #
708         #  Un-comment the following if you want to modify the user's object
709         #  in LDAP after a successful login.
710         #
711 #       ldap
712
713         # For Exec-Program and Exec-Program-Wait
714         exec
715
716         #
717         #  Calculate the various WiMAX keys.  In order for this to work,
718         #  you will need to define the WiMAX NAI, usually via
719         #
720         #       update request {
721         #              WiMAX-MN-NAI = "%{User-Name}"
722         #       }
723         #
724         #  If you want various keys to be calculated, you will need to
725         #  update the reply with "template" values.  The module will see
726         #  this, and replace the template values with the correct ones
727         #  taken from the cryptographic calculations.  e.g.
728         #
729         #       update reply {
730         #               WiMAX-FA-RK-Key = 0x00
731         #               WiMAX-MSK = "%{EAP-MSK}"
732         #       }
733         #
734         #  You may want to delete the MS-MPPE-*-Keys from the reply,
735         #  as some WiMAX clients behave badly when those attributes
736         #  are included.  See "raddb/modules/wimax", configuration
737         #  entry "delete_mppe_keys" for more information.
738         #
739 #       wimax
740
741
742         #  If there is a client certificate (EAP-TLS, sometimes PEAP
743         #  and TTLS), then some attributes are filled out after the
744         #  certificate verification has been performed.  These fields
745         #  MAY be available during the authentication, or they may be
746         #  available only in the "post-auth" section.
747         #
748         #  The first set of attributes contains information about the
749         #  issuing certificate which is being used.  The second
750         #  contains information about the client certificate (if
751         #  available).
752 #
753 #       update reply {
754 #              Reply-Message += "%{TLS-Cert-Serial}"
755 #              Reply-Message += "%{TLS-Cert-Expiration}"
756 #              Reply-Message += "%{TLS-Cert-Subject}"
757 #              Reply-Message += "%{TLS-Cert-Issuer}"
758 #              Reply-Message += "%{TLS-Cert-Common-Name}"
759 #              Reply-Message += "%{TLS-Cert-Subject-Alt-Name-Email}"
760 #
761 #              Reply-Message += "%{TLS-Client-Cert-Serial}"
762 #              Reply-Message += "%{TLS-Client-Cert-Expiration}"
763 #              Reply-Message += "%{TLS-Client-Cert-Subject}"
764 #              Reply-Message += "%{TLS-Client-Cert-Issuer}"
765 #              Reply-Message += "%{TLS-Client-Cert-Common-Name}"
766 #              Reply-Message += "%{TLS-Client-Cert-Subject-Alt-Name-Email}"
767 #       }
768
769         #  Insert class attribute (with unique value) into response,
770         #  aids matching auth and acct records, and protects against duplicate
771         #  Acct-Session-Id. Note: Only works if the NAS has implemented
772         #  RFC 2865 behaviour for the class attribute, AND if the NAS
773         #  supports long Class attributes.  Many older or cheap NASes
774         #  only support 16-octet Class attributes.
775 #       insert_acct_class
776
777         #  MacSEC requires the use of EAP-Key-Name.  However, we don't
778         #  want to send it for all EAP sessions.  Therefore, the EAP
779         #  modules put required data into the EAP-Session-Id attribute.
780         #  This attribute is never put into a request or reply packet.
781         #
782         #  Uncomment the next few lines to copy the required data into
783         #  the EAP-Key-Name attribute
784 #       if (&reply:EAP-Session-Id) {
785 #               update reply {
786 #                       EAP-Key-Name := &reply:EAP-Session-Id
787 #               }
788 #       }
789
790         #  Remove reply message if the response contains an EAP-Message
791         remove_reply_message_if_eap
792
793         #
794         #  Access-Reject packets are sent through the REJECT sub-section of the
795         #  post-auth section.
796         #
797         #  Add the ldap module name (or instance) if you have set
798         #  'edir_account_policy_check = yes' in the ldap module configuration
799         #
800         #  The "session-state" attributes are not available here.
801         #
802         Post-Auth-Type REJECT {
803                 # log failed authentications in SQL, too.
804                 -sql
805                 attr_filter.access_reject
806
807                 # Insert EAP-Failure message if the request was
808                 # rejected by policy instead of because of an
809                 # authentication failure
810                 eap
811
812                 #  Remove reply message if the response contains an EAP-Message
813                 remove_reply_message_if_eap
814         }
815 }
816
817 #
818 #  When the server decides to proxy a request to a home server,
819 #  the proxied request is first passed through the pre-proxy
820 #  stage.  This stage can re-write the request, or decide to
821 #  cancel the proxy.
822 #
823 #  Only a few modules currently have this method.
824 #
825 pre-proxy {
826         # Before proxing the request add an Operator-Name attribute identifying
827         # if the operator-name is found for this client.
828         # No need to uncomment this if you have already enabled this in
829         # the authorize section.
830 #       operator-name
831
832         #  The client requests the CUI by sending a CUI attribute
833         #  containing one zero byte.
834         #  Uncomment the line below if *requesting* the CUI.
835 #       cui
836
837         #  Uncomment the following line if you want to change attributes
838         #  as defined in the preproxy_users file.
839 #       files
840
841         #  Uncomment the following line if you want to filter requests
842         #  sent to remote servers based on the rules defined in the
843         #  'attrs.pre-proxy' file.
844 #       attr_filter.pre-proxy
845
846         #  If you want to have a log of packets proxied to a home
847         #  server, un-comment the following line, and the
848         #  'detail pre_proxy_log' section, above.
849 #       pre_proxy_log
850 }
851
852 #
853 #  When the server receives a reply to a request it proxied
854 #  to a home server, the request may be massaged here, in the
855 #  post-proxy stage.
856 #
857 post-proxy {
858
859         #  If you want to have a log of replies from a home server,
860         #  un-comment the following line, and the 'detail post_proxy_log'
861         #  section, above.
862 #       post_proxy_log
863
864         #  Uncomment the following line if you want to filter replies from
865         #  remote proxies based on the rules defined in the 'attrs' file.
866 #       attr_filter.post-proxy
867
868         #
869         #  If you are proxying LEAP, you MUST configure the EAP
870         #  module, and you MUST list it here, in the post-proxy
871         #  stage.
872         #
873         #  You MUST also use the 'nostrip' option in the 'realm'
874         #  configuration.  Otherwise, the User-Name attribute
875         #  in the proxied request will not match the user name
876         #  hidden inside of the EAP packet, and the end server will
877         #  reject the EAP request.
878         #
879         eap
880
881         #
882         #  If the server tries to proxy a request and fails, then the
883         #  request is processed through the modules in this section.
884         #
885         #  The main use of this section is to permit robust proxying
886         #  of accounting packets.  The server can be configured to
887         #  proxy accounting packets as part of normal processing.
888         #  Then, if the home server goes down, accounting packets can
889         #  be logged to a local "detail" file, for processing with
890         #  radrelay.  When the home server comes back up, radrelay
891         #  will read the detail file, and send the packets to the
892         #  home server.
893         #
894         #  With this configuration, the server always responds to
895         #  Accounting-Requests from the NAS, but only writes
896         #  accounting packets to disk if the home server is down.
897         #
898 #       Post-Proxy-Type Fail-Accounting {
899 #                       detail
900 #       }
901 }
902 }