realms don't go into "server" sections
[freeradius.git] / raddb / radrelay.conf.in
1 # -*- text -*-
2 ##
3 ## radrelay.conf  -- FreeRADIUS server configuration file.
4 ##
5 ##      Use with: radiusd -n radrelay
6 ##
7 ##      http://www.freeradius.org/
8 ##      $Id$
9 ##
10
11 ######################################################################
12 #
13 #       This file is a sample configuration that replaces the old
14 #       "radrelay" program.  It is a *minimal* configuration that
15 #       does little more than read the detail file, and proxy the
16 #       packets to a home server.  If you need it to do more than
17 #       just replace radrelay, you will need to add additional
18 #       configuration.
19 #
20 #       See raddb/sites-available/copy-acct-to-home-server for a
21 #       more complete example.  That example is intended to be run
22 #       as part of a larger radius configuration, where the server
23 #       also listens on ports 1812, etc.  The example given here
24 #       is a minimal example that has ONLY radrelay functionality.
25 #
26 #       See radiusd.conf for a complete description of the configuration
27 #       parameters used here.
28 #
29 ######################################################################
30
31 prefix = @prefix@
32 exec_prefix = @exec_prefix@
33 sysconfdir = @sysconfdir@
34 localstatedir = @localstatedir@
35 sbindir = @sbindir@
36 logdir = @logdir@
37 raddbdir = @raddbdir@
38 radacctdir = @radacctdir@
39
40 #
41 #  name of the running server.  See also the "-n" command-line option.
42 #
43 name = radrelay
44
45 #
46 #  Generic configuration
47 #
48 confdir = ${raddbdir}
49 run_dir = ${localstatedir}/run/${name}
50 libdir = @libdir@
51 pidfile = ${run_dir}/${name}.pid
52
53 #
54 #  Request handling configuration
55 #
56 max_request_time = 30
57 cleanup_delay = 5
58 max_requests = 65536
59
60 #
61 #  Logging section.
62 #
63 log {
64         destination = files
65         file = ${logdir}/${name}.log
66 }
67
68 #
69 #  Security configuration
70 #
71 security {
72         max_attributes = 200
73
74         # reject_delay && status_server don't apply when we are
75         # only reading accounting packets from the detail file
76
77 @openssl_version_check_config@
78 }
79
80 #
81 #  If you need more modules, add them here.
82 #
83 modules {
84         $INCLUDE ${confdir}/mods-enabled/always
85 }
86
87 #
88 #  If you need to instantiate modules, add them here.
89 #
90 instantiate {
91 }
92
93 #
94 #  Configuration of home servers, etc.
95 #
96 proxy_requests  = yes
97
98 #
99 #  See proxy.conf for additional home server configuration.
100 #
101 home_server home1 {
102         type = acct
103
104         #
105         #  This directive replaces the "-r" command-line option
106         #  in radrelay
107         #
108         ipaddr = 192.0.2.20
109
110         port = 1812
111
112         #
113         #  This directive replaces the "-i" command-line option
114         #  in radrelay
115         #
116 #       src_ipaddr = 192.0.2.1
117
118         #
119         #  This directive replaces the "-s", "-S", and "-n" command-line
120         #  options in radrelay
121         #
122         secret = testing123
123 }
124
125 #
126 #  List one or more home servers here for fail-over, load-balancing, etc.
127 #
128 home_server_pool radrelay {
129         type = fail-over
130         home_server = home1
131 }
132
133 #
134 #  A dummy realm.
135 #
136 realm radrelay {
137         acct_pool = radrelay
138 }
139
140 server radrelay {
141         #
142         #  Read the detail file.
143         #
144         listen {
145                 type = detail
146
147                 #
148                 #  The filename here should be the same as the one used by the
149                 #  main radiusd program.  It writes the file using the "detail"
150                 #  module (see raddb/modules/detail).
151                 #
152                 filename = ${radacctdir}/detail
153                 load_factor = 90
154         }
155
156         #
157         #  See also raddb/sites-available/copy-acct-to-home-server
158         #  for additional description.
159         #
160         preacct {
161                 #
162                 #  Proxy the packet using the given realm.
163                 #  Note that we do not use the realm for anything else such
164                 #  as prefix/suffix stripping or comparisons.
165                 #
166                 update control {
167                         Proxy-To-Realm := "radrelay"
168                 }
169         }
170 }