pull fixes from branch_1_1
[freeradius.git] / raddb / radrelay.conf.in
1 ##
2 ## radrelay.conf        -- FreeRADIUS server configuration file.
3 ##
4 ##      http://www.freeradius.org/
5 ##      $Id$
6 ##
7 #
8 #       This configuration file is for the "radrelay" personality
9 #       of FreeRADIUS.  It contains some of the same configuration
10 #       items as "radiusd.conf", but many have been deleted, as they
11 #       do not apply to "radrelay".
12 #
13 #       The server reads this file when it is run as "radiusd -n radrelay".
14 #
15 #
16
17 prefix = @prefix@
18 exec_prefix = @exec_prefix@
19 sysconfdir = @sysconfdir@
20 localstatedir = @localstatedir@
21 sbindir = @sbindir@
22 logdir = @logdir@
23 raddbdir = @raddbdir@
24 radacctdir = @radacctdir@
25
26 #  Location of config and logfiles.
27 confdir = ${raddbdir}
28 run_dir = ${localstatedir}/run/radiusd
29
30 #
31 #  The logging messages for the server are appended to the
32 #  tail of this file.
33 #
34 log_file = ${logdir}/radius.log
35
36 #
37 #  Destination for log messages.  This can be one of:
38 #
39 #       files - log to ${log_file}, as defined above.
40 #       syslog - to syslog (see also the log{} section, below)
41 #       stdout - standard output
42 #       stderr - standard error.
43 #
44 #  The command-line option "-X" over-rides this option, and forces
45 #  logging to go to stdout.
46 #
47 log_destination = files
48
49 #
50 # libdir: Where to find the rlm_* modules.
51 #
52 #   This should be automatically set at configuration time.
53 #
54 #   If the server builds and installs, but fails at execution time
55 #   with an 'undefined symbol' error, then you can use the libdir
56 #   directive to work around the problem.
57 #
58 #   The cause is usually that a library has been installed on your
59 #   system in a place where the dynamic linker CANNOT find it.  When
60 #   executing as root (or another user), your personal environment MAY
61 #   be set up to allow the dynamic linker to find the library.  When
62 #   executing as a daemon, FreeRADIUS MAY NOT have the same
63 #   personalized configuration.
64 #
65 #   To work around the problem, find out which library contains that symbol,
66 #   and add the directory containing that library to the end of 'libdir',
67 #   with a colon separating the directory names.  NO spaces are allowed.
68 #
69 #   e.g. libdir = /usr/local/lib:/opt/package/lib
70 #
71 #   You can also try setting the LD_LIBRARY_PATH environment variable
72 #   in a script which starts the server.
73 #
74 #   If that does not work, then you can re-configure and re-build the
75 #   server to NOT use shared libraries, via:
76 #
77 #       ./configure --disable-shared
78 #       make
79 #       make install
80 #
81 libdir = @libdir@
82
83 #  pidfile: Where to place the PID of the RADIUS server.
84 #
85 #  The server may be signalled while it's running by using this
86 #  file.
87 #
88 #  This file is written when ONLY running in daemon mode.
89 #
90 #  e.g.:  kill -HUP `cat /var/run/radiusd/radiusd.pid`
91 #
92 pidfile = ${run_dir}/radrelay.pid
93
94 #
95 #  radrelay doesn't need any special permissions to run.
96 #
97 #user = nobody
98 #group = nobody
99
100 max_request_time = 30
101 delete_blocked_requests = no
102 cleanup_delay = 5
103 max_requests = 1024
104
105 #
106 #  You can have as many "listen" sections as you want.
107 #
108 #  The server CANNOT listen on type "detail" and type "acct"
109 #  at the same time.
110 #
111 listen {
112         type = detail
113
114         # where the detail file is located
115         detail = ${confdir}/detail
116
117         #
118
119         #  Send no more than N requests to the server at once.
120         #  If this is set to 0 (zero), then the requests will be read
121         #  from the detail file as fast as possible, potentially
122         #  overwhelming the server.
123         #
124         max_outstanding = 100
125
126
127         #
128         #  Server identity.  This lets you tell the different "listen"
129         #  sections apart.  When a packet is read from a detail file,
130         #  the Server-Identity attribute will be set to the value below
131         #  for that packet.
132         #
133         identity = radrelay
134 }
135
136
137 hostname_lookups = no
138
139 log {
140         syslog_facility = daemon
141 }
142
143 # PROXY CONFIGURATION
144 #
145 #  proxy_requests: Turns proxying of RADIUS requests on or off.
146 #
147 #  The server has proxying turned on by default.  If your system is NOT
148 #  set up to proxy requests to another server, then you can turn proxying
149 #  off here.  This will save a small amount of resources on the server.
150 #
151 #  If you have proxying turned off, and your configuration files say
152 #  to proxy a request, then an error message will be logged.
153 #
154 #  To disable proxying, change the "yes" to "no", and comment the
155 #  $INCLUDE line.
156 #
157 #  allowed values: {no, yes}
158 #
159 proxy_requests  = yes
160 $INCLUDE  ${confdir}/proxy.conf
161
162
163 # CLIENTS CONFIGURATION
164 #
165 #  Client configuration is defined in "clients.conf".  
166 #
167 #  The "radrelay" personality of the server does not have
168 #  any clients, and does not need, or read, "clients.conf".
169
170
171 # SNMP CONFIGURATION
172 #
173 # The "radrelay" personality of the server does not have
174 # any SNMP configuration.
175
176
177 # THREAD POOL CONFIGURATION
178 #
179 #  Threads are less useful for radrelay than for radiusd.
180 #  This section is here just to remind you that it can be controlled.
181 #
182 thread pool {
183         start_servers = 5
184         max_servers = 32
185         min_spare_servers = 3
186         max_spare_servers = 10
187 }
188
189 # MODULE CONFIGURATION
190 #
191 #  The names and configuration of each module is located in this section.
192 #
193 #  Some modules have been deleted from this section.  e.g
194 #
195 #       pap
196 #       chap
197 #       mschap
198 #       eap
199 #       detail
200 #       unix
201 #       radutmp
202 #
203 #  It doesn't make sense to use these modules when the server is running
204 #  as "radrelay".
205 #
206 modules {
207         # Realm module, for proxying.
208         #
209         #  You can have multiple instances of the realm module to
210         #  support multiple realm syntaxs at the same time.  The
211         #  search order is defined by the order in the authorize and
212         #  preacct sections.
213         #
214         #  Four config options:
215         #       format         -  must be "prefix" or "suffix"
216         #                         The special cases of "DEFAULT"
217         #                         and "NULL" are allowed, too.
218         #       delimiter      -  must be a single character
219
220         #  'realm/username'
221         #
222         #  Using this entry, IPASS users have their realm set to "IPASS".
223         realm IPASS {
224                 format = prefix
225                 delimiter = "/"
226         }
227
228         #  'username@realm'
229         #
230         realm suffix {
231                 format = suffix
232                 delimiter = "@"
233         }
234
235         #  'username%realm'
236         #
237         realm realmpercent {
238                 format = suffix
239                 delimiter = "%"
240         }
241
242         #
243         #  'domain\user'
244         #
245         realm ntdomain {
246                 format = prefix
247                 delimiter = "\\"
248         }       
249
250         #  A simple value checking module
251         #
252         #  It can be used to check if an attribute value in the request
253         #  matches a (possibly multi valued) attribute in the check
254         #  items This can be used for example for caller-id
255         #  authentication.  For the module to run, both the request
256         #  attribute and the check items attribute must exist
257         #
258         #  i.e.
259         #  A user has an ldap entry with 2 radiusCallingStationId
260         #  attributes with values "12345678" and "12345679".  If we
261         #  enable rlm_checkval, then any request which contains a
262         #  Calling-Station-Id with one of those two values will be
263         #  accepted.  Requests with other values for
264         #  Calling-Station-Id will be rejected.
265         #
266         #  Regular expressions in the check attribute value are allowed
267         #  as long as the operator is '=~'
268         #
269         checkval {
270                 # The attribute to look for in the request
271                 item-name = Calling-Station-Id
272
273                 # The attribute to look for in check items. Can be multi valued
274                 check-name = Calling-Station-Id
275
276                 # The data type. Can be
277                 # string,integer,ipaddr,date,abinary,octets
278                 data-type = string
279
280                 # If set to yes and we dont find the item-name attribute in the
281                 # request then we send back a reject
282                 # DEFAULT is no
283                 #notfound-reject = no
284         }
285         
286         #  rewrite arbitrary packets.  Useful in accounting and authorization.
287         #
288         #
289         #  The module can also use the Rewrite-Rule attribute. If it
290         #  is set and matches the name of the module instance, then
291         #  that module instance will be the only one which runs.
292         #
293         #  Also if new_attribute is set to yes then a new attribute
294         #  will be created containing the value replacewith and it
295         #  will be added to searchin (packet, reply, proxy, proxy_reply or config).
296         # searchfor,ignore_case and max_matches will be ignored in that case.
297         #
298         # Backreferences are supported: %{0} will contain the string the whole match
299         # and %{1} to %{8} will contain the contents of the 1st to the 8th parentheses
300         #
301         # If max_matches is greater than one the backreferences will correspond to the
302         # first match
303
304         #
305         #attr_rewrite sanecallerid {
306         #       attribute = Called-Station-Id
307                 # may be "packet", "reply", "proxy", "proxy_reply" or "config"
308         #       searchin = packet
309         #       searchfor = "[+ ]"
310         #       replacewith = ""
311         #       ignore_case = no
312         #       new_attribute = no
313         #       max_matches = 10
314         #       ## If set to yes then the replace string will be appended to the original string
315         #       append = no
316         #}
317
318         # Preprocess the incoming RADIUS request, before handing it off
319         # to other modules.
320         #
321         #  This module processes the 'huntgroups' and 'hints' files.
322         #  In addition, it re-writes some weird attributes created
323         #  by some NASes, and converts the attributes into a form which
324         #  is a little more standard.
325         #
326         preprocess {
327                 huntgroups = ${confdir}/huntgroups
328                 hints = ${confdir}/hints
329
330                 # This hack changes Ascend's wierd port numberings
331                 # to standard 0-??? port numbers so that the "+" works
332                 # for IP address assignments.
333                 with_ascend_hack = no
334                 ascend_channels_per_line = 23
335
336                 # Windows NT machines often authenticate themselves as
337                 # NT_DOMAIN\username
338                 #
339                 # If this is set to 'yes', then the NT_DOMAIN portion
340                 # of the user-name is silently discarded.
341                 #
342                 # This configuration entry SHOULD NOT be used.
343                 # See the "realms" module for a better way to handle
344                 # NT domains.
345                 with_ntdomain_hack = no
346
347                 # Specialix Jetstream 8500 24 port access server.
348                 #
349                 # If the user name is 10 characters or longer, a "/"
350                 # and the excess characters after the 10th are
351                 # appended to the user name.
352                 #
353                 # If you're not running that NAS, you don't need
354                 # this hack.
355                 with_specialix_jetstream_hack = no
356
357                 # Cisco (and Quintum in Cisco mode) sends it's VSA attributes
358                 # with the attribute name *again* in the string, like:
359                 #
360                 #   H323-Attribute = "h323-attribute=value".
361                 #
362                 # If this configuration item is set to 'yes', then
363                 # the redundant data in the the attribute text is stripped
364                 # out.  The result is:
365                 #
366                 #  H323-Attribute = "value"
367                 #
368                 # If you're not running a Cisco or Quintum NAS, you don't
369                 # need this hack.
370                 with_cisco_vsa_hack = no
371         }
372
373         # Livingston-style 'users' file
374         #
375         files {
376                 usersfile = ${confdir}/users
377                 acctusersfile = ${confdir}/acct_users
378
379                 #  If you want to use the old Cistron 'users' file
380                 #  with FreeRADIUS, you should change the next line
381                 #  to 'compat = cistron'.  You can the copy your 'users'
382                 #  file from Cistron.
383                 compat = no
384         }
385
386         # Create a unique accounting session Id.  Many NASes re-use or
387         # repeat values for Acct-Session-Id, causing no end of
388         # confusion.
389         #
390         #  This module will add a (probably) unique session id 
391         #  to an accounting packet based on the attributes listed
392         #  below found in the packet.  See doc/rlm_acct_unique for
393         #  more information.
394         #
395         acct_unique {
396                 key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
397         }
398
399
400         #  Include another file that has the SQL-related configuration.
401         #  This is another file only because it tends to be big.
402         #
403         #  The following configuration file is for use with MySQL.
404         #
405         #  For Postgresql, use:         ${confdir}/postgresql.conf
406         #  For MS-SQL, use:             ${confdir}/mssql.conf
407         #  For Oracle, use:             ${confdir}/oraclesql.conf
408         #
409 #       $INCLUDE  ${confdir}/sql.conf
410
411
412         #  For Cisco VoIP specific accounting with Postgresql,
413         #  use:         ${confdir}/pgsql-voip.conf
414         #
415         #  You will also need the sql schema from:
416         #        src/billing/cisco_h323_db_schema-postgres.sql
417         #  Note: This config can be use AS WELL AS the standard sql
418         #  config if you need SQL based Auth
419
420         # The "always" module is here for debugging purposes. Each
421         # instance simply returns the same result, always, without
422         # doing anything.
423         always fail {
424                 rcode = fail
425         }
426         always reject {
427                 rcode = reject
428         }
429         always ok {
430                 rcode = ok
431                 simulcount = 0
432                 mpp = no
433         }
434
435         #
436         #  The 'expression' module currently has no configuration.
437         #
438         #  This module is useful only for 'xlat'.  To use it,
439         #  put 'exec' into the 'instantiate' section.  You can then
440         #  do dynamic translation of attributes like:
441         #
442         #  Attribute-Name = `%{expr:2 + 3 + %{exec: uid -u}}`
443         #
444         #  The value of the attribute will be replaced with the output
445         #  of the program which is executed.  Due to RADIUS protocol
446         #  limitations, any output over 253 bytes will be ignored.
447         #
448         #  The module also registers a few paircompare functions
449         expr {
450         }
451
452         #
453         #  Execute external programs
454         #
455         #  This module is useful only for 'xlat'.  To use it,
456         #  put 'exec' into the 'instantiate' section.  You can then
457         #  do dynamic translation of attributes like:
458         #
459         #  Attribute-Name = `%{exec:/path/to/program args}`
460         #
461         #  The value of the attribute will be replaced with the output
462         #  of the program which is executed.  Due to RADIUS protocol
463         #  limitations, any output over 253 bytes will be ignored.
464         #
465         #  The RADIUS attributes from the user request will be placed
466         #  into environment variables of the executed program, as
467         #  described in 'doc/variables.txt'
468         #
469         exec {
470                 wait = yes
471                 input_pairs = request
472                 shell_escape = yes
473         }
474 }
475
476 # Instantiation
477 #
478 #  This section orders the loading of the modules.  Modules
479 #  listed here will get loaded BEFORE the later sections like
480 #  authorize, authenticate, etc. get examined.
481 #
482 #  This section is not strictly needed.  When a section like
483 #  authorize refers to a module, it's automatically loaded and
484 #  initialized.  However, some modules may not be listed in any
485 #  of the following sections, so they can be listed here.
486 #
487 #  Also, listing modules here ensures that you have control over
488 #  the order in which they are initalized.  If one module needs
489 #  something defined by another module, you can list them in order
490 #  here, and ensure that the configuration will be OK.
491 #
492 instantiate {
493         exec
494         expr
495
496         # subsections here can be thought of as "virtual" modules.
497         #
498         # e.g. If you have two redundant SQL servers, and you want to
499         # use them in the authorize and accounting sections, you could
500         # place a "redundant" block in each section, containing the
501         # exact same text.  Or, you could uncomment the following
502         # lines, and list "redundant_sql" in the authorize and
503         # accounting sections.
504         #
505         #redundant redundant_sql {
506         #       sql1
507         #       sql2
508         #}
509 }
510
511 #
512 #  There are no authorize, authenticate, or post-auth sections.
513 #
514
515 #
516 #  Pre-accounting.  Decide which accounting type to use.
517 #
518 preacct {
519         preprocess
520
521         #
522         #  Ensure that we have a semi-unique identifier for every
523         #  request, and many NAS boxes are broken.
524         acct_unique
525
526         #
527         #  Look for IPASS-style 'realm/', and if not found, look for
528         #  '@realm', and decide whether or not to proxy, based on
529         #  that.
530         #
531         #  Accounting requests are generally proxied to the same
532         #  home server as authentication requests.
533 #       IPASS
534         suffix
535 #       ntdomain
536
537         #
538         #  Read the 'acct_users' file
539         files
540 }
541
542 #
543 #  Accounting.  Log the accounting data.
544 #
545 accounting {
546         #
547         #  Log traffic to an SQL database.
548         #
549         #  See "Accounting queries" in sql.conf
550 #       sql
551
552
553         #  Cisco VoIP specific bulk accounting
554 #       pgsql-voip
555
556 }
557
558
559 #
560 #  When the server decides to proxy a request to a home server,
561 #  the proxied request is first passed through the pre-proxy
562 #  stage.  This stage can re-write the request, or decide to
563 #  cancel the proxy.
564 #
565 #  Only a few modules currently have this method.
566 #
567 pre-proxy {
568 #       attr_rewrite
569
570         #  If you want to have a log of packets proxied to a home
571         #  server, un-comment the following line, and the
572         #  'detail pre_proxy_log' section, above.
573 #       pre_proxy_log
574 }
575
576 #
577 #  When the server receives a reply to a request it proxied
578 #  to a home server, the request may be massaged here, in the
579 #  post-proxy stage.
580 #
581 post-proxy {
582         #
583
584         #  If you want to have a log of replies from a home server,
585         #  un-comment the following line, and the 'detail post_proxy_log'
586         #  section, above.
587 #       post_proxy_log
588
589 #       attr_rewrite
590
591         #  Uncomment the following line if you want to filter replies from
592         #  remote proxies based on the rules defined in the 'attrs' file.
593
594 #       attr_filter
595 }