1 ######################################################################
3 # As of 2.0.0, FreeRADIUS supports virtual hosts using the
4 # "server" section, and configuration directives.
6 # Virtual hosts should be put into the "sites-available"
7 # directory. Soft links should be created in the "sites-enabled"
8 # directory to these files. This is done in a normal installation.
10 # If you are using 802.1X (EAP) authentication, please see also
11 # the "inner-tunnel" virtual server. You wll likely have to edit
12 # that, too, for authentication to work.
16 ######################################################################
18 # Read "man radiusd" before editing this file. See the section
19 # titled DEBUGGING. It outlines a method where you can quickly
20 # obtain the configuration you want, without running into
21 # trouble. See also "man unlang", which documents the format
24 # This configuration is designed to work in the widest possible
25 # set of circumstances, with the widest possible number of
26 # authentication methods. This means that in general, you should
27 # need to make very few changes to this file.
29 # The best way to configure the server for your local system
30 # is to CAREFULLY edit this file. Most attempts to make large
31 # edits to this file will BREAK THE SERVER. Any edits should
32 # be small, and tested by running the server with "radiusd -X".
33 # Once the edits have been verified to work, save a copy of these
34 # configuration files somewhere. (e.g. as a "tar" file). Then,
35 # make more edits, and test, as above.
37 # There are many "commented out" references to modules such
38 # as ldap, sql, etc. These references serve as place-holders.
39 # If you need the functionality of that module, then configure
40 # it in radiusd.conf, and un-comment the references to it in
41 # this file. In most cases, those small changes will result
42 # in the server being able to connect to the DB, and to
45 ######################################################################
49 # If you want the server to listen on additional addresses, or on
50 # additionnal ports, you can use multiple "listen" sections.
52 # Each section make the server listen for only one type of packet,
53 # therefore authentication and accounting have to be configured in
56 # The server ignore all "listen" section if you are using '-i' and '-p'
57 # on the command line.
60 # Type of packets to listen for.
62 # auth listen for authentication packets
63 # acct listen for accounting packets
64 # proxy IP to use for sending proxied packets
65 # detail Read from the detail file. For examples, see
66 # raddb/sites-available/copy-acct-to-home-server
67 # status listen for Status-Server packets. For examples,
68 # see raddb/sites-available/status
69 # coa listen for CoA-Request and Disconnect-Request
70 # packets. For examples, see the file
71 # raddb/sites-available/coa-server
75 # Note: "type = proxy" lets you control the source IP used for
76 # proxying packets, with some limitations:
78 # * A proxy listener CANNOT be used in a virtual server section.
79 # * You should probably set "port = 0".
80 # * Any "clients" configuration will be ignored.
82 # See also proxy.conf, and the "src_ipaddr" configuration entry
83 # in the sample "home_server" section. When you specify the
84 # source IP address for packets sent to a home server, the
85 # proxy listeners are automatically created.
87 # IP address on which to listen.
89 # dotted quad (1.2.3.4)
90 # hostname (radius.example.com)
94 # OR, you can use an IPv6 address, but not both
96 # ipv6addr = :: # any. ::1 == localhost
98 # Port on which to listen.
100 # integer port number (1812)
101 # 0 means "use /etc/services for the proper port"
104 # Some systems support binding to an interface, in addition
105 # to the IP address. This feature isn't strictly necessary,
106 # but for sites with many IP addresses on one interface,
107 # it's useful to say "listen on all addresses for eth0".
109 # If your system does not support this feature, you will
110 # get an error if you try to use it.
114 # Per-socket lists of clients. This is a very useful feature.
116 # The name here is a reference to a section elsewhere in
117 # radiusd.conf, or clients.conf. Having the name as
118 # a reference allows multiple sockets to use the same
121 # If this configuration is used, then the global list of clients
122 # is IGNORED for this "listen" section. Take care configuring
123 # this feature, to ensure you don't accidentally disable a
126 # See clients.conf for the configuration of "per_socket_clients".
128 # clients = per_socket_clients
131 # Connection limiting for sockets with "proto = tcp".
133 # This section is ignored for other kinds of sockets.
137 # Limit the number of simultaneous TCP connections to the socket
140 # Setting this to 0 means "no limit"
143 # The per-socket "max_requests" option does not exist.
146 # The lifetime, in seconds, of a TCP connection. After
147 # this lifetime, the connection will be closed.
149 # Setting this to 0 means "forever".
153 # The idle timeout, in seconds, of a TCP connection.
154 # If no packets have been received over the connection for
155 # this time, the connection will be closed.
157 # Setting this to 0 means "no timeout".
159 # We STRONGLY RECOMMEND that you set an idle timeout.
166 # This second "listen" section is for listening on the accounting
175 # clients = per_socket_clients
177 # The number of packets received can be rate limited via the
178 # "max_pps" configuration item. When it is set, the server
179 # tracks the total number of packets received in the previous
180 # second. If the count is greater than "max_pps", then the
181 # new packet is silently discarded. This helps the server
182 # deal with overload situations.
184 # The packets/s counter is tracked in a sliding window. This
185 # means that the pps calculation is done for the second
186 # before the current packet was received. NOT for the current
187 # wall-clock second, and NOT for the previous wall-clock second.
189 # Useful values are 0 (no limit), or 100 to 10000.
190 # Values lower than 100 will likely cause the server to ignore
191 # normal traffic. Few systems are capable of handling more than
194 # It is most useful for accounting systems. Set it to 50%
195 # more than the normal accounting load, and you can be sure that
196 # the server will never get overloaded
201 # Authorization. First preprocess (hints and huntgroups files),
202 # then realms, and finally look in the "users" file.
204 # Any changes made here should also be made to the "inner-tunnel"
207 # The order of the realm modules will determine the order that
208 # we try to find a matching realm.
210 # Make *sure* that 'preprocess' comes before any realm if you
211 # need to setup hints for the remote radius server
214 # Take a User-Name, and perform some checks on it, for spaces and other
215 # invalid characters. If the User-Name appears invalid, reject the
218 # See policy.d/filter for the definition of the filter_username policy.
223 # The preprocess module takes care of sanitizing some bizarre
224 # attributes in the request, and turning them into attributes
225 # which are more standard.
227 # It takes care of processing the 'raddb/hints' and the
228 # 'raddb/huntgroups' files.
231 # If you intend to use CUI and you require that the Operator-Name
232 # be set for CUI generation and you want to generate CUI also
233 # for your local clients then uncomment the operator-name
234 # below and set the operator-name for your clients in clients.conf
238 # If you want to generate CUI for some clients that do not
239 # send proper CUI requiests, then uncomment the
240 # cui below and set "add-cui = yes" for these clients in clients.conf
244 # If you want to have a log of authentication requests,
245 # un-comment the following line, and the 'detail auth_log'
250 # The chap module will set 'Auth-Type := CHAP' if we are
251 # handling a CHAP request and Auth-Type has not already been set
255 # If the users are logging in with an MS-CHAP-Challenge
256 # attribute for authentication, the mschap module will find
257 # the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
258 # to the request, which will cause the server to then use
259 # the mschap module for authentication.
263 # If you have a Cisco SIP server authenticating against
264 # FreeRADIUS, uncomment the following line, and the 'digest'
265 # line in the 'authenticate' section.
269 # The WiMAX specification says that the Calling-Station-Id
270 # is 6 octets of the MAC. This definition conflicts with
271 # RFC 3580, and all common RADIUS practices. Un-commenting
272 # the "wimax" module here means that it will fix the
273 # Calling-Station-Id attribute to the normal format as
274 # specified in RFC 3580 Section 3.21
278 # Look for IPASS style 'realm/', and if not found, look for
279 # '@realm', and decide whether or not to proxy, based on
284 # If you are using multiple kinds of realms, you probably
285 # want to set "ignore_null = yes" for all of them.
286 # Otherwise, when the first style of realm doesn't match,
287 # the other styles won't be checked.
293 # This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
296 # It also sets the EAP-Type attribute in the request
297 # attribute list to the EAP type from the packet.
299 # As of 2.0, the EAP module returns "ok" in the authorize stage
300 # for TTLS and PEAP. In 1.x, it never returned "ok" here, so
301 # this change is compatible with older configurations.
303 # The example below uses module failover to avoid querying all
304 # of the following modules if the EAP module returns "ok".
305 # Therefore, your LDAP and/or SQL servers will not be queried
306 # for the many packets that go back and forth to set up TTLS
307 # or PEAP. The load on those servers will therefore be reduced.
314 # Pull crypt'd passwords from /etc/passwd or /etc/shadow,
315 # using the system API's to get the password. If you want
316 # to read /etc/passwd or /etc/shadow directly, see the
317 # passwd module in radiusd.conf.
322 # Read the 'users' file
326 # Look in an SQL database. The schema of the database
327 # is meant to mirror the "users" file.
329 # See "Authorization Queries" in sql.conf
333 # If you are using /etc/smbpasswd, and are also doing
334 # mschap authentication, the un-comment this line, and
335 # configure the 'etc_smbpasswd' module, above.
339 # The ldap module will set Auth-Type to LDAP if it has not
344 # Enforce daily limits on time spent logged in.
348 # Use the checkval module
355 # If no other module has claimed responsibility for
356 # authentication, then try to use PAP. This allows the
357 # other modules listed above to add a "known good" password
358 # to the request, and to do nothing else. The PAP module
359 # will then see that password, and use it to do PAP
362 # This module should be listed last, so that the other modules
363 # get a chance to set Auth-Type for themselves.
368 # If "status_server = yes", then Status-Server messages are passed
369 # through the following section, and ONLY the following section.
370 # This permits you to do DB queries, for example. If the modules
371 # listed here return "fail", then NO response is sent.
373 # Autz-Type Status-Server {
382 # This section lists which modules are available for authentication.
383 # Note that it does NOT mean 'try each module in order'. It means
384 # that a module from the 'authorize' section adds a configuration
385 # attribute 'Auth-Type := FOO'. That authentication type is then
386 # used to pick the apropriate module from the list below.
389 # In general, you SHOULD NOT set the Auth-Type attribute. The server
390 # will figure it out on its own, and will do the right thing. The
391 # most common side effect of erroneously setting the Auth-Type
392 # attribute is that one authentication method will work, but the
395 # The common reasons to set the Auth-Type attribute by hand
396 # is to either forcibly reject the user (Auth-Type := Reject),
397 # or to or forcibly accept the user (Auth-Type := Accept).
399 # Note that Auth-Type := Accept will NOT work with EAP.
401 # Please do not put "unlang" configurations into the "authenticate"
402 # section. Put them in the "post-auth" section instead. That's what
403 # the post-auth section is for.
407 # PAP authentication, when a back-end database listed
408 # in the 'authorize' section supplies a password. The
409 # password can be clear-text, or encrypted.
415 # Most people want CHAP authentication
416 # A back-end database listed in the 'authorize' section
417 # MUST supply a CLEAR TEXT password. Encrypted passwords
424 # MSCHAP authentication.
430 # If you have a Cisco SIP server authenticating against
431 # FreeRADIUS, uncomment the following line, and the 'digest'
432 # line in the 'authorize' section.
436 # Pluggable Authentication Modules.
440 # See 'man getpwent' for information on how the 'unix'
441 # module checks the users password. Note that packets
442 # containing CHAP-Password attributes CANNOT be authenticated
443 # against /etc/passwd! See the FAQ for details.
445 # For normal "crypt" authentication, the "pap" module should
446 # be used instead of the "unix" module. The "unix" module should
447 # be used for authentication ONLY for compatibility with legacy
448 # FreeRADIUS configurations.
452 # Uncomment it if you want to use ldap for authentication
454 # Note that this means "check plain-text password against
455 # the ldap database", which means that EAP won't work,
456 # as it does not supply a plain-text password.
462 # Allow EAP authentication.
466 # The older configurations sent a number of attributes in
467 # Access-Challenge packets, which wasn't strictly correct.
468 # If you want to filter out these attributes, uncomment
469 # the following lines.
475 # if (handled && (Response-Packet-Type == Access-Challenge)) {
476 # attr_filter.access_challenge.post-auth
477 # handled # override the "updated" code from attr_filter
484 # Pre-accounting. Decide which accounting type to use.
490 # Session start times are *implied* in RADIUS.
491 # The NAS never sends a "start time". Instead, it sends
492 # a start packet, *possibly* with an Acct-Delay-Time.
493 # The server is supposed to conclude that the start time
494 # was "Acct-Delay-Time" seconds in the past.
496 # The code below creates an explicit start time, which can
497 # then be used in other modules. It will be *mostly* correct.
498 # Any errors are due to the 1-second resolution of RADIUS,
499 # and the possibility that the time on the NAS may be off.
501 # The start time is: NOW - delay - session_length
505 # FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
510 # Ensure that we have a semi-unique identifier for every
511 # request, and many NAS boxes are broken.
515 # Look for IPASS-style 'realm/', and if not found, look for
516 # '@realm', and decide whether or not to proxy, based on
519 # Accounting requests are generally proxied to the same
520 # home server as authentication requests.
526 # Read the 'acct_users' file
531 # Accounting. Log the accounting data.
534 # Update accounting packet by adding the CUI attribute
535 # recorded from the corresponding Access-Accept
536 # use it only if your NAS boxes do not support CUI themselves
539 # Create a 'detail'ed log of the packets.
540 # Note that accounting requests which are proxied
541 # are also logged in the detail file.
545 # Update the wtmp file
547 # If you don't use "radlast", you can delete this line.
551 # For Simultaneous-Use tracking.
553 # Due to packet losses in the network, the data here
554 # may be incorrect. There is little we can do about it.
558 # Return an address to the IP Pool when we see a stop record.
562 # Log traffic to an SQL database.
564 # See "Accounting queries" in sql.conf
568 # If you receive stop packets with zero session length,
569 # they will NOT be logged in the database. The SQL module
570 # will print a message (only in debugging mode), and will
573 # You can ignore these packets by uncommenting the following
574 # three lines. Otherwise, the server will not respond to the
575 # accounting request, and the NAS will retransmit.
582 # Instead of sending the query to the SQL server,
583 # write it into a log file.
587 # Cisco VoIP specific bulk accounting
590 # For Exec-Program and Exec-Program-Wait
593 # Filter attributes from the accounting response.
594 attr_filter.accounting_response
597 # See "Autz-Type Status-Server" for how this works.
599 # Acct-Type Status-Server {
605 # Session database, used for checking Simultaneous-Use. Either the radutmp
606 # or rlm_sql module can handle this.
607 # The rlm_sql module is *much* faster
612 # See "Simultaneous Use Checking Queries" in sql.conf
617 # Post-Authentication
618 # Once we KNOW that the user has been authenticated, there are
619 # additional steps we can take.
621 # Get an address from the IP Pool.
625 # If you want to have a log of authentication replies,
626 # un-comment the following line, and the 'detail reply_log'
631 # After authenticating the user, do another SQL query.
633 # See "Authentication Logging Queries" in sql.conf
637 # Instead of sending the query to the SQL server,
638 # write it into a log file.
643 # Un-comment the following if you have set
644 # 'edir_account_policy_check = yes' in the ldap module sub-section of
645 # the 'modules' section.
649 # For Exec-Program and Exec-Program-Wait
653 # Calculate the various WiMAX keys. In order for this to work,
654 # you will need to define the WiMAX NAI, usually via
657 # WiMAX-MN-NAI = "%{User-Name}"
660 # If you want various keys to be calculated, you will need to
661 # update the reply with "template" values. The module will see
662 # this, and replace the template values with the correct ones
663 # taken from the cryptographic calculations. e.g.
666 # WiMAX-FA-RK-Key = 0x00
667 # WiMAX-MSK = "%{EAP-MSK}"
670 # You may want to delete the MS-MPPE-*-Keys from the reply,
671 # as some WiMAX clients behave badly when those attributes
672 # are included. See "raddb/modules/wimax", configuration
673 # entry "delete_mppe_keys" for more information.
677 # Create the CUI value and add the attribute to Access-Accept.
678 # Uncomment the line below if *returning* the CUI.
681 # If there is a client certificate (EAP-TLS, sometimes PEAP
682 # and TTLS), then some attributes are filled out after the
683 # certificate verification has been performed. These fields
684 # MAY be available during the authentication, or they may be
685 # available only in the "post-auth" section.
687 # The first set of attributes contains information about the
688 # issuing certificate which is being used. The second
689 # contains information about the client certificate (if
693 # Reply-Message += "%{TLS-Cert-Serial}"
694 # Reply-Message += "%{TLS-Cert-Expiration}"
695 # Reply-Message += "%{TLS-Cert-Subject}"
696 # Reply-Message += "%{TLS-Cert-Issuer}"
697 # Reply-Message += "%{TLS-Cert-Common-Name}"
698 # Reply-Message += "%{TLS-Cert-Subject-Alt-Name-Email}"
700 # Reply-Message += "%{TLS-Client-Cert-Serial}"
701 # Reply-Message += "%{TLS-Client-Cert-Expiration}"
702 # Reply-Message += "%{TLS-Client-Cert-Subject}"
703 # Reply-Message += "%{TLS-Client-Cert-Issuer}"
704 # Reply-Message += "%{TLS-Client-Cert-Common-Name}"
705 # Reply-Message += "%{TLS-Client-Cert-Subject-Alt-Name-Email}"
708 # Insert class attribute (with unique value) into response,
709 # aids matching auth and acct records, and protects against duplicate
710 # Acct-Session-Id. Note: Only works if the NAS has implemented
711 # RFC 2865 behaviour for the class attribute, AND if the NAS
712 # supports long Class attributes. Many older or cheap NASes
713 # only support 16-octet Class attributes.
717 # Remove reply message if the response contains an EAP-Message
718 remove_reply_message_if_eap
721 # Access-Reject packets are sent through the REJECT sub-section of the
724 # Add the ldap module name (or instance) if you have set
725 # 'edir_account_policy_check = yes' in the ldap module configuration
727 Post-Auth-Type REJECT {
728 # log failed authentications in SQL, too.
730 attr_filter.access_reject
732 # Insert EAP-Failure message if the request was
733 # rejected by policy instead of because of an
734 # authentication failure
737 # Remove reply message if the response contains an EAP-Message
738 remove_reply_message_if_eap
743 # When the server decides to proxy a request to a home server,
744 # the proxied request is first passed through the pre-proxy
745 # stage. This stage can re-write the request, or decide to
748 # Only a few modules currently have this method.
753 # Before proxing the request add an Operator-Name attribute identifying
754 # if the operator-name is found for this client.
755 # No need to uncomment this if you have already enabled this in
756 # the authorize section.
759 # The client requests the CUI by sending a CUI attribute
760 # containing one zero byte.
761 # Uncomment the line below if *requesting* the CUI.
764 # Uncomment the following line if you want to change attributes
765 # as defined in the preproxy_users file.
768 # Uncomment the following line if you want to filter requests
769 # sent to remote servers based on the rules defined in the
770 # 'attrs.pre-proxy' file.
771 # attr_filter.pre-proxy
773 # If you want to have a log of packets proxied to a home
774 # server, un-comment the following line, and the
775 # 'detail pre_proxy_log' section, above.
780 # When the server receives a reply to a request it proxied
781 # to a home server, the request may be massaged here, in the
786 # If you want to have a log of replies from a home server,
787 # un-comment the following line, and the 'detail post_proxy_log'
793 # Uncomment the following line if you want to filter replies from
794 # remote proxies based on the rules defined in the 'attrs' file.
795 # attr_filter.post-proxy
798 # If you are proxying LEAP, you MUST configure the EAP
799 # module, and you MUST list it here, in the post-proxy
802 # You MUST also use the 'nostrip' option in the 'realm'
803 # configuration. Otherwise, the User-Name attribute
804 # in the proxied request will not match the user name
805 # hidden inside of the EAP packet, and the end server will
806 # reject the EAP request.
811 # If the server tries to proxy a request and fails, then the
812 # request is processed through the modules in this section.
814 # The main use of this section is to permit robust proxying
815 # of accounting packets. The server can be configured to
816 # proxy accounting packets as part of normal processing.
817 # Then, if the home server goes down, accounting packets can
818 # be logged to a local "detail" file, for processing with
819 # radrelay. When the home server comes back up, radrelay
820 # will read the detail file, and send the packets to the
823 # With this configuration, the server always responds to
824 # Accounting-Requests from the NAS, but only writes
825 # accounting packets to disk if the home server is down.
827 # Post-Proxy-Type Fail {