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