Rename "ping" check to "status" check. This means existing
[freeradius.git] / raddb / proxy.conf
1 #
2 # proxy.conf - proxy radius and realm configuration directives
3 #
4 # This file is included by default.  To disable it, you will need
5 # to modify the PROXY CONFIGURATION section of "radiusd.conf".
6 #
7 #######################################################################
8 #
9 #  Proxy server configuration
10 #
11 #  This entry controls the servers behaviour towards ALL other servers
12 #  to which it sends proxy requests.
13 #
14 proxy server {
15         #
16         #  Note that as of 2.0, the "synchronous", "retry_delay",
17         #  "retry_count", and "dead_time" have all been deprecated.
18         #  For backwards compatibility, they are are still accepted
19         #  by the server, but they ONLY apply to the old-style realm
20         #  configuration.  i.e. realms with "authhost" and/or "accthost"
21         #  entries.
22         #
23         #  i.e. "retry_delay" and "retry_count" have been replaced
24         #  with per-home-server configuration.  See the "home_server"
25         #  example below for details.
26         #
27         #  i.e. "dead_time" has been replaced with a per-home-server
28         #  "revive_interval".  We strongly recommend that this not
29         #  be used, however.  The new method is much better.
30
31         #
32         #  In 2.0, the server is always "synchronous", and setting
33         #  "synchronous = no" is impossible.  This simplifies the
34         #  server and increases the stability of the network.
35         #
36         #  If you need to set "synchronous = no", please send a
37         #  message to the list <freeradius-users@lists.freeradius.org>
38         #  explaining why this feature is vital for your network.
39
40         #
41         #  If a realm exists, but there are no live home servers for
42         #  it, we can fall back to using the "DEFAULT" realm.  This is
43         #  most useful for accounting, where the server can proxy
44         #  accounting requests to home servers, but if they're down,
45         #  use a DEFAULT realm that is LOCAL (i.e. accthost = LOCAL),
46         #  and then store the packets in the "detail" file.  That data
47         #  can be later proxied to the home servers by radrelay, when
48         #  those home servers come back up again.       
49
50         #  Setting this to "yes" may have issues for authentication.
51         #  i.e. If you are proxying for two different ISP's, and then
52         #  act as a general dial-up for Gric.  If one of the first two
53         #  ISP's has their RADIUS server go down, you do NOT want to
54         #  proxy those requests to GRIC.  Instead, you probably want
55         #  to just drop the requests on the floor.  In that case, set
56         #  this value to 'no'.
57         #
58         #  allowed values: {yes, no}
59         #
60         default_fallback = no
61
62 }
63
64 #######################################################################
65 #
66 #  Configuration for the proxy realms.
67 #
68 #  As of 2.0. the old-style "realms" file is deprecated, and is not
69 #  used by FreeRADIUS.
70 #
71 #  As of 2.0, the "realm" configuration has changed.  Instead of
72 #  specifying "authhost" and "accthost" in a realm section, the home
73 #  servers are specified seperately in a "home_server" section.  For
74 #  backwards compatibility, you can still use the "authhost" and
75 #  "accthost" directives.  If you only have one home server for a
76 #  realm, it is easier to use the old-style configuration.
77 #
78 #  However, if you have multiple servers for a realm, we STRONGLY
79 #  suggest moving to the new-style configuration.
80 #
81 #
82 #  Load-balancing and failover between home servers is handled via
83 #  a "server_pool" section.
84 #
85 #  Finally, The "realm" section defines the realm, some options, and
86 #  indicates which server pool should be used for the realm.
87 #
88 #  This change means that simple configurations now require multiple
89 #  ssections to define a realm.  However, complex configurations
90 #  are much simpler than before, as multiple realms can share the same
91 #  server pool.
92 #
93 #  That is, realms point to server pools, and server pools point to
94 #  home servers.  Multiple realms can point to one server pool.  One
95 #  server pool can point to multiple home servers.  Each home server
96 #  can appear in one or more pools.
97 #
98
99 ######################################################################
100 #
101 #  This section defines a "Home Server" which is another RADIUS
102 #  server that gets sent proxied requests.  In earlier versions
103 #  of FreeRADIUS, home servers were defined in "realm" sections,
104 #  which was awkward.  In 2.0, they have been made independent
105 #  from realms, which is better for a number of reasons.
106 #
107 home_server localhost {
108         #
109         #  Home servers can be sent Access-Request packets
110         #  or Accounting-Request packets.
111         #
112         #  Allowed values are:
113         #       auth - send Access-Request packets
114         #       acct - send Accounting-Request packets
115         type = auth
116
117         #
118         #  Configure ONE OF the following three entries:
119         #
120         #       IPv4 address
121         #
122         ipaddr = 127.0.0.1
123
124         #       OR IPv6 address
125         # ipv6addr = ::1
126
127         #       OR hostname, which will do address detection automatically
128         #
129         #       Note that we do NOT recommend using hostnames, because
130         #       it means that the server has to do a DNS lookup to
131         #       determine the IP address of the home server.  If the
132         #       DNS server is slow or unresponsible, it means that
133         #       FreeRADIUS will NOT be able to determine the IP
134         #       address, and will therefore NOT start.
135         #
136         # hostname = localhost
137
138         #
139         #  The port to which packets are sent.
140         #
141         #  Usually 1812 for type "auth", and  1813 for type "acct".
142         #  Older servers may use 1645 and 1646.
143         #
144         port = 1812
145
146         #
147         #  The shared secret use to "encrypt" and "sign" packets between
148         #  FreeRADIUS and the home server.
149         #
150         #  The secret can be any string, up to 8k characters in length.
151         #
152         #  Control codes can be entered vi octal encoding,
153         #       e.g. "\101\102" == "AB"
154         #  Quotation marks can be entered by escaping them,
155         #       e.g. "foo\"bar"
156         #  Spaces or other "special" characters can be entered
157         #  by putting quotes around the string.
158         #       e.g. "foo bar"
159         #            "foo;bar"
160         #
161         secret = testing123
162
163         ############################################################
164         #
165         #  The rest of the configuration items listed here are optional,
166         #  and do not have to appear in every home server definition.
167         #
168         ############################################################
169
170         #
171         #  If the home server doesn't respond to the request within
172         #  this time, this server will consider the request dead, and
173         #  respond to the NAS with an Access-Reject.
174         #
175         #  Useful range of values: 5 to 60
176         response_window = 20
177
178         #
179         #  If the home server does not respond to ANY packets for
180         #  a certain time, consider it dead.  This time period is
181         #  called the "zombie" period, because the server is neither
182         #  alive nor dead.
183         #
184         #  Useful range of values: 20 to 120
185         zombie_period = 40
186
187         ############################################################
188         #
189         #  As of 2.0, FreeRADIUS supports RADIUS layer "status
190         #  checks".  These are used by a proxy server to see if a home
191         #  server is alive.
192         #
193         #  These status packets are sent ONLY if the proxying server
194         #  believes that the home server is dead.  They are NOT sent
195         #  if the proxying server believes that the home server is
196         #  alive.  They are NOT sent if the proxying server is not
197         #  proxying packets.
198         #
199         #  If the home server responds to the status check packet,
200         #  then it is marked alive again, and is returned to use.
201         #
202         ############################################################
203
204         #
205         #  Some home servers do not support status checks via the
206         #  Status-Server packet.  Others may not have a "test" user
207         #  configured that can be used to query the server, to see if
208         #  it is alive.  For those servers, we have NO WAY of knowing
209         #  when it becomes alive again.  Therefore, after the server
210         #  has been marked dead, we wait a period of time, and mark
211         #  it alive again, in the hope that it has come back to
212         #  life.
213         #
214         #  If it has NOT come back to life, then FreeRADIUS will wait
215         #  for "zombie_period" before marking it dead again.  During
216         #  the "zombie_period", ALL AUTHENTICATIONS WILL FAIL, because
217         #  the home server is still dead.  There is NOTHING that can
218         #  be done about this, other than to enable the status checks,
219         #  as documented below.
220         #
221         #  e.g. if "zombie_period" is 40 seconds, and "revive_interval"
222         #  is 300 seconds, the for 40 seconds out of every 340, or about
223         #  10% of the time, all authentications will fail.
224         #
225         #  If the "zombie_period" and "revive_interval" configurations
226         #  are set smaller, than it is possible for up to 50% of
227         #  authentications to fail.
228         #
229         #  As a result, we recommend enabling status checks, and
230         #  we do NOT recommend using "revive_interval".
231         #
232         #  If the "status_check" entry below is not "none", then the
233         #  "revive_interval" entry can be deleted, as it will not be
234         #  used.
235         #
236         #  Useful range of values: 60 to 3600
237         revive_interval = 120
238
239         #
240         #  The proxying server (i.e. this one) can do periodic status
241         #  checks to see if a dead home server has come back alive.
242         #
243         #  If set to "none", then the other configuration items listed
244         #  below are not used, and the "revive_interval" time is used
245         #  instead.
246         #
247         #  If set to "status-server", the Status-Server packets are
248         #  sent.  Many RADIUS servers support Status-Server.  If a
249         #  server does not support it, please contact the server
250         #  vendor and request that they add it.
251         #
252         #  If set to "request", then Access-Request, or Accounting-Request
253         #  packets are sent, depending on the "type" entry above (auth/acct).
254         #  
255         #  Allowed values: none, status-server, request
256         status_check = status-server
257
258         #
259         #  If the home server does not support Status-Server packets,
260         #  then the server can still send Access-Request or
261         #  Accounting-Request packets, with a pre-defined user name.
262         #
263         #  This practice is NOT recommended, as it may potentially let
264         #  users gain network access by using these "test" accounts!
265         #
266         #  If it is used, we recommend that the home server ALWAYS
267         #  respond to these Access-Request status checks with
268         #  Access-Reject.  The status check just needs an answer, it
269         #  does not need an Access-Accept.
270         #
271         #  For Accounting-Request status checks, only the username
272         #  needs to be set.  The rest of the accounting attribute are
273         #  set to default values.  The home server that receives these
274         #  accounting packets SHOULD NOT treat them like normal user
275         #  accounting packets.  i.e It should probably NOT log them to
276         #  a database.
277         #
278         # username = "test_user_please_reject_me"
279         # password = "this is really secret"
280
281         #
282         #  Configure the interval between sending status check packets.
283         #
284         #  Setting it too low increases the probability of spurious
285         #  fail-over and fallback attempts.
286         #
287         #  Useful range of values: 6 to 120
288         check_interval = 30
289
290         #
291         #  Configure the number of status checks in a row that the
292         #  home server needs to respond to before it is marked alive.
293         #
294         #  If you want to mark a home server as alive after a short
295         #  time period of being responsive, it is best to use a small
296         #  "check_interval", and a large value for
297         #  "num_answers_to_alive".  Using a long "check_interval" and
298         #  a small number for "num_answers_to_alive" increases the
299         #  probability of spurious fail-over and fallback attempts.
300         #
301         #  Useful range of values: 3 to 10
302         num_answers_to_alive = 3
303 }
304
305
306 ######################################################################
307 #
308 #  This section defines a pool of home servers that is used
309 #  for fail-over and load-balancing.  In earlier versions of
310 #  FreeRADIUS, fail-over and load-balancing were defined per-realm.
311 #  As a result, if a server had 5 home servers, each of which served
312 #  the same 10 realms, you would need 50 "realm" entries.
313 #
314 #  In version 2.0, you would need 5 "home_server" sections,
315 #  10 'realm" sections, and one "server_pool" section to tie the
316 #  two together.
317 #
318 server_pool my_auth_failover {
319         #
320         #  The type of this pool is either "fail-over" or "load-balance".
321         #
322         #  With "fail-over", the request is sent to the first live
323         #  home server in the list.
324         #
325         #  With "load-balance", the request is load-balanced (randomly)
326         #  between the live home servers.  This is equivalent to the
327         #  old per-realm configuration "round_robin".
328         #
329         type = fail-over
330
331         #
332         #  Next, a list of one or more home servers.  The names
333         #  of the home servers are NOT the hostnames, but the names
334         #  of the sections.  (e.g. home_server foo {...} has name "foo".
335         #
336         home_server = localhost
337
338         #  Additional home servers can be listed.
339         #  There is NO LIMIT to the number of home servers that can
340         #  be listed, though using more than 10 or so will become
341         #  difficult to manage.
342         #
343         # home_server = foo.example.com
344         # home_server = bar.example.com
345         # home_server = baz.example.com
346         # home_server = ...
347 }
348
349 ######################################################################
350 #
351 #
352 #  This section defines a new-style "realm".  Note the in version 2.0,
353 #  there are many fewer configuration items than in 1.x for a realm.
354 #
355 #  Automatic proxying is done via the "realms" module (see "man
356 #  rlm_realm").  To manually proxy the request put this entry in the
357 #  "users" file:
358
359 #
360 #
361 #DEFAULT        Proxy-To-Realm := "realm_name"
362 #
363 #
364 realm example.com {
365         auth_pool = my_auth_failover
366 #       acct_pool = acct
367
368         #
369         #  Normally, when an incoming User-Name is matched against the
370         #  realm, the realm name is "stripped" off, and the "stripped"
371         #  user name is used to perform matches.
372         #
373         #  e.g. User-Name = "bob@example.com" will result in two new
374         #  attributes being created by the "realms" module:
375         #
376         #       Stripped-User-Name = "bob"
377         #       Realm = "example.com"
378         #
379         #  The Stripped-User-Name is then used as a key in the "users"
380         #  file, for example.
381         #
382         #  If you do not want this to happen, uncomment "nostrip" below.
383         #
384         # nostrip
385
386         #  There are no more configuration entries for a realm.
387 }
388
389
390 #
391 #  This is a sample entry for iPass.
392 #  Note that you have to define "ipass_auth_pool" and
393 #  "ipass_acct_pool", along with home_servers for them, too.
394 #
395 #realm IPASS {
396 #       nostrip
397 #
398 #       auth_pool = ipass_auth_pool
399 #       acct_pool = ipass_acct_pool
400 #}
401
402 #
403 #  This realm is used mainly to cancel proxying.  You can have
404 #  the "realm suffix" module configured to proxy all requests for
405 #  a realm, and then later cancel the proxying, based on other
406 #  configuration.
407 #
408 #  For example, you want to terminate PEAP or EAP-TTLS locally,
409 #  you can add the following to the "users" file:
410 #
411 #  DEFAULT EAP-Type == PEAP, Proxy-To-Realm := LOCAL
412 #
413 realm LOCAL {
414         #  If we do not specify a server pool, the realm is LOCAL, and
415         #  requests are not proxied to it.
416 }
417
418 #
419 #  This realm is for requests which don't have an explicit realm
420 #  prefix or suffix.  User names like "bob" will match this one.
421 #
422 #realm NULL {
423 #       type            = radius
424 #       authhost        = radius.company.com:1600
425 #       accthost        = radius.company.com:1601
426 #       secret          = testing123
427 #}
428
429 #
430 #  This realm is for ALL OTHER requests.
431 #
432 #realm DEFAULT {
433 #       type            = radius
434 #       authhost        = radius.company.com:1600
435 #       accthost        = radius.company.com:1601
436 #       secret          = testing123
437 #}
438