# -*- text -*-
##
-## radiusd.conf -- FreeRADIUS server configuration file.
+## radiusd.conf -- FreeRADIUS server configuration file - @RADIUSD_VERSION_STRING@
##
## http://www.freeradius.org/
## $Id$
# documented in that "man" page. They are only documented here,
# in the comments.
#
-# As of 2.0.0, FreeRADIUS supports a simple processing language
-# in the "authorize", "authenticate", "accounting", etc. sections.
-# See "man unlang" for details.
+# The "unlang" policy language can be used to create complex
+# if / else policies. See "man unlang" for details.
#
prefix = @prefix@
# Location of config and logfiles.
confdir = ${raddbdir}
+modconfdir = ${confdir}/mods-config
+certdir = ${confdir}/certs
+cadir = ${confdir}/certs
run_dir = ${localstatedir}/run/${name}
# Should likely be ${localstatedir}/lib/radiusd
#
pidfile = ${run_dir}/${name}.pid
+#
+# correct_escapes: use correct backslash escaping
+#
+# Prior to version 3.0.5, the handling of backslashes was a little
+# awkward, i.e. "wrong". In some cases, to get one backslash into
+# a regex, you had to put 4 in the config files.
+#
+# Version 3.0.5 fixes that. However, for backwards compatibility,
+# the new method of escaping is DISABLED BY DEFAULT. This means
+# that upgrading to 3.0.5 won't break your configuration.
+#
+# If you don't have double backslashes (i.e. \\) in your configuration,
+# this won't matter to you. If you do have them, fix that to use only
+# one backslash, and then set "correct_escapes = true".
+#
+# You can check for this by doing:
+#
+# $ grep '\\\\' $(find raddb -type f -print)
+#
+correct_escapes = true
+
+# panic_action: Command to execute if the server dies unexpectedly.
+#
+# FOR PRODUCTION SYSTEMS, ACTIONS SHOULD ALWAYS EXIT.
+# AN INTERACTIVE ACTION MEANS THE SERVER IS NOT RESPONDING TO REQUESTS.
+# AN INTERACTICE ACTION MEANS THE SERVER WILL NOT RESTART.
+#
+# THE SERVER MUST NOT BE ALLOWED EXECUTE UNTRUSTED PANIC ACTION CODE
+# PATTACH CAN BE USED AS AN ATTACK VECTOR.
+#
+# The panic action is a command which will be executed if the server
+# receives a fatal, non user generated signal, i.e. SIGSEGV, SIGBUS,
+# SIGABRT or SIGFPE.
+#
+# This can be used to start an interactive debugging session so
+# that information regarding the current state of the server can
+# be acquired.
+#
+# The following string substitutions are available:
+# - %e The currently executing program e.g. /sbin/radiusd
+# - %p The PID of the currently executing program e.g. 12345
+#
+# Standard ${} substitutions are also allowed.
+#
+# An example panic action for opening an interactive session in GDB would be:
+#
+#panic_action = "gdb %e %p"
+#
+# Again, don't use that on a production system.
+#
+# An example panic action for opening an automated session in GDB would be:
+#
+#panic_action = "gdb -silent -x ${raddbdir}/panic.gdb %e %p 2>&1 | tee ${logdir}/gdb-${name}-%p.log"
+#
+# That command can be used on a production system.
+#
+
# max_request_time: The maximum time (in seconds) to handle a request.
#
# Requests which take more time than this to process may be killed, and
# cached reply.
#
# If this value is set too low, then duplicate requests from the NAS
-# MAY NOT be detected, and will instead be handled as seperate requests.
+# MAY NOT be detected, and will instead be handled as separate requests.
#
# If this value is set too high, then the server will cache too many
# requests, and some new requests may get blocked. (See 'max_requests'.)
#
# Useful range of values: 256 to infinity
#
-max_requests = 1024
-
-# listen: Make the server listen on a particular IP address, and send
-# replies out from that address. This directive is most useful for
-# hosts with multiple IP addresses on one interface.
-#
-# If you want the server to listen on additional addresses, or on
-# additionnal ports, you can use multiple "listen" sections.
-#
-# Each section make the server listen for only one type of packet,
-# therefore authentication and accounting have to be configured in
-# different sections.
-#
-# The server ignore all "listen" section if you are using '-i' and '-p'
-# on the command line.
-#
-listen {
- # Type of packets to listen for.
- # Allowed values are:
- # auth listen for authentication packets
- # acct listen for accounting packets
- # proxy IP to use for sending proxied packets
- # detail Read from the detail file. For examples, see
- # raddb/sites-available/copy-acct-to-home-server
- # status listen for Status-Server packets. For examples,
- # see raddb/sites-available/status
- # coa listen for CoA-Request and Disconnect-Request
- # packets. For examples, see the file
- # raddb/sites-available/coa-server
- #
- type = auth
-
- # Note: "type = proxy" lets you control the source IP used for
- # proxying packets, with some limitations:
- #
- # * A proxy listener CANNOT be used in a virtual server section.
- # * You should probably set "port = 0".
- # * Any "clients" configuration will be ignored.
- #
- # See also proxy.conf, and the "src_ipaddr" configuration entry
- # in the sample "home_server" section. When you specify the
- # source IP address for packets sent to a home server, the
- # proxy listeners are automatically created.
-
- # IP address on which to listen.
- # Allowed values are:
- # dotted quad (1.2.3.4)
- # hostname (radius.example.com)
- # wildcard (*)
- ipaddr = *
-
- # OR, you can use an IPv6 address, but not both
- # at the same time.
-# ipv6addr = :: # any. ::1 == localhost
-
- # Port on which to listen.
- # Allowed values are:
- # integer port number (1812)
- # 0 means "use /etc/services for the proper port"
- port = 0
-
- # Some systems support binding to an interface, in addition
- # to the IP address. This feature isn't strictly necessary,
- # but for sites with many IP addresses on one interface,
- # it's useful to say "listen on all addresses for eth0".
- #
- # If your system does not support this feature, you will
- # get an error if you try to use it.
- #
-# interface = eth0
-
- # Per-socket lists of clients. This is a very useful feature.
- #
- # The name here is a reference to a section elsewhere in
- # radiusd.conf, or clients.conf. Having the name as
- # a reference allows multiple sockets to use the same
- # set of clients.
- #
- # If this configuration is used, then the global list of clients
- # is IGNORED for this "listen" section. Take care configuring
- # this feature, to ensure you don't accidentally disable a
- # client you need.
- #
- # See clients.conf for the configuration of "per_socket_clients".
- #
-# clients = per_socket_clients
-}
-
-# This second "listen" section is for listening on the accounting
-# port, too.
-#
-listen {
- ipaddr = *
-# ipv6addr = ::
- port = 0
- type = acct
-# interface = eth0
-# clients = per_socket_clients
-}
+max_requests = 16384
# hostname_lookups: Log the names of clients or just their IP addresses
# e.g., www.freeradius.org (on) or 206.47.27.232 (off).
destination = files
#
+ # Highlight important messages sent to stderr and stdout.
+ #
+ # Option will be ignored (disabled) if output if TERM is not
+ # an xterm or output is not to a TTY.
+ #
+ colourise = yes
+
+ #
# The logging messages for the server are appended to the
# tail of this file if destination == "files"
#
file = ${logdir}/radius.log
#
- # If this configuration parameter is set, then log messages for
- # a *request* go to this file, rather than to radius.log.
- #
- # i.e. This is a log file per request, once the server has accepted
- # the request as being from a valid client. Messages that are
- # not associated with a request still go to radius.log.
- #
- # Not all log messages in the server core have been updated to use
- # this new internal API. As a result, some messages will still
- # go to radius.log. Please submit patches to fix this behavior.
- #
- # The file name is expanded dynamically. You should ONLY user
- # server-side attributes for the filename (e.g. things you control).
- # Using this feature MAY also slow down the server substantially,
- # especially if you do thinks like SQL calls as part of the
- # expansion of the filename.
- #
- # The name of the log file should use attributes that don't change
- # over the lifetime of a request, such as User-Name,
- # Virtual-Server or Packet-Src-IP-Address. Otherwise, the log
- # messages will be distributed over multiple files.
- #
- # Logging can be enabled for an individual request by a special
- # dynamic expansion macro: %{debug: 1}, where the debug level
- # for this request is set to '1' (or 2, 3, etc.). e.g.
- #
- # ...
- # update control {
- # Tmp-String-0 = "%{debug:1}"
- # }
- # ...
- #
- # The attribute that the value is assigned to is unimportant,
- # and should be a "throw-away" attribute with no side effects.
- #
- #requests = ${logdir}/radiusd-%{%{Virtual-Server}:-DEFAULT}-%Y%m%d.log
-
- #
# Which syslog facility to use, if ${destination} == "syslog"
#
# The exact values permitted here are OS-dependent. You probably
auth_goodpass = no
# Log additional text at the end of the "Login OK" messages.
- # for these to work, the "auth" and "auth_goopass" or "auth_badpass"
+ # for these to work, the "auth" and "auth_goodpass" or "auth_badpass"
# configurations above have to be set to "yes".
#
# The strings below are dynamically expanded, which means that
#
# msg_goodpass = ""
# msg_badpass = ""
+
+ # The message when the user exceeds the Simultaneous-Use limit.
+ #
+ msg_denied = "You are already logged in - access denied"
}
# The program to execute to do concurrency checks.
# If these are commented out, the server will run as the
# user/group that started it. In order to change to a
# different user/group, you MUST be root ( or have root
- # privleges ) to start the server.
+ # privileges ) to start the server.
#
# We STRONGLY recommend that you run the server with as few
# permissions as possible. That is, if you're not using
# rejects will be sent at 'cleanup_delay' time, when the request
# is deleted from the internal cache of requests.
#
+ # As of Version 3.0.5, "reject_delay" has sub-second resolution.
+ # e.g. "reject_delay = 1.4" seconds is possible.
+ #
# Useful ranges: 1 to 5
reject_delay = 1
# See also raddb/sites-available/status
#
status_server = yes
+
+@openssl_version_check_config@
}
# PROXY CONFIGURATION
# CLIENTS CONFIGURATION
#
-# Client configuration is defined in "clients.conf".
+# Client configuration is defined in "clients.conf".
#
# The 'clients.conf' file contains all of the information from the old
min_spare_servers = 3
max_spare_servers = 10
+ # When the server receives a packet, it places it onto an
+ # internal queue, where the worker threads (configured above)
+ # pick it up for processing. The maximum size of that queue
+ # is given here.
+ #
+ # When the queue is full, any new packets will be silently
+ # discarded.
+ #
+ # The most common cause of the queue being full is that the
+ # server is dependent on a slow database, and it has received
+ # a large "spike" of traffic. When that happens, there is
+ # very little you can do other than make sure the server
+ # receives less traffic, or make sure that the database can
+ # handle the load.
+ #
+# max_queue_size = 65536
+
# There may be memory leaks or resource allocation problems with
# the server. If so, set this value to 300 or so, so that the
# resources will be cleaned up periodically.
# '0' is a special value meaning 'infinity', or 'the servers never
# exit'
max_requests_per_server = 0
+
+ # Automatically limit the number of accounting requests.
+ # This configuration item tracks how many requests per second
+ # the server can handle. It does this by tracking the
+ # packets/s received by the server for processing, and
+ # comparing that to the packets/s handled by the child
+ # threads.
+ #
+
+ # If the received PPS is larger than the processed PPS, *and*
+ # the queue is more than half full, then new accounting
+ # requests are probabilistically discarded. This lowers the
+ # number of packets that the server needs to process. Over
+ # time, the server will "catch up" with the traffic.
+ #
+ # Throwing away accounting packets is usually safe and low
+ # impact. The NAS will retransmit them in a few seconds, or
+ # even a few minutes. Vendors should read RFC 5080 Section 2.2.1
+ # to see how accounting packets should be retransmitted. Using
+ # any other method is likely to cause network meltdowns.
+ #
+ auto_limit_acct = no
}
+######################################################################
+#
+# SNMP notifications. Uncomment the following line to enable
+# snmptraps. Note that you MUST also configure the full path
+# to the "snmptrap" command in the "trigger.conf" file.
+#
+#$INCLUDE trigger.conf
+
# MODULE CONFIGURATION
#
# The names and configuration of each module is located in this section.
#
#
- # As of 2.0.5, most of the module configurations are in a
- # sub-directory. Files matching the regex /[a-zA-Z0-9_.]+/
- # are loaded. The modules are initialized ONLY if they are
- # referenced in a processing section, such as authorize,
- # authenticate, accounting, pre/post-proxy, etc.
- #
- $INCLUDE ${confdir}/modules/
-
- # Include another file that has the SQL-related configuration.
- # This is another file only because it tends to be big.
+ # As of 3.0, modules are in mods-enabled/. Files matching
+ # the regex /[a-zA-Z0-9_.]+/ are loaded. The modules are
+ # initialized ONLY if they are referenced in a processing
+ # section, such as authorize, authenticate, accounting,
+ # pre/post-proxy, etc.
#
-# $INCLUDE sql.conf
-
- #
- # This module is an SQL enabled version of the counter module.
- #
- # Rather than maintaining seperate (GDBM) databases of
- # accounting info for each counter, this module uses the data
- # stored in the raddacct table by the sql modules. This
- # module NEVER does any database INSERTs or UPDATEs. It is
- # totally dependent on the SQL module to process Accounting
- # packets.
- #
-# $INCLUDE sql/mysql/counter.conf
-
- #
- # IP addresses managed in an SQL table.
- #
-# $INCLUDE sqlippool.conf
+ $INCLUDE mods-enabled/
}
# Instantiation
# of the following sections, so they can be listed here.
#
# Also, listing modules here ensures that you have control over
-# the order in which they are initalized. If one module needs
+# the order in which they are initialized. If one module needs
# something defined by another module, you can list them in order
# here, and ensure that the configuration will be OK.
#
+# After the modules listed here have been loaded, all of the modules
+# in the "mods-enabled" directory will be loaded. Loading the
+# "mods-enabled" directory means that unlike Version 2, you usually
+# don't need to list modules here.
+#
instantiate {
#
- # Allows the execution of external scripts.
- # The entire command line (and output) must fit into 253 bytes.
- #
- # e.g. Framed-Pool = `%{exec:/bin/echo foo}`
- exec
-
- #
- # The expression module doesn't do authorization,
- # authentication, or accounting. It only does dynamic
- # translation, of the form:
- #
- # Session-Timeout = `%{expr:2 + 3}`
- #
- # So the module needs to be instantiated, but CANNOT be
- # listed in any other section. See 'doc/rlm_expr' for
- # more information.
- #
- expr
-
- #
- # We add the counter module here so that it registers
- # the check-name attribute before any module which sets
+ # We list the counter module here so that it registers
+ # the check_name attribute before any module which sets
# it
# daily
- expiration
- logintime
# subsections here can be thought of as "virtual" modules.
#
# lines, and list "redundant_sql" in the authorize and
# accounting sections.
#
+ # The "virtual" module defined here can also be used with
+ # dynamic expansions, under a few conditions:
+ #
+ # * The section is "redundant", or "load-balance", or
+ # "redundant-load-balance"
+ # * The section contains modules ONLY, and no sub-sections
+ # * all modules in the section are using the same rlm_
+ # driver, e.g. They are all sql, or all ldap, etc.
+ #
+ # When those conditions are satisfied, the server will
+ # automatically register a dynamic expansion, using the
+ # name of the "virtual" module. In the example below,
+ # it will be "redundant_sql". You can then use this expansion
+ # just like any other:
+ #
+ # update reply {
+ # Filter-Id := "%{redundant_sql: ... }"
+ # }
+ #
+ # In this example, the expansion is done via module "sql1",
+ # and if that expansion fails, using module "sql2".
+ #
+ # For best results, configure the "pool" subsection of the
+ # module so that "retry_delay" is non-zero. That will allow
+ # the redundant block to quickly ignore all "down" SQL
+ # databases. If instead we have "retry_delay = 0", then
+ # every time the redundant block is used, the server will try
+ # to open a connection to every "down" database, causing
+ # problems.
+ #
#redundant redundant_sql {
# sql1
# sql2
######################################################################
#
-# Policies that can be applied in multiple places are listed
-# globally. That way, they can be defined once, and referred
-# to multiple times.
+# Policies are virtual modules, similar to those defined in the
+# "instantiate" section above.
+#
+# Defining a policy in one of the policy.d files means that it can be
+# referenced in multiple places as a *name*, rather than as a series of
+# conditions to match, and actions to take.
+#
+# Policies are something like subroutines in a normal language, but
+# they cannot be called recursively. They MUST be defined in order.
+# If policy A calls policy B, then B MUST be defined before A.
#
######################################################################
-$INCLUDE policy.conf
+policy {
+ $INCLUDE policy.d/
+}
######################################################################
#