We don't need a virtual server for the default config
[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 #       $Id$
11 #
12 #
13 ######################################################################
14
15 #
16 #       In 1.x, the "authorize", etc. sections were global in
17 #       radiusd.conf.  As of 2.0, they SHOULD be in a server section.
18 #
19 #       The server section with no virtual server name is the "default"
20 #       section.  It is used when no server name is specified.
21 #
22 #       We don't indent the rest of this file, because doing so
23 #       would make it harder to read.
24 #
25
26 #  Authorization. First preprocess (hints and huntgroups files),
27 #  then realms, and finally look in the "users" file.
28 #
29 #  The order of the realm modules will determine the order that
30 #  we try to find a matching realm.
31 #
32 #  Make *sure* that 'preprocess' comes before any realm if you 
33 #  need to setup hints for the remote radius server
34 authorize {
35         #
36         #  The preprocess module takes care of sanitizing some bizarre
37         #  attributes in the request, and turning them into attributes
38         #  which are more standard.
39         #
40         #  It takes care of processing the 'raddb/hints' and the
41         #  'raddb/huntgroups' files.
42         #
43         #  It also adds the %{Client-IP-Address} attribute to the request.
44         preprocess
45
46         #
47         #  If you want to have a log of authentication requests,
48         #  un-comment the following line, and the 'detail auth_log'
49         #  section, above.
50 #       auth_log
51
52         #
53         #  The chap module will set 'Auth-Type := CHAP' if we are
54         #  handling a CHAP request and Auth-Type has not already been set
55         chap
56
57         #
58         #  If the users are logging in with an MS-CHAP-Challenge
59         #  attribute for authentication, the mschap module will find
60         #  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
61         #  to the request, which will cause the server to then use
62         #  the mschap module for authentication.
63         mschap
64
65         #
66         #  Pull crypt'd passwords from /etc/passwd or /etc/shadow,
67         #  using the system API's to get the password.  If you want
68         #  to read /etc/passwd or /etc/shadow directly, see the
69         #  passwd module, above.
70         #
71         unix
72
73         #
74         #  If you have a Cisco SIP server authenticating against
75         #  FreeRADIUS, uncomment the following line, and the 'digest'
76         #  line in the 'authenticate' section.
77 #       digest
78
79         #
80         #  Look for IPASS style 'realm/', and if not found, look for
81         #  '@realm', and decide whether or not to proxy, based on
82         #  that.
83 #       IPASS
84
85         #
86         #  If you are using multiple kinds of realms, you probably
87         #  want to set "ignore_null = yes" for all of them.
88         #  Otherwise, when the first style of realm doesn't match,
89         #  the other styles won't be checked.
90         #
91         suffix
92 #       ntdomain
93
94         #
95         #  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
96         #  authentication.
97         #
98         #  It also sets the EAP-Type attribute in the request
99         #  attribute list to the EAP type from the packet.
100         #
101         #  As of 2.0, the EAP module returns "ok" in the authorize stage
102         #  for TTLS and PEAP.  In 1.x, it never returned "ok" here, so
103         #  this change is compatible with older configurations.
104         #
105         #  The example below uses module failover to avoid querying all
106         #  of the following modules if the EAP module returns "ok".
107         #  Therefore, your LDAP and/or SQL servers will not be queried
108         #  for the many packets that go back and forth to set up TTLS
109         #  or PEAP.  The load on those servers will therefore be reduced.
110         #
111         eap {
112                 ok = return
113         }
114
115         #
116         #  Read the 'users' file
117         files
118
119         #
120         #  Look in an SQL database.  The schema of the database
121         #  is meant to mirror the "users" file.
122         #
123         #  See "Authorization Queries" in sql.conf
124 #       sql
125
126         #
127         #  If you are using /etc/smbpasswd, and are also doing
128         #  mschap authentication, the un-comment this line, and
129         #  configure the 'etc_smbpasswd' module, above.
130 #       etc_smbpasswd
131
132         #
133         #  The ldap module will set Auth-Type to LDAP if it has not
134         #  already been set
135 #       ldap
136
137         #
138         #  Enforce daily limits on time spent logged in.
139 #       daily
140
141         #
142         # Use the checkval module
143 #       checkval
144
145         expiration
146         logintime
147
148         #
149         #  If no other module has claimed responsibility for
150         #  authentication, then try to use PAP.  This allows the
151         #  other modules listed above to add a "known good" password
152         #  to the request, and to do nothing else.  The PAP module
153         #  will then see that password, and use it to do PAP
154         #  authentication.
155         #
156         #  This module should be listed last, so that the other modules
157         #  get a chance to set Auth-Type for themselves.
158         #
159         pap
160
161         #
162         #  If "status_server = yes", then Status-Server messages are passed
163         #  through the following section, and ONLY the following section.
164         #  This permits you to do DB queries, for example.  If the modules
165         #  listed here return "fail", then NO response is sent.
166         #
167 #       Autz-Type Status-Server {
168 #
169 #       }
170 }
171
172
173 #  Authentication.
174 #
175 #
176 #  This section lists which modules are available for authentication.
177 #  Note that it does NOT mean 'try each module in order'.  It means
178 #  that a module from the 'authorize' section adds a configuration
179 #  attribute 'Auth-Type := FOO'.  That authentication type is then
180 #  used to pick the apropriate module from the list below.
181 #
182
183 #  In general, you SHOULD NOT set the Auth-Type attribute.  The server
184 #  will figure it out on its own, and will do the right thing.  The
185 #  most common side effect of erroneously setting the Auth-Type
186 #  attribute is that one authentication method will work, but the
187 #  others will not.
188 #
189 #  The common reasons to set the Auth-Type attribute by hand
190 #  is to either forcibly reject the user (Auth-Type := Reject),
191 #  or to or forcibly accept the user (Auth-Type := Accept).
192 #
193 #  Note that Auth-Type := Accept will NOT work with EAP.
194 #
195 #  Please do not put "unlang" configurations into the "authenticate"
196 #  section.  Put them in the "post-auth" section instead.  That's what
197 #  the post-auth section is for.
198 #
199 authenticate {
200         #
201         #  PAP authentication, when a back-end database listed
202         #  in the 'authorize' section supplies a password.  The
203         #  password can be clear-text, or encrypted.
204         Auth-Type PAP {
205                 pap
206         }
207
208         #
209         #  Most people want CHAP authentication
210         #  A back-end database listed in the 'authorize' section
211         #  MUST supply a CLEAR TEXT password.  Encrypted passwords
212         #  won't work.
213         Auth-Type CHAP {
214                 chap
215         }
216
217         #
218         #  MSCHAP authentication.
219         Auth-Type MS-CHAP {
220                 mschap
221         }
222
223         #
224         #  If you have a Cisco SIP server authenticating against
225         #  FreeRADIUS, uncomment the following line, and the 'digest'
226         #  line in the 'authorize' section.
227 #       digest
228
229         #
230         #  Pluggable Authentication Modules.
231 #       pam
232
233         #
234         #  See 'man getpwent' for information on how the 'unix'
235         #  module checks the users password.  Note that packets
236         #  containing CHAP-Password attributes CANNOT be authenticated
237         #  against /etc/passwd!  See the FAQ for details.
238         #  
239         unix
240
241         # Uncomment it if you want to use ldap for authentication
242         #
243         # Note that this means "check plain-text password against
244         # the ldap database", which means that EAP won't work,
245         # as it does not supply a plain-text password.
246 #       Auth-Type LDAP {
247 #               ldap
248 #       }
249
250         #
251         #  Allow EAP authentication.
252         eap
253 }
254
255
256 #
257 #  Pre-accounting.  Decide which accounting type to use.
258 #
259 preacct {
260         preprocess
261
262         #
263         #  Ensure that we have a semi-unique identifier for every
264         #  request, and many NAS boxes are broken.
265         acct_unique
266
267         #
268         #  Look for IPASS-style 'realm/', and if not found, look for
269         #  '@realm', and decide whether or not to proxy, based on
270         #  that.
271         #
272         #  Accounting requests are generally proxied to the same
273         #  home server as authentication requests.
274 #       IPASS
275         suffix
276 #       ntdomain
277
278         #
279         #  Read the 'acct_users' file
280         files
281 }
282
283 #
284 #  Accounting.  Log the accounting data.
285 #
286 accounting {
287         #
288         #  Create a 'detail'ed log of the packets.
289         #  Note that accounting requests which are proxied
290         #  are also logged in the detail file.
291         detail
292 #       daily
293
294         #  Update the wtmp file
295         #
296         #  If you don't use "radlast", you can delete this line.
297         unix
298
299         #
300         #  For Simultaneous-Use tracking.
301         #
302         #  Due to packet losses in the network, the data here
303         #  may be incorrect.  There is little we can do about it.
304         radutmp
305 #       sradutmp
306
307         #  Return an address to the IP Pool when we see a stop record.
308 #       main_pool
309
310         #
311         #  Log traffic to an SQL database.
312         #
313         #  See "Accounting queries" in sql.conf
314 #       sql
315
316         #
317         #  Instead of sending the query to the SQL server,
318         #  write it into a log file.
319         #
320 #       sql_log
321
322         #  Cisco VoIP specific bulk accounting
323 #       pgsql-voip
324
325         #  Filter attributes from the accounting response.
326         attr_filter.accounting_response
327
328         #
329         #  See "Autz-Type Status-Server" for how this works.
330         #
331 #       Acct-Type Status-Server {
332 #
333 #       }
334 }
335
336
337 #  Session database, used for checking Simultaneous-Use. Either the radutmp 
338 #  or rlm_sql module can handle this.
339 #  The rlm_sql module is *much* faster
340 session {
341         radutmp
342
343         #
344         #  See "Simultaneous Use Checking Queries" in sql.conf
345 #       sql
346 }
347
348
349 #  Post-Authentication
350 #  Once we KNOW that the user has been authenticated, there are
351 #  additional steps we can take.
352 post-auth {
353         #  Get an address from the IP Pool.
354 #       main_pool
355
356         #
357         #  If you want to have a log of authentication replies,
358         #  un-comment the following line, and the 'detail reply_log'
359         #  section, above.
360 #       reply_log
361
362         #
363         #  After authenticating the user, do another SQL query.
364         #
365         #  See "Authentication Logging Queries" in sql.conf
366 #       sql
367
368         #
369         #  Instead of sending the query to the SQL server,
370         #  write it into a log file.
371         #
372 #       sql_log
373
374         #
375         #  Un-comment the following if you have set
376         #  'edir_account_policy_check = yes' in the ldap module sub-section of
377         #  the 'modules' section.
378         #
379 #       ldap
380
381         #
382         #  Access-Reject packets are sent through the REJECT sub-section of the
383         #  post-auth section.
384         #
385         #  Add the ldap module name (or instance) if you have set 
386         #  'edir_account_policy_check = yes' in the ldap module configuration
387         #
388         Post-Auth-Type REJECT {
389                 attr_filter.access_reject
390         }
391 }
392
393 #
394 #  When the server decides to proxy a request to a home server,
395 #  the proxied request is first passed through the pre-proxy
396 #  stage.  This stage can re-write the request, or decide to
397 #  cancel the proxy.
398 #
399 #  Only a few modules currently have this method.
400 #
401 pre-proxy {
402 #       attr_rewrite
403
404         #  Uncomment the following line if you want to change attributes
405         #  as defined in the preproxy_users file.
406 #       files
407
408         #  Uncomment the following line if you want to filter requests
409         #  sent to remote servers based on the rules defined in the
410         #  'attrs.pre-proxy' file.
411 #       attr_filter.pre-proxy
412
413         #  If you want to have a log of packets proxied to a home
414         #  server, un-comment the following line, and the
415         #  'detail pre_proxy_log' section, above.
416 #       pre_proxy_log
417 }
418
419 #
420 #  When the server receives a reply to a request it proxied
421 #  to a home server, the request may be massaged here, in the
422 #  post-proxy stage.
423 #
424 post-proxy {
425
426         #  If you want to have a log of replies from a home server,
427         #  un-comment the following line, and the 'detail post_proxy_log'
428         #  section, above.
429 #       post_proxy_log
430
431 #       attr_rewrite
432
433         #  Uncomment the following line if you want to filter replies from
434         #  remote proxies based on the rules defined in the 'attrs' file.
435 #       attr_filter.post-proxy
436
437         #
438         #  If you are proxying LEAP, you MUST configure the EAP
439         #  module, and you MUST list it here, in the post-proxy
440         #  stage.
441         #
442         #  You MUST also use the 'nostrip' option in the 'realm'
443         #  configuration.  Otherwise, the User-Name attribute
444         #  in the proxied request will not match the user name
445         #  hidden inside of the EAP packet, and the end server will
446         #  reject the EAP request.
447         #
448         eap
449
450         #
451         #  If the server tries to proxy a request and fails, then the
452         #  request is processed through the modules in this section.
453         #
454         #  The main use of this section is to permit robust proxying
455         #  of accounting packets.  The server can be configured to
456         #  proxy accounting packets as part of normal processing.
457         #  Then, if the home server goes down, accounting packets can
458         #  be logged to a local "detail" file, for processing with
459         #  radrelay.  When the home server comes back up, radrelay
460         #  will read the detail file, and send the packets to the
461         #  home server.
462         #
463         #  With this configuration, the server always responds to
464         #  Accounting-Requests from the NAS, but only writes
465         #  accounting packets to disk if the home server is down.
466         #
467 #       Post-Proxy-Type Fail {
468 #                       detail
469 #       }
470
471 }
472