# -*- 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@
raddbdir = @raddbdir@
radacctdir = @radacctdir@
+#
+# name of the running server. See also the "-n" command-line option.
+name = radiusd
+
# Location of config and logfiles.
confdir = ${raddbdir}
-run_dir = ${localstatedir}/run/radiusd
+modconfdir = ${confdir}/mods-config
+certdir = ${confdir}/certs
+cadir = ${confdir}/certs
+run_dir = ${localstatedir}/run/${name}
# Should likely be ${localstatedir}/lib/radiusd
db_dir = ${raddbdir}
#
# e.g.: kill -HUP `cat /var/run/radiusd/radiusd.pid`
#
-pidfile = ${run_dir}/radiusd.pid
+pidfile = ${run_dir}/${name}.pid
-# chroot: directory where the server does "chroot".
#
-# The chroot is done very early in the process of starting the server.
-# After the chroot has been performed it switches to the "user" listed
-# below (which MUST be specified). If "group" is specified, it switchs
-# to that group, too. Any other groups listed for the specified "user"
-# in "/etc/group" are also added as part of this process.
+# 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.
#
-# The current working directory (chdir / cd) is left *outside* of the
-# chroot until all of the modules have been initialized. This allows
-# the "raddb" directory to be left outside of the chroot. Once the
-# modules have been initialized, it does a "chdir" to ${logdir}. This
-# means that it should be impossible to break out of the chroot.
+# 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".
#
-# If you are worried about security issues related to this use of chdir,
-# then simply ensure that the "raddb" directory is inside of the chroot,
-# end be sure to do "cd raddb" BEFORE starting the server.
+# You can check for this by doing:
#
-# If the server is statically linked, then the only files that have
-# to exist in the chroot are ${run_dir} and ${logdir}. If you do the
-# "cd raddb" as discussed above, then the "raddb" directory has to be
-# inside of the chroot directory, too.
+# $ grep '\\\\' $(find raddb -type f -print)
#
-#chroot = /path/to/chroot/directory
+correct_escapes = true
-# user/group: The name (or #number) of the user/group to run radiusd as.
+# 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.
#
-# 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.
+# 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
#
-# We STRONGLY recommend that you run the server with as few permissions
-# as possible. That is, if you're not using shadow passwords, the
-# user and group items below should be set to radius'.
+# Standard ${} substitutions are also allowed.
#
-# NOTE that some kernels refuse to setgid(group) when the value of
-# (unsigned)group is above 60000; don't use group nobody on these systems!
+# An example panic action for opening an interactive session in GDB would be:
#
-# On systems with shadow passwords, you might have to set 'group = shadow'
-# for the server to be able to read the shadow password file. If you can
-# authenticate users while in debug mode, but not in daemon mode, it may be
-# that the debugging mode server is running as a user that can read the
-# shadow info, and the user listed below can not.
+#panic_action = "gdb %e %p"
#
-# The server will also try to use "initgroups" to read /etc/groups.
-# It will join all groups where "user" is a member. This can allow
-# for some finer-grained access controls.
+# 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.
#
-#user = radius
-#group = radius
# max_request_time: The maximum time (in seconds) to handle a request.
#
# 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
- #
- type = auth
-
- # Note: "type = proxy" lets you control the source IP used for
- # proxying packets, with some limitations:
- #
- # * Only ONE proxy listener can be defined.
- # * A proxy listener CANNOT be used in a virtual server section.
- # * You should probably set "port = 0".
- # * Any "clients" configuration will be ignored.
-
- # 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).
#
hostname_lookups = no
-# Core dumps are a bad thing. This should only be set to 'yes'
-# if you're debugging a problem with the server.
-#
-# allowed values: {no, yes}
-#
-allow_core_dumps = no
-
-# Regular expressions
-#
-# These items are set at configure time. If they're set to "yes",
-# then setting them to "no" turns off regular expression support.
-#
-# If they're set to "no" at configure time, then setting them to "yes"
-# WILL NOT WORK. It will give you an error.
-#
-regular_expressions = @REGEX@
-extended_expressions = @REGEX_EXTENDED@
-
#
# Logging section. The various "log_*" configuration items
# will eventually be moved here.
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_badpass = no
auth_goodpass = no
+
+ # Log additional text at the end of the "Login OK" messages.
+ # 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
+ # you can put anything you want in them. However, note that
+ # this expansion can be slow, and can negatively impact server
+ # performance.
+ #
+# 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.
# of those attacks
#
security {
+ # chroot: directory where the server does "chroot".
+ #
+ # The chroot is done very early in the process of starting
+ # the server. After the chroot has been performed it
+ # switches to the "user" listed below (which MUST be
+ # specified). If "group" is specified, it switches to that
+ # group, too. Any other groups listed for the specified
+ # "user" in "/etc/group" are also added as part of this
+ # process.
+ #
+ # The current working directory (chdir / cd) is left
+ # *outside* of the chroot until all of the modules have been
+ # initialized. This allows the "raddb" directory to be left
+ # outside of the chroot. Once the modules have been
+ # initialized, it does a "chdir" to ${logdir}. This means
+ # that it should be impossible to break out of the chroot.
+ #
+ # If you are worried about security issues related to this
+ # use of chdir, then simply ensure that the "raddb" directory
+ # is inside of the chroot, end be sure to do "cd raddb"
+ # BEFORE starting the server.
+ #
+ # If the server is statically linked, then the only files
+ # that have to exist in the chroot are ${run_dir} and
+ # ${logdir}. If you do the "cd raddb" as discussed above,
+ # then the "raddb" directory has to be inside of the chroot
+ # directory, too.
+ #
+# chroot = /path/to/chroot/directory
+
+ # user/group: The name (or #number) of the user/group to run radiusd as.
+ #
+ # 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
+ # 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
+ # shadow passwords, the user and group items below should be
+ # set to radius'.
+ #
+ # NOTE that some kernels refuse to setgid(group) when the
+ # value of (unsigned)group is above 60000; don't use group
+ # "nobody" on these systems!
+ #
+ # On systems with shadow passwords, you might have to set
+ # 'group = shadow' for the server to be able to read the
+ # shadow password file. If you can authenticate users while
+ # in debug mode, but not in daemon mode, it may be that the
+ # debugging mode server is running as a user that can read
+ # the shadow info, and the user listed below can not.
+ #
+ # The server will also try to use "initgroups" to read
+ # /etc/groups. It will join all groups where "user" is a
+ # member. This can allow for some finer-grained access
+ # controls.
+ #
+# user = radius
+# group = radius
+
+ # Core dumps are a bad thing. This should only be set to
+ # 'yes' if you're debugging a problem with the server.
+ #
+ # allowed values: {no, yes}
+ #
+ allow_core_dumps = no
+
#
# max_attributes: The maximum number of attributes
# permitted in a RADIUS packet. Packets which have MORE
# 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
# packet. If the server responds, it must be alive, and the
# NAS can start using it for real requests.
#
+ # 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/
-
- # Extensible Authentication Protocol
- #
- # For all EAP related authentications.
- # Now in another file, because it is very large.
- #
- $INCLUDE eap.conf
-
- # Include another file that has the SQL-related configuration.
- # This is another file only because it tends to be big.
- #
- $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
- #$INCLUDE sql/postgresql/counter.conf
-
- #
- # IP addresses managed in an SQL table.
+ # 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 sqlippool.conf
-
- # OTP token support. Not included by default.
- # $INCLUDE otp.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/
+}
######################################################################
#
-# As of 2.0.0, the "authorize", "authenticate", etc. sections
-# are in separate configuration files, per virtual host.
+# Load virtual servers.
#
-######################################################################
+# This next $INCLUDE line loads files in the directory that
+# match the regular expression: /[a-zA-Z0-9_.]+/
+#
+# It allows you to define new virtual servers simply by placing
+# a file into the raddb/sites-enabled/ directory.
+#
+$INCLUDE sites-enabled/
######################################################################
#
-# Include all enabled virtual hosts.
+# All of the other configuration sections like "authorize {}",
+# "authenticate {}", "accounting {}", have been moved to the
+# the file:
#
-# The following directory is searched for files that match
-# the regex:
+# raddb/sites-available/default
#
-# /[a-zA-Z0-9_.]+/
+# This is the "default" virtual server that has the same
+# configuration as in version 1.0.x and 1.1.x. The default
+# installation enables this virtual server. You should
+# edit it to create policies for your local site.
#
-# The files are then included here, just as if they were cut
-# and pasted into this file.
+# For more documentation on virtual servers, see:
#
-# See "sites-enabled/default" for some additional documentation.
+# raddb/sites-available/README
#
-$INCLUDE sites-enabled/
+######################################################################