Typo in rlm_detail config
[freeradius.git] / raddb / radiusd.conf.in
1 ##
2 ## radiusd.conf -- FreeRADIUS server configuration file.
3 ##
4 ##      http://www.freeradius.org/
5 ##
6
7 #
8 #       The location of other config files and
9 #       logfiles are declared in this file
10 #
11 #       Also general configuration for modules can be done
12 #       in this file, it is exported through the API to
13 #       modules that ask for it.
14 #
15
16 # Stuff from autoconf
17 prefix = @prefix@
18 exec_prefix = @exec_prefix@
19 sysconfdir = @sysconfdir@
20 localstatedir = @localstatedir@
21 sbindir = @sbindir@
22 logdir = @logdir@
23 libdir = @libdir@
24 raddbdir = @raddbdir@
25 radacctdir = @radacctdir@
26
27 #
28 #  Location of config and logfiles.
29 #
30 confdir    = ${raddbdir}
31
32 run_dir    = ${localstatedir}/run
33
34 #
35 #  pidfile: Where to place the PID of the RADIUS server.
36 #
37 #  The server may be signalled while it's running by using this
38 #  file.
39 #
40 #  e.g.:  kill -HUP `cat /var/run/radiusd.pid`
41 #
42 pidfile    = ${run_dir}/radiusd.pid
43
44 #
45 #  max_request_time: The maximum time (in seconds) to handle a request.
46 #
47 #  Requests which take more time to process than this are killed, and
48 #  a REJECT message is returned.
49 #
50 max_request_time        = 30
51
52 #
53 #  cleanup_delay: The time to wait (in seconds) before cleaning up
54 #  a reply which was already sent to the NAS.  If it is set too low,
55 #  then duplicate requests from the NAS MAY NOT be detected,
56 #  and will instead be handled as seperate requests.
57 #
58 cleanup_delay           = 5
59
60 #
61 #  max_requests: The maximum number of requests which the server keeps
62 #  track of.  This should be 256 multiplied by the number of clients.
63 #  e.g. With 4 clients, this number should be 1024.
64 #
65 #  If this number is too low, then when the server becomes busy,
66 #  it will not respond to any new requests, until the 'cleanup_delay'
67 #  time has passed, and it has removed the old requests.
68 #
69 #  If this number is set too high, then the server will use a bit more
70 #  memory for no real benefit.
71 #
72 #  If you aren't sure what it should be set to, it's better to set it
73 #  too high than too low.  Setting it to 1000 per client is probably
74 #  the highest it should be.
75 #
76 max_requests            = 1024
77
78 #
79 #  bind_address:  Make the server listen on a particular IP address, and
80 #  send replies out from that address.  This directive is most useful
81 #  for machines with multiple IP addresses on one interface.
82 #
83 #  It can either contain "*", or an IP address, or a fully qualified
84 #  Internet domain name.  The default is "*"
85 #
86 bind_address            = *
87
88 #
89 #  port: Allows you to bind FreeRADIUS to a specific port.
90 #
91 #  The default port that most NAS boxes use is 1645, which is historical.
92 #  RFC 2138 defines 1812 to be the new port.  Many new servers and
93 #  NAS boxes use 1812, which can create interoperability problems.
94 #
95 #  The port is defined here to be 0 so that the server will pick up
96 #  the machine's local configuration for the radius port, as defined
97 #  in /etc/services.
98 #
99 #  If you want to use the default RADIUS port as defined on your server,
100 #  (usually through 'grep radius /etc/services') set this to 0 (zero).
101 #
102 #  A port given on the command-line via '-p' over-rides this one.
103 #
104 port = 0
105
106 #
107 #  Which program to execute check doing concurrency checks.
108 #
109 checkrad   = ${sbindir}/checkrad
110
111 #
112 #  hostname_lookups: Log the names of clients or just their IP addresses
113 #  e.g., www.freeradius.org (on) or 206.47.27.232 (off).
114 #  The default is off because it'd be overall better for the net if people
115 #  had to knowingly turn this feature on, since enabling it means that
116 #  each client request will result in AT LEAST one lookup request to the
117 #  nameserver.
118 #
119 #  Turning hostname lookups off also means that the server won't block
120 #  for 30 seconds, if it sees an IP address which has no name associated
121 #  with it.
122 #
123 # allowed values: {no, yes}
124 #
125 hostname_lookups        = no
126
127 #
128 #  Core dumps are a bad thing.  This should only be set to 'yes'
129 #  if you're debugging a problem with the server.
130 #
131 # allowed values: {no, yes}
132 #
133 allow_core_dumps        = no
134
135 #
136 #  Log the full User-Name attribute, as it was found in the request.
137 #
138 # allowed values: {no, yes}
139 #
140 log_stripped_names      = no
141
142 #
143 #  Log authentication requests to the log file.
144 #
145 # allowed values: {no, yes}
146 #
147 log_auth        = no
148
149 #
150 #  Log passwords with the authentication requests.
151 #
152 # allowed values: {no, yes}
153 #
154 log_auth_pass   = no
155
156 #
157 #  proxy_requests: Turns proxying of RADIUS requests on or off.
158 #
159 #  The server has proxying turned on by default.  If your system is NOT
160 #  set up to proxy requests to another server, then you can turn proxying
161 #  off here.  This will save a small amount of resources on the server.
162 #
163 #  If you have proxying turned off, and your configuration files say
164 #  to proxy a request, then an error message will be logged.
165 #
166 # allowed values: {no, yes}
167 #
168 proxy_requests  = yes
169
170 #######################################################################
171 #
172 #  SNMP configuration
173 #
174 #  NOTE: This part will only work if your radiusd is compiled with SNMP
175 #  support.
176 #
177 #  smux_password: Password used for SMUX registration.
178 #
179 #  Specifies password used when connecting to the SNMP master agent.
180 #  This must match the password as configured on the agent. The OID
181 #  used to register the radius subagent is 1.3.6.1.4.1.3317.1.3.1.
182 #  A sample entry for the ucd-snmp deamon looks like this:
183 #
184 #  smuxpeer .1.3.6.1.4.1.3317.1.3.1 verysecret
185 #
186 #  A sample entry for AIX 4.3 is:
187 #
188 #  smux 1.3.6.1.4.1.3317.1.3.1 verysecret
189 #
190 #  The default password is an empty password.
191 #
192 #smux_password = verysecret
193 #
194 #  snmp_write_access:
195 #
196 #  Controls if write access to the radiusd via SNMP is enabled or not.
197 #  Set this value to yes, if you want to be able to reload radiusd from
198 #  your network management station.
199 #
200 #  For this to work, you also have to make sure that your master agent
201 #  is configured to allow SNMP set requests. For security reasons, this
202 #  setting defaults to no.
203 #
204 # allowed values: {no, yes}
205 #
206 #snmp_write_access = no
207
208 #######################################################################
209 #
210 #  Proxy server configuration
211 #
212 #  This entry controls the servers behaviour towards ALL other servers
213 #  to which it sends proxy requests.
214 #
215 proxy server {
216
217 #
218 #  If the NAS re-sends the request to us, we can immediately re-send
219 #  the proxy request to the end server.  To do so, use 'yes' here.
220 #
221 #  If this is set to 'no', then we send the retries on our own schedule,
222 #  and ignore any duplicate NAS requests.
223 #
224 #  If you want to have the server send proxy retries ONLY when the NAS
225 #  sends it's retries to the server, then set this to 'yes', and
226 #  set the other proxy configuration parameters to 0 (zero).
227 #
228 # allowed values: {no, yes}
229 #
230         synchronous = no
231
232 #
233 #  After sending a proxied request to the end server, we wait
234 #  'retry_delay' seconds for the response.  If we do not receive a response
235 #  from the end server within that time, then the proxy request is sent
236 #  again to the end server.  We then wait another for another retry_delay.
237 #
238 #  If this timeout is set too high, then the NAS *may* give up on the
239 #  request before we send a reply back to it.  Most NAS boxes will give up
240 #  on requests within 30 seconds.
241 #
242 #  If this timeout is set too low, then the end server may not have time
243 #  to finish processing the request, before it receives the retry.  Many
244 #  radius servers can take 2-3 seconds to process a request.
245 #
246         retry_delay = 5
247
248 #
249 #  The number of times we send retry packets to the end server.
250 #  If we send 'retry_count' packets without receiving a response,
251 #  then we give up on that server, and return a rejection
252 #  message to the NAS.
253 #
254         retry_count = 3
255 }
256
257 #######################################################################
258 #
259 #  Thread pool configuration.
260 #
261 #  The thread pool is a long-lived group of threads which
262 #  take turns (round-robin) handling any incoming requests.
263 #
264 #
265 #  You probably want to have a few spare threads around,
266 #  so that high-load situations can be handled immediately.  If you
267 #  don't have any spare threads, then the request handling will
268 #  be delayed while a new thread is created, and added to the pool.
269 #
270 #  You probably don't want too many spare threads around,
271 #  otherwise they'll be sitting there taking up resources, and
272 #  not doing anything productive.
273 #
274 #  The numbers given below should be adequate for most situations.
275 #
276 #
277 thread pool {
278 #
279 #  Number of servers to start initially --- should be a reasonable ballpark
280 #  figure.
281 #
282         start_servers     = 5
283
284 #
285 #  Limit on the total number of servers running.
286 #
287 #  If this limit is ever reached, clients will be LOCKED OUT, so it
288 #  should NOT BE SET TOO LOW.  It is intended mainly as a brake to
289 #  keep a runaway server from taking the system with it as it spirals
290 #  down...
291 #
292         max_servers       = 32
293
294 #
295 #  Server-pool size regulation.  Rather than making you guess how many
296 #  servers you need, FreeRADIUS dynamically adapts to the load it
297 #  sees --- that is, it tries to maintain enough servers to
298 #  handle the current load, plus a few spare servers to handle transient
299 #  load spikes.
300 #
301 #  It does this by periodically checking how many servers are waiting
302 #  for a request.  If there are fewer than min_spare_servers, it creates
303 #  a new spare.  If there are more than max_spare_servers, some of the
304 #  spares die off.  The default values are probably OK for most sites.
305 #
306         min_spare_servers = 3
307         max_spare_servers = 10
308
309 #
310 #  There may be memory leaks or resource allocation problems with
311 #  the server.  If so, set this value to 300 or so, so that the
312 #  resources will be cleaned up periodically.
313 #
314 #  This should only be necessary if there are serious bugs in the
315 #  server which have not yet been fixed.
316 #
317 #  '0' is a special value meaning 'infinity', or 'the servers never exit'
318 #
319         max_requests_per_server = 0
320 }
321
322 #######################################################################
323 #
324 #  Definition of a NAS or a client.
325 #
326 #  The information given here is in ADDITION to the 'clients' file.
327 #
328 #  If this is defined as "client foo" then the hostname/ipaddr "foo"
329 #  will be looked up according to the source IP address of the radius
330 #  rqeuest packet, and the secret here will be used to check the
331 #  integrety of the request.
332 #
333 #  If this is defined as "nas foo" then foo will be looked up first
334 #  as the NAS-IP-Address in the radius request, then as the NAS-Ident
335 #  in the radius request.
336 #
337 #  Normally you'd use "client" unless the request came in through a
338 #  proxy server and you want to define a short name for the NAS
339 #  for logging purposes, or you want to do a "checkrad" back to the
340 #  original NAS and not to the proxy radius server!
341 #
342 #  The "shortname" can be used for logging, and the "vendor",
343 #  "type", "login" and "password" fields are mainly used for checkrad.
344 #
345
346 client 127.0.0.1 {
347         secret          = testing123
348         shortname       = localhost
349 }
350
351 #client some.host.org {
352 #       secret          = testing123
353 #       shortname       = localhost
354 #}
355
356
357 client 10.10.10.10 {
358         # secret and password are mapped through the "secrets" file.
359         secret      = testing123
360         shortname   = liv1
361         vendor      = livingston
362         # Type should extend to the line type, because of the "hole".
363         #Line#/T S Port  SNMP Port
364         #-------------------------
365         #1 PRI   0-22    1-23
366         #2 PRI   24-46   25-47
367         #1 CT1   0-23    1-24
368         #2 CT1   24-47   25-48
369         #1 E1    0-28    1-29
370         #2 E1    30-58   31-59
371         #And C0 is 96 in Radius.
372         type        = pm3-eur # pm3-i23 pm3-ct24 pm3-i30
373         login       = !root
374         password    = someadminpas
375 }
376
377 #######################################################################
378 #
379 #  Configuration for the proxy module.
380 #
381 #  The information given here is in ADDITION to the 'realms' file.
382 #
383 #realm isp2.com {
384 #       type        = radius
385 #       authhost    = radius.isp2.com:1645
386 #       accthost    = radius.isp2.com:1646
387 #       secret      = TheirKey
388 #       nostrip
389 #       utmpfile   += /var/log/radutmp.isp2
390 #       wtmpfile   += /var/log/radwtmp.isp2
391 #       detailfile += /var/log/radacct/isp2/detail
392 #}
393
394 #realm company.com {
395 #       type            = radius
396 #       authhost        = radius.company.com:1600
397 #       accthost        = radius.company.com:1601
398 #       secret          = testing123
399 #}
400
401 #realm bla.com {
402 #       type            = radius
403 #       authhost        = LOCAL
404 #       accthost        = LOCAL
405 #       secret          = testing123
406 #}
407
408 #realm myfakerealm {
409 #      type            = radius
410 #      authhost        = radius.company.com:1600
411 #      accthost        = radius.company.com:1601
412 #      secret          = testing123
413 #      notsuffix
414 #}
415
416
417 modules {
418         pam {
419                 # No config options for this yet
420         }
421         unix {
422                 #
423                 #  Cache /etc/passwd, /etc/shadow, and /etc/group
424                 #
425                 #  The default is to NOT cache them.  However, caching them can
426                 #  speed up system authentications by a substantial amount.
427                 #
428                 # allowed values: {no, yes}
429                 cache           = no
430
431                 #
432                 #  Define the locations of the normal passwd, shadow, and
433                 #  group files.
434                 #
435                 #  'shadow' is commented out by default, because not all
436                 #  systems have shadow passwords.
437                 #
438                 passwd          = /etc/passwd
439                 #       shadow          = /etc/shadow
440                 group           = /etc/group
441         }
442
443 # Uncomment this if you want to use ldap (Auth-Type = LDAP)
444 # Also uncomment it in the authenticate{} block below
445 #       ldap {
446 #               server   = localhost
447 #               login    = "cn=admin,o=My Org,c=US"
448 #               password = mypass
449 #               basedn   = "o=My Org,c=US"
450 #               filter   = "(uid=%u)"
451 #       }
452
453         realm {
454                 # No config options for this yet
455         }
456         preprocess {
457                 # No config options for this yet
458         }
459         files {
460                 usersfile = ${confdir}/users
461                 acctusersfile = ${confdir}/acct_users
462
463                 #
464                 #  If you want to use the old Cistron 'users' file
465                 #  with FreeRADIUS, you should change the next line
466                 #  to 'compat = cistron'.  You can the copy your 'users'
467                 #  file from Cistron.
468                 #
469                 compat = no
470         }
471         detail {
472                 detailfile = %A/%n/detail
473                 detailperm = 0600
474         }
475
476         # This module will add a (probably) unique session id 
477         # to an accounting packet based on the attributes listed
478         # below found in the packet.  see doc/README.rlm_acct_unique
479         acct_unique {
480                 key = "User-Name, Acct-Session-Id, NAS-IP-Address, NAS-Port-Id"
481         }
482
483
484 #
485 #  Configuration for the SQL module.
486 #
487         sql {
488         
489                 # Connect info
490                 server          = "localhost"
491                 login           = "root"
492                 password        = "rootpass"
493                 
494                 # Database table configuration
495                 radius_db       = "radius"
496                 acct_table      = "radacct"
497                 
498                 authcheck_table = "radcheck"
499                 authreply_table = "radreply"
500                 
501                 groupcheck_table = "radgroupcheck"
502                 groupreply_table = "radgroupreply"
503                 
504                 usergroup_table = "usergroup"
505                 
506                 realms_table    = "realms"
507                 realmgroup_table = "realmgroup"
508                 
509                 # Check case on usernames
510                 sensitiveusername = no
511         
512                 # Remove stale session if checkrad does not see a double login
513                 deletestalesessions = yes
514         
515                 # Print all SQL statements when in debug mode (-x)
516                 sqltrace        = no
517         }
518
519 #
520 #  A second instance of the same module, with the name "sql2" to identify it
521 #
522         sql sql2 {
523         
524                 # Connect info
525                 server          = "myothersever"
526                 login           = "root"
527                 password        = "rootpass"
528                 
529                 # Database table configuration
530                 radius_db       = "radius"
531                 acct_table      = "radacct"
532                 
533                 authcheck_table = "radcheck"
534                 authreply_table = "radreply"
535                 
536                 groupcheck_table = "radgroupcheck"
537                 groupreply_table = "radgroupreply"
538                 
539                 usergroup_table = "usergroup"
540                 
541                 realms_table    = "realms"
542                 realmgroup_table = "realmgroup"
543                 
544                 # Check case on usernames
545                 sensitiveusername = no
546         
547                 # Remove stale session if checkrad does not see a double login
548                 deletestalesessions = yes
549         
550                 # Print all SQL statements when in debug mode (-x)
551                 sqltrace        = no
552         }
553
554 #######################################################################
555 #
556 #       Configuration for the example module.  Uncommenting it will cause it
557 #       to get loaded and initialized, but should have no real effect as long
558 #       it is not referencened in one of the autz/auth/preacct/acct sections
559 #
560        example {
561        #
562        #  Boolean variable.
563        #
564        # allowed values: {no, yes}
565        #
566                boolean          = yes
567
568        #
569        #  An integer, of any value.
570        #
571                integer          = 16
572
573        #
574        #  A string.
575        #
576                string           = "This is an example configuration string"
577
578        #
579        # An IP address, either in dotted quad (1.2.3.4) or hostname
580        # (example.com)
581        #
582                ipaddr           = 127.0.0.1
583
584        #
585        # A subsection
586        #
587                mysubsection {
588                        anotherinteger = 1000
589        #
590        # They nest
591        #
592                        deeply nested {
593                                string = "This is a different string"
594                        }
595                }
596        }
597 }
598
599 # Authentication types, Auth-Type = System and PAM for now.
600 authenticate {
601         pam
602         unix
603 # By grouping modules together in an authtype block, that authtype will be
604 # tried on each module in sequence until one returns REJECT or OK. This
605 # allows authentication failover if the first SQL server has crashed, for
606 # example.
607 #       authtype SQL {
608 #               sql
609 #               sql2
610 #       }
611 # Uncomment this if you want to use ldap (Auth-Type = LDAP)
612 #       ldap
613 }
614
615 # Authorization. First preprocess (hints and huntgroups files),
616 # then realms, and finally look in the "users" file.
617 # Make *sure* that 'preprocess' comes before 'realm' if you 
618 # need to setup hints for the remote radius server
619 authorize {
620         preprocess
621         realm
622         files
623 }
624
625 # Pre-accounting. Look for proxy realm, first with the @suffix rule, then the
626 # acct_users file, then preprocess (hints file).
627 preacct {
628         realm
629         files
630         preprocess
631 }
632
633 # Accounting. Log to detail file, and to the radwtmp file.
634 accounting {
635         #acct_unique
636         detail
637         unix
638 }