1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
2 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5 <date>2012-04-11</date>
9 <application>radsecproxy.conf</application>
11 <manvolnum>5</manvolnum>
12 <refmiscinfo>radsecproxy 1.6-dev</refmiscinfo>
16 <application>radsecproxy.conf</application>
18 <refpurpose>Radsec proxy configuration file</refpurpose>
21 <title>Description</title>
23 When the proxy server starts, it will first check the command
24 line arguments, and then read the configuration file. Normally
25 radsecproxy will read the configuration file
26 <filename>/etc/radsecproxy.conf</filename>. The command line
27 <option>-c</option> option can be used to instead read an
30 <refentrytitle>radsecproxy</refentrytitle><manvolnum>1</manvolnum>
35 If the configuration file can not be found, the proxy will exit
36 with an error message. Note that there is also an include facility
37 so that any configuration file may include other configuration
38 files. The proxy will also exit on configuration errors.
42 <title>Configuration Syntax</title>
44 When the configuration file is processed, whitespace (spaces and
45 tabs) are generally ignored. For each line, leading and trailing
46 whitespace are ignored. A line is ignored if it is empty, only
47 consists of whitespace, or if the first non-whitespace character
48 is a <literal>#</literal>. The configuration is generally case
49 insensitive, but in some cases the option values (see below) are
53 There are two types of configuration structures than can be
54 used. The first and simplest are lines on the format
55 <emphasis>option value</emphasis>. That is, an option name, see
56 below for a list of valid options, followed by whitespace (at
57 least one space or tab character), followed by a value. Note
58 that if the value contains whitespace, then it must be quoted
59 using <literal>""</literal> or <literal>''</literal>. Any
60 whitespace in front of the option or after the value will be
64 The other type of structure is a block. A block spans at least
65 two lines, and has the format:
66 <blockquote><literallayout>
72 </literallayout></blockquote>
73 That is, some blocktype, see below for a list of the different
74 block types, and then enclosed in braces you have zero or more
75 lines that each have the previously described <emphasis>option
76 value</emphasis> format. Different block types have different
77 rules for which options can be specified, they are listed
78 below. The rules regarding white space, comments and quotes are
79 as above. Hence you may do things like:
80 <blockquote><literallayout>
83 option "value with space"
86 </literallayout></blockquote>
89 Option value characters can also be written in hex. This is done
90 by writing the character <literal>%</literal> followed by two
91 hexadecimal digits. If a <literal>%</literal> is used without
92 two following hexadecimal digits, the <literal>%</literal> and
93 the following characters are used as written. If you want to
94 write a <literal>%</literal> and not use this decoding, you may
95 of course write <literal>%</literal> in hex; i.e.,
96 <literal>%25</literal>.
99 There is one special option that can be used both as a basic
100 option and inside all blocks. That is the option
101 <literal>Include</literal> where the value specifies files to be
102 included. The value can be a single file, or it can use normal
103 shell globbing to specify multiple files, e.g.:
106 include /etc/radsecproxy.conf.d/*.conf
109 The files are sorted alphabetically. Included files are read in
110 the order they are specified, when reaching the end of a file,
111 the next file is read. When reaching the end of the last
112 included file, the proxy returns to read the next line following
113 the <literal>Include</literal> option. Included files may again
118 <title>Basic Options</title>
120 The following basic options may be specified in the
121 configuration file. Note that blocktypes and options inside
122 blocks are discussed later. Note that none of these options are
123 required, and indeed in many cases they are not needed. Note
124 that you should specify each at most once. The behaviour with
125 multiple occurences is undefined.
129 <term><literal>PidFile</literal></term>
132 The PidFile option specifies the name of a file to which
133 the process id (PID) will be written. This is overridden
134 by the <option>-i</option> command line option. There is
135 no default value for the PidFile option.
140 <term><literal>LogLevel</literal></term>
143 This option specifies the debug level. It must be set to
144 1, 2, 3, 4 or 5, where 1 logs only serious errors, and 5
145 logs everything. The default is 2 which logs errors,
146 warnings and a few informational messages. Note that the
147 command line option <option>-d</option> overrides this.
152 <term><literal>LogDestination</literal></term>
155 This specifies where the log messages should go. By
156 default the messages go to syslog with facility
157 <literal>LOG_DAEMON</literal>. Using this option you can
158 specify another syslog facility, or you may specify that
159 logging should be to a particular file, not using
160 syslog. The value must be either a file or syslog URL. The
161 file URL is the standard one, specifying a local file that
162 should be used. For syslog, you must use the syntax:
163 <literal>x-syslog:///FACILITY</literal> where
164 <literal>FACILITY</literal> must be one of
165 <literal>LOG_DAEMON</literal>,
166 <literal>LOG_MAIL</literal>, <literal>LOG_USER</literal>,
167 <literal>LOG_LOCAL0</literal>,
168 <literal>LOG_LOCAL1</literal>,
169 <literal>LOG_LOCAL2</literal>,
170 <literal>LOG_LOCAL3</literal>,
171 <literal>LOG_LOCAL4</literal>,
172 <literal>LOG_LOCAL5</literal>,
173 <literal>LOG_LOCAL6</literal> or
174 <literal>LOG_LOCAL7</literal>. You may omit the facility
175 from the URL to specify logging to the default facility,
176 but this is not very useful since this is the default log
177 destination. Note that this option is ignored if
178 <option>-f</option> is specified on the command line.
184 <term><literal>FTicksReporting</literal></term>
187 The FTicksReporting option is used to enable F-Ticks
188 logging and can be set to <literal>None</literal>,
189 <literal>Basic</literal> or <literal>Full</literal>. Its
190 default value is <literal>None</literal>. If
191 FTicksReporting is set to anything other than
192 <literal>None</literal>, note that the default value for
193 FTicksMAC is <literal>VendorKeyHashed</literal> which
194 needs FTicksKey to be set.
197 See <literal>radsecproxy.conf-example</literal> for
198 details. Note that radsecproxy has to be configured with
199 F-Ticks support (<literal>--enable-fticks</literal>) for
200 this option to have any effect.
206 <term><literal>FTicksMAC</literal></term>
209 The FTicksMAC option can be used to control if and how
210 Calling-Station-Id (the users Ethernet MAC address) is
211 being logged. It can be set to one of
212 <literal>Static</literal>, <literal>Original</literal>,
213 <literal>VendorHashed</literal>,
214 <literal>VendorKeyHashed</literal>,
215 <literal>FullyHashed</literal> or
216 <literal>FullyKeyHashed</literal>.
219 The default value for FTicksMAC is
220 <literal>VendorKeyHashed</literal>. This means that
221 FTicksKey has to be set.
223 Before chosing any of <literal>Original</literal>,
224 <literal>FullyHashed</literal> or
225 <literal>VendorHashed</literal>, consider the implications
226 for user privacy when MAC addresses are collected. How
227 will the logs be stored, transferred and accessed?
231 See <literal>radsecproxy.conf-example</literal> for
232 details. Note that radsecproxy has to be configured with
233 F-Ticks support (<literal>--enable-fticks</literal>) for
234 this option to have any effect.
240 <term><literal>FTicksKey</literal></term>
243 The FTicksKey option is used to specify the key to use
244 when producing HMAC's as an effect of specifying
245 VendorKeyHashed or FullyKeyHashed for the FTicksMAC
249 Note that radsecproxy has to be configured with F-Ticks
250 support (<literal>--enable-fticks</literal>) for this
251 option to have any effect.
257 <term><literal>FTicksSyslogFacility</literal></term>
260 The FTicksSyslogFacility option is used to specify a
261 dedicated syslog facility for F-Ticks messages. This
262 allows for easier filtering of F-Ticks messages. If no
263 FTicksSyslogFacility option is given, F-Ticks messages are
264 written to what the LogDestination option specifies.
267 F-Ticks messages are always logged using the log level
268 LOG_DEBUG. Note that specifying a file in
269 FTicksSyslogFacility (using the file:/// prefix) is
276 <term><literal>ListenUDP</literal></term>
279 Normally the proxy will listen to the standard RADIUS UDP
280 port <literal>1812</literal> if configured to handle UDP
281 clients. On most systems it will do this for all of the
282 system's IP addresses (both IPv4 and IPv6). On some
283 systems however, it may respond to only IPv4 or only
284 IPv6. To specify an alternate port you may use a value on
285 the form <literal>*:port</literal> where port is any valid
286 port number. If you also want to specify a specific
288 e.g. <literal>192.168.1.1:1812</literal> or
289 <literal>[2001:db8::1]:1812</literal>. The port may be
290 omitted if you want the default one (like in these
291 examples). These examples are equivalent to
292 <literal>192.168.1.1</literal> and
293 <literal>2001:db8::1</literal>. Note that you must use
294 brackets around the IPv6 address. This option may be
295 specified multiple times to listen to multiple addresses
301 <term><literal>ListenTCP</literal></term>
304 This option is similar to the <literal>ListenUDP</literal>
305 option, except that it is used for receiving connections
306 from TCP clients. The default port number is
307 <literal>1812</literal>.
312 <term><literal>ListenTLS</literal></term>
315 This is similar to the <literal>ListenUDP</literal>
316 option, except that it is used for receiving connections
317 from TLS clients. The default port number is
318 <literal>2083</literal>. Note that this option was
319 previously called <literal>ListenTCP</literal>.
324 <term><literal>ListenDTLS</literal></term>
327 This is similar to the <literal>ListenUDP</literal>
328 option, except that it is used for receiving connections
329 from DTLS clients. The default port number is
330 <literal>2083</literal>.
335 <term><literal>SourceUDP</literal></term>
338 This can be used to specify source address and/or source
339 port that the proxy will use for sending UDP client
340 messages (e.g. Access Request).
345 <term><literal>SourceTCP</literal></term>
348 This can be used to specify source address and/or source
349 port that the proxy will use for TCP connections.
354 <term><literal>SourceTLS</literal></term>
357 This can be used to specify source address and/or source
358 port that the proxy will use for TLS connections.
363 <term><literal>SourceDTLS</literal></term>
366 This can be used to specify source address and/or source
367 port that the proxy will use for DTLS connections.
372 <term><literal>TTLAttribute</literal></term>
375 This can be used to change the default TTL attribute. Only
376 change this if you know what you are doing. The syntax is
377 either a numerical value denoting the TTL attribute, or
378 two numerical values separated by column specifying a
380 i.e. <literal>vendorid:attribute</literal>.
385 <term><literal>AddTTL</literal></term>
388 If a TTL attribute is present, the proxy will decrement
389 the value and discard the message if zero. Normally the
390 proxy does nothing if no TTL attribute is present. If you
391 use the AddTTL option with a value 1-255, the proxy will
392 when forwarding a message with no TTL attribute, add one
393 with the specified value. Note that this option can also
394 be specified for a client/server. It will then override
395 this setting when forwarding a message to that
401 <term><literal>LoopPrevention</literal></term>
404 This can be set to <literal>on</literal> or
405 <literal>off</literal> with <literal>off</literal> being
406 the default. When this is enabled, a request will never be
407 sent to a server named the same as the client it was
408 received from. I.e., the names of the client block and the
409 server block are compared. Note that this only gives
410 limited protection against loops. It can be used as a
411 basic option and inside server blocks where it overrides
417 <term><literal>Include</literal></term>
420 This is not a normal configuration option; it can be
421 specified multiple times. It can both be used as a basic
422 option and inside blocks. For the full description, see
423 the configuration syntax section above.
430 <title>Blocks</title>
432 There are five types of blocks, they are
433 <literal>client</literal>, <literal>server</literal>,
434 <literal>realm</literal>, <literal>tls</literal> and
435 <literal>rewrite</literal>. At least one instance of each of
436 <literal>client</literal> and <literal>realm</literal> is
437 required. This is necessary for the proxy to do anything useful,
438 and it will exit if not. The <literal>tls</literal> block is
439 required if at least one TLS/DTLS client or server is
440 configured. Note that there can be multiple blocks for each
441 type. For each type, the block names should be unique. The
442 behaviour with multiple occurences of the same name for the same
443 block type is undefined. Also note that some block option values
444 may reference a block by name, in which case the block name must
445 be previously defined. Hence the order of the blocks may be
450 <title>Client Block</title>
452 The client block is used to configure a client. That is, tell
453 the proxy about a client, and what parameters should be used for
454 that client. The name of the client block must (with one
455 exception, see below) be either the IP address (IPv4 or IPv6) of
456 the client, an IP prefix (IPv4 or IPv6) on the form
457 IpAddress/PrefixLength, or a domain name (FQDN). Note that
458 literal IPv6 addresses must be enclosed in brackets.
461 If a domain name is specified, then this will be resolved
462 immediately to all the addresses associated with the name, and
463 the proxy will not care about any possible DNS changes that
464 might occur later. Hence there is no dependency on DNS after
468 When some client later sends a request to the proxy, the proxy
469 will look at the IP address the request comes from, and then go
470 through all the addresses of each of the configured clients (in
471 the order they are defined), to determine which (if any) of the
475 In the case of TLS/DTLS, the name of the client must match the
476 FQDN or IP address in the client certificate. Note that this is
477 not required when the client name is an IP prefix.
480 Alternatively one may use the <literal>host</literal> option
481 inside a client block. In that case, the value of the
482 <literal>host</literal> option is used as above, while the name
483 of the block is only used as a descriptive name for the
484 administrator. The host option may be used multiple times, and
485 can be a mix of addresses, FQDNs and prefixes.
488 The allowed options in a client block are
489 <literal>host</literal>, <literal>type</literal>,
490 <literal>secret</literal>, <literal>tls</literal>,
491 <literal>certificateNameCheck</literal>,
492 <literal>matchCertificateAttribute</literal>,
493 <literal>duplicateInterval</literal>, <literal>AddTTL</literal>,
494 <literal>fticksVISCOUNTRY</literal>, <literal>fticksVISINST</literal>,
495 <literal>rewrite</literal>, <literal>rewriteIn</literal>,
496 <literal>rewriteOut</literal>, and <literal>rewriteAttribute</literal>.
498 We already discussed the <literal>host</literal> option. The
499 value of <literal>type</literal> must be one of
500 <literal>udp</literal>, <literal>tcp</literal>,
501 <literal>tls</literal> or <literal>dtls</literal>. The value of
502 <literal>secret</literal> is the shared RADIUS key used with
503 this client. If the secret contains whitespace, the value must
504 be quoted. This option is optional for TLS/DTLS and if omitted
505 will default to "mysecret". Note that the default value of
506 <literal>secret</literal> will change in an upcoming release.
509 For a TLS/DTLS client you may also specify the
510 <literal>tls</literal> option. The option value must be the
511 name of a previously defined TLS block. If this option is not
512 specified, the TLS block with the name
513 <literal>defaultClient</literal> will be used if defined. If not
514 defined, it will try to use the TLS block named
515 <literal>default</literal>. If the specified TLS block name does
516 not exist, or the option is not specified and none of the
517 defaults exist, the proxy will exit with an error.
520 For a TLS/DTLS client, the option
521 <literal>certificateNameCheck</literal> can be set to
522 <literal>off</literal>, to disable the default behaviour of
523 matching CN or SubjectAltName against the specified hostname or
527 Additional validation of certificate attributes can be done by
528 use of the <literal>matchCertificateAttribute</literal>
529 option. Currently one can only do some matching of CN and
530 SubjectAltName. For regexp matching on CN, one can use the value
531 <literal>CN:/regexp/</literal>. For SubjectAltName one can only
532 do regexp matching of the URI, this is specified as
533 <literal>SubjectAltName:URI:/regexp/</literal>. Note that
534 currently this option can only be specified once in a client
538 The <literal>duplicateInterval</literal> option can be used to
539 specify for how many seconds duplicate checking should be
540 done. If a proxy receives a new request within a few seconds of
541 a previous one, it may be treated the same if from the same
542 client, with the same authenticator etc. The proxy will then
543 ignore the new request (if it is still processing the previous
544 one), or returned a copy of the previous reply.
547 The <literal>AddTTL</literal> option is similar to the
548 <literal>AddTTL</literal> option used in the basic config. See
549 that for details. Any value configured here overrides the basic
550 one when sending messages to this client.
553 The <literal>fticksVISCOUNTRY</literal> option configures
554 clients eligible to F-Ticks logging as defined by the
555 <literal>FTicksReporting</literal> basic option.
558 The <literal>fticksVISINST</literal> option overwrites
559 the default <literal>VISINST</literal> value taken from the client
563 The <literal>rewrite</literal> option is deprecated. Use
564 <literal>rewriteIn</literal> instead.
567 The <literal>rewriteIn</literal> option can be used to refer to
568 a rewrite block that specifies certain rewrite operations that
569 should be performed on incoming messages from the client. The
570 rewriting is done before other processing. For details, see the
571 rewrite block text below. Similarly to <literal>tls</literal>
572 discussed above, if this option is not used, there is a fallback
573 to using the <literal>rewrite</literal> block named
574 <literal>defaultClient</literal> if it exists; and if not, a
575 fallback to a block named <literal>default</literal>.
578 The <literal>rewriteOut</literal> option is used in the same way
579 as <literal>rewriteIn</literal>, except that it specifies
580 rewrite operations that should be performed on outgoing messages
581 to the client. The rewriting is done after other
582 processing. Also, there is no rewrite fallback if this option is
586 The <literal>rewriteAttribute</literal> option currently makes
587 it possible to specify that the User-Name attribute in a client
588 request shall be rewritten in the request sent by the proxy. The
589 User-Name attribute is written back to the original value if a
590 matching response is later sent back to the client. The value
591 must be on the form User-Name:/regexpmatch/replacement/. Example
595 rewriteAttribute User-Name:/^(.*)@local$/\1@example.com/
601 <title>Server Block</title>
603 The server block is used to configure a server. That is, tell
604 the proxy about a server, and what parameters should be used
605 when communicating with that server. The name of the server
606 block must (with one exception, see below) be either the IP
607 address (IPv4 or IPv6) of the server, or a domain name
608 (FQDN). If a domain name is specified, then this will be
609 resolved immediately to all the addresses associated with the
610 name, and the proxy will not care about any possible DNS changes
611 that might occur later. Hence there is no dependency on DNS
612 after startup. If the domain name resolves to multiple
613 addresses, then for UDP/DTLS the first address is used. For
614 TCP/TLS, the proxy will loop through the addresses until it can
615 connect to one of them. In the case of TLS/DTLS, the name of the
616 server must match the FQDN or IP address in the server
620 Alternatively one may use the <literal>host</literal> option
621 inside a server block. In that case, the value of the
622 <literal>host</literal> option is used as above, while the name
623 of the block is only used as a descriptive name for the
624 administrator. Note that multiple host options may be used. This
625 will then be treated as multiple names/addresses for the same
626 server. When initiating a TCP/TLS connection, all addresses of
627 all names may be attempted, but there is no failover between the
628 different host values. For failover one must use separate server
632 Note that the name of the block, or values of host options may
633 include a port number (separated with a column). This port
634 number will then override the default port or a port option in
635 the server block. Also note that literal IPv6 addresses must be
636 enclosed in brackets.
639 The allowed options in a server block are
640 <literal>host</literal>, <literal>port</literal>,
641 <literal>type</literal>, <literal>secret</literal>,
642 <literal>tls</literal>, <literal>certificateNameCheck</literal>,
643 <literal>matchCertificateAttribute</literal>,
644 <literal>AddTTL</literal>, <literal>rewrite</literal>,
645 <literal>rewriteIn</literal>, <literal>rewriteOut</literal>,
646 <literal>statusServer</literal>, <literal>retryCount</literal>,
647 <literal>dynamicLookupCommand</literal> and
648 <literal>retryInterval</literal> and
649 <literal>LoopPrevention</literal>.
652 We already discussed the <literal>host</literal> option. The
653 <literal>port</literal> option allows you to specify which port
654 number the server uses. The usage of <literal>type</literal>,
655 <literal>secret</literal>, <literal>tls</literal>,
656 <literal>certificateNameCheck</literal>,
657 <literal>matchCertificateAttribute</literal>,
658 <literal>AddTTL</literal>, <literal>rewrite</literal>,
659 <literal>rewriteIn</literal> and <literal>rewriteOut</literal>
660 are just as specified for the <literal>client block</literal>
661 above, except that <literal>defaultServer</literal> (and not
662 <literal>defaultClient</literal>) is the fallback for the
663 <literal>tls</literal>, <literal>rewrite</literal> and
664 <literal>rewriteIn</literal> options.
667 <literal>statusServer</literal> can be specified to enable the
668 use of status-server messages for this server. The value must be
669 either <literal>on</literal> or <literal>off</literal>. The
670 default when not specified, is <literal>off</literal>. If
671 statusserver is enabled, the proxy will during idle periods send
672 regular status-server messages to the server to verify that it
673 is alive. This should only be enabled if the server supports it.
676 The options <literal>retryCount</literal> and
677 <literal>retryInterval</literal> can be used to specify how many
678 times the proxy should retry sending a request and how long it
679 should wait between each retry. The defaults are 2 retries and
683 The option <literal>dynamicLookupCommand</literal> can be used
684 to specify a command that should be executed to dynamically
685 configure a server. The executable file should be given with
686 full path and will be invoked with the name of the realm as its
687 first and only argument. It should either print a valid
688 <literal>server</literal> option on stdout and exit with a code
689 of 0 or print nothing and exit with a non-zero exit code. An
690 example of a shell script resolving the DNS NAPTR records for
691 the realm and then the SRV records for each NAPTR matching
692 'x-eduroam:radius.tls' is provided in
693 <literal>tools/naptr-eduroam.sh</literal>. This option was
694 added in radsecproxy-1.3 but tends to crash radsecproxy versions
698 Using the <literal>LoopPrevention</literal> option here
699 overrides any basic setting of this option. See section
700 <literal>BASIC OPTIONS</literal> for details on this option.
704 <title>Realm Block</title>
706 When the proxy receives an Access-Request it needs to figure out
707 to which server it should be forwarded. This is done by looking
708 at the Username attribute in the request, and matching that
709 against the names of the defined realm blocks. The proxy will
710 match against the blocks in the order they are specified, using
711 the first match if any. If no realm matches, the proxy will
712 simply ignore the request. Each realm block specifies what the
713 server should do when a match is found. A realm block may
714 contain none, one or multiple <literal>server</literal> options,
715 and similarly <literal>accountingServer</literal> options. There
716 are also <literal>replyMessage</literal> and
717 <literal>accountingResponse</literal> options. We will discuss
721 <title>Realm block names and matching</title>
723 In the general case the proxy will look for a
724 <literal>@</literal> in the username attribute, and try to do
725 an exact case insensitive match between what comes after the
726 <literal>@</literal> and the name of the realm block. So if
727 you get a request with the attribute value
728 <literal>anonymous@example.com</literal>, the proxy will go
729 through the realm names in the order they are specified,
730 looking for a realm block named
731 <literal>example.com</literal>.
734 There are two exceptions to this, one is the realm name
735 <literal>*</literal> which means match everything. Hence if
736 you have a realm block named <literal>*</literal>, then it
737 will always match. This should then be the last realm block
738 defined, since any blocks after this would never be
739 checked. This is useful for having a default.
742 The other exception is regular expression matching. If the
743 realm name starts with a <literal>/</literal>, the name is
744 treated as an regular expression. A case insensitive regexp
745 match will then be done using this regexp on the value of the
746 entire Username attribute. Optionally you may also have a
747 trailing <literal>/</literal> after the regexp. So as an
748 example, if you want to use regexp matching the domain
749 <literal>example.com</literal> you could have a realm block
750 named <literal>/@example\\.com$</literal>. Optinally this can
751 also be written <literal>/@example\\.com$/</literal>. If you
752 want to match all domains under the <literal>.com</literal>
753 top domain, you could do <literal>/@.*\\.com$</literal>. Note
754 that since the matching is done on the entire attribute value,
755 you can also use rules like
756 <literal>/^[a-k].*@example\\.com$/</literal> to get some of
757 the users in this domain to use one server, while other users
758 could be matched by another realm block and use another
763 <title>Realm block options</title>
765 A realm block may contain none, one or multiple
766 <literal>server</literal> options. If defined, the values of
767 the <literal>server</literal> options must be the names of
768 previously defined server blocks. Normally requests will be
769 forwarded to the first server option defined. If there are
770 multiple server options, the proxy will do fail-over and use
771 the second server if the first is down. If the two first are
772 down, it will try the third etc. If say the first server comes
773 back up, it will go back to using that one. Currently
774 detection of servers being up or down is based on the use of
775 StatusServer (if enabled), and that TCP/TLS/DTLS connections
779 A realm block may also contain none, one or multiple
780 <literal>accountingServer</literal> options. This is used
781 exactly like the <literal>server</literal> option, except that
782 it is used for specifying where to send matching accounting
783 requests. The values must be the names of previously defined
784 server blocks. When multiple accounting servers are defined,
785 there is a failover mechanism similar to the one for the
786 <literal>server</literal> option.
789 If there is no <literal>server</literal> option, the proxy
790 will if <literal>replyMessage</literal> is specified, reply
791 back to the client with an Access Reject message. The message
792 contains a replyMessage attribute with the value as specified
793 by the <literal>replyMessage</literal> option. Note that this
794 is different from having no match since then the request is
795 simply ignored. You may wonder why this is useful. One example
796 is if you handle say all domains under say
797 <literal>.bv</literal>. Then you may have several realm blocks
798 matching the domains that exists, while for other domains
799 under <literal>.bv</literal> you want to send a reject. At the
800 same time you might want to send all other requests to some
801 default server. After the realms for the subdomains, you would
802 then have two realm definitions. One with the name
803 <literal>/@.*\\.bv$</literal> with no servers, followed by one
804 with the name <literal>*</literal> with the default server
805 defined. This may also be useful for blocking particular
809 If there is no <literal>accountingServer</literal> option, the
810 proxy will normally do nothing, ignoring accounting
811 requests. There is however an option called
812 <literal>accountingResponse</literal>. If this is set to
813 <literal>on</literal>, the proxy will log some of the
814 accounting information and send an Accounting-Response
815 back. This is useful if you do not care much about accounting,
816 but want to stop clients from retransmitting accounting
817 requests. By default this option is set to
818 <literal>off</literal>.
823 <title>TLS Block</title>
825 The TLS block specifies TLS configuration options and you need
826 at least one of these if you have clients or servers using
827 TLS/DTLS. As discussed in the client and server block
828 descriptions, a client or server block may reference a
829 particular TLS block by name. There are also however the special
830 TLS block names <literal>default</literal>,
831 <literal>defaultClient</literal> and
832 <literal>defaultServer</literal> which are used as defaults if
833 the client or server block does not reference a TLS block. Also
834 note that a TLS block must be defined before the client or
835 server block that would use it. If you want the same TLS
836 configuration for all TLS/DTLS clients and servers, you need
837 just a single tls block named <literal>default</literal>, and
838 the client and servers need not refer to it. If you want all
839 TLS/DTLS clients to use one config, and all TLS/DTLS servers to
840 use another, then you would be fine only defining two TLS blocks
841 named <literal>defaultClient</literal> and
842 <literal>defaultServer</literal>. If you want different clients
843 (or different servers) to have different TLS parameters, then
844 you may need to create other TLS blocks with other names, and
845 reference those from the client or server definitions. Note that
846 you could also have say a client block refer to a default, even
847 <literal>defaultServer</literal> if you really want to.
850 The available TLS block options are
851 <literal>CACertificateFile</literal>,
852 <literal>CACertificatePath</literal>,
853 <literal>certificateFile</literal>,
854 <literal>certificateKeyFile</literal>,
855 <literal>certificateKeyPassword</literal>,
856 <literal>cacheExpiry</literal>, <literal>CRLCheck</literal> and
857 <literal>policyOID</literal>. When doing RADIUS over TLS/DTLS,
858 both the client and the server present certificates, and they
859 are both verified by the peer. Hence you must always specify
860 <literal>certificateFile</literal> and
861 <literal>certificateKeyFile</literal> options, as well as
862 <literal>certificateKeyPassword</literal> if a password is
863 needed to decrypt the private key. Note that
864 <literal>CACertificateFile</literal> may be a certificate
865 chain. In order to verify certificates, or send a chain of
866 certificates to a peer, you also always need to specify
867 <literal>CACertificateFile</literal> or
868 <literal>CACertificatePath</literal>. Note that you may specify
869 both, in which case the certificates in
870 <literal>CACertificateFile</literal> are checked first. By
871 default CRLs are not checked. This can be changed by setting
872 <literal>CRLCheck</literal> to <literal>on</literal>. One can
873 require peer certificates to adhere to certain policies by
874 specifying one or multiple policyOIDs using one or multiple
875 <literal>policyOID</literal> options.
878 CA certificates and CRLs are normally cached permanently. That
879 is, once a CA or CRL has been read, the proxy will never attempt
880 to re-read it. CRLs may change relatively often and the proxy
881 should ideally always use the latest CRLs. Rather than
882 restarting the proxy, there is an option
883 <literal>cacheExpiry</literal> that specifies how many seconds
884 the CA and CRL information should be cached. Reasonable values
885 might be say 3600 (1 hour) or 86400 (24 hours), depending on how
886 frequently CRLs are updated and how critical it is to be up to
887 date. This option may be set to zero to disable caching.
891 <title>Rewrite Block</title>
893 The rewrite block specifies rules that may rewrite RADIUS
894 messages. It can be used to add, remove and modify specific
895 attributes from messages received from and sent to clients and
896 servers. As discussed in the client and server block
897 descriptions, a client or server block may reference a
898 particular rewrite block by name. There are however also the
899 special rewrite block names <literal>default</literal>,
900 <literal>defaultClient</literal> and
901 <literal>defaultServer</literal> which are used as defaults if
902 the client or server block does not reference a block. Also note
903 that a rewrite block must be defined before the client or server
904 block that would use it. If you want the same rewrite rules for
905 input from all clients and servers, you need just a single
906 rewrite block named <literal>default</literal>, and the client
907 and servers need not refer to it. If you want all clients to use
908 one config, and all servers to use another, then you would be
909 fine only defining two rewrite blocks named
910 <literal>defaultClient</literal> and
911 <literal>defaultServer</literal>. Note that these defaults are
912 only used for rewrite on input. No rewriting is done on output
913 unless explicitly specifed using the
914 <literal>rewriteOut</literal> option.
917 The available rewrite block options are
918 <literal>addAttribute</literal>,
919 <literal>addVendorAttribute</literal>,
920 <literal>removeAttribute</literal>,
921 <literal>removeVendorAttribute</literal> and
922 <literal>modifyAttribute</literal>. They can all be specified
923 none, one or multiple times.
926 <literal>addAttribute</literal> is used to add attributes to a
927 message. The option value must be on the form
928 <literal>attribute:value</literal> where attribute is a
929 numerical value specifying the attribute. Simliarly, the
930 <literal>addVendorAttribute</literal> is used to specify a
931 vendor attribute to be added. The option value must be on the
932 form <literal>vendor:subattribute:value</literal>, where vendor
933 and subattribute are numerical values.
936 The <literal>removeAttribute</literal> option is used to specify
937 an attribute that should be removed from received messages. The
938 option value must be a numerical value specifying which
939 attribute is to be removed. Similarly,
940 <literal>removeVendorAttribute</literal> is used to specify a
941 vendor attribute that is to be removed. The value can be a
942 numerical value for removing all attributes from a given vendor,
943 or on the form <literal>vendor:subattribute</literal>, where
944 vendor and subattribute are numerical values, for removing a
945 specific subattribute for a specific vendor.
948 <literal>modifyAttribute</literal> is used to specify
949 modification of attributes. The value must be on the form
950 <literal>attribute:/regexpmatch/replacement/</literal> where
951 attribute is a numerical attribute type, regexpmatch is regexp
952 matching rule and replacement specifies how to replace the
953 matching regexp. Example usage:
956 modifyAttribute 1:/^(.*)@local$/\1@example.com/
962 <title>See Also</title>
965 <refentrytitle>radsecproxy</refentrytitle><manvolnum>1</manvolnum>
967 <ulink url="http://tools.ietf.org/html/draft-ietf-radext-radsec">
968 <citetitle>RadSec internet draft</citetitle>