1# -*- text -*- 2## 3## radiusd.conf -- FreeRADIUS server configuration file - 3.0.17 4## 5## http://www.freeradius.org/ 6## $Id: 59e59f3ac443e75663333a5b7732664b67c5567d $ 7## 8 9###################################################################### 10# 11# Read "man radiusd" before editing this file. See the section 12# titled DEBUGGING. It outlines a method where you can quickly 13# obtain the configuration you want, without running into 14# trouble. 15# 16# Run the server in debugging mode, and READ the output. 17# 18# $ radiusd -X 19# 20# We cannot emphasize this point strongly enough. The vast 21# majority of problems can be solved by carefully reading the 22# debugging output, which includes warnings about common issues, 23# and suggestions for how they may be fixed. 24# 25# There may be a lot of output, but look carefully for words like: 26# "warning", "error", "reject", or "failure". The messages there 27# will usually be enough to guide you to a solution. 28# 29# If you are going to ask a question on the mailing list, then 30# explain what you are trying to do, and include the output from 31# debugging mode (radiusd -X). Failure to do so means that all 32# of the responses to your question will be people telling you 33# to "post the output of radiusd -X". 34 35###################################################################### 36# 37# The location of other config files and logfiles are declared 38# in this file. 39# 40# Also general configuration for modules can be done in this 41# file, it is exported through the API to modules that ask for 42# it. 43# 44# See "man radiusd.conf" for documentation on the format of this 45# file. Note that the individual configuration items are NOT 46# documented in that "man" page. They are only documented here, 47# in the comments. 48# 49# The "unlang" policy language can be used to create complex 50# if / else policies. See "man unlang" for details. 51# 52 53prefix = /usr 54exec_prefix = /usr 55sysconfdir = /etc 56localstatedir = /var 57sbindir = ${exec_prefix}/sbin 58logdir = /var/log/freeradius 59#raddbdir = /etc/freeradius/3.0 60radacctdir = ${logdir}/radacct 61 62# 63# name of the running server. See also the "-n" command-line option. 64name = freeradius 65 66# Location of config and logfiles. 67#confdir = ${raddbdir} 68modconfdir = ${confdir}/mods-config 69certdir = ${confdir}/certs 70cadir = ${confdir}/certs 71run_dir = ${localstatedir}/run/${name} 72 73# Should likely be ${localstatedir}/lib/radiusd 74#db_dir = ${raddbdir} 75 76# 77# libdir: Where to find the rlm_* modules. 78# 79# This should be automatically set at configuration time. 80# 81# If the server builds and installs, but fails at execution time 82# with an 'undefined symbol' error, then you can use the libdir 83# directive to work around the problem. 84# 85# The cause is usually that a library has been installed on your 86# system in a place where the dynamic linker CANNOT find it. When 87# executing as root (or another user), your personal environment MAY 88# be set up to allow the dynamic linker to find the library. When 89# executing as a daemon, FreeRADIUS MAY NOT have the same 90# personalized configuration. 91# 92# To work around the problem, find out which library contains that symbol, 93# and add the directory containing that library to the end of 'libdir', 94# with a colon separating the directory names. NO spaces are allowed. 95# 96# e.g. libdir = /usr/local/lib:/opt/package/lib 97# 98# You can also try setting the LD_LIBRARY_PATH environment variable 99# in a script which starts the server. 100# 101# If that does not work, then you can re-configure and re-build the 102# server to NOT use shared libraries, via: 103# 104# ./configure --disable-shared 105# make 106# make install 107# 108libdir = /usr/lib/freeradius 109 110# pidfile: Where to place the PID of the RADIUS server. 111# 112# The server may be signalled while it's running by using this 113# file. 114# 115# This file is written when ONLY running in daemon mode. 116# 117# e.g.: kill -HUP `cat /var/run/radiusd/radiusd.pid` 118# 119pidfile = ${run_dir}/${name}.pid 120 121# 122# correct_escapes: use correct backslash escaping 123# 124# Prior to version 3.0.5, the handling of backslashes was a little 125# awkward, i.e. "wrong". In some cases, to get one backslash into 126# a regex, you had to put 4 in the config files. 127# 128# Version 3.0.5 fixes that. However, for backwards compatibility, 129# the new method of escaping is DISABLED BY DEFAULT. This means 130# that upgrading to 3.0.5 won't break your configuration. 131# 132# If you don't have double backslashes (i.e. \\) in your configuration, 133# this won't matter to you. If you do have them, fix that to use only 134# one backslash, and then set "correct_escapes = true". 135# 136# You can check for this by doing: 137# 138# $ grep '\\\\' $(find raddb -type f -print) 139# 140correct_escapes = true 141 142# panic_action: Command to execute if the server dies unexpectedly. 143# 144# FOR PRODUCTION SYSTEMS, ACTIONS SHOULD ALWAYS EXIT. 145# AN INTERACTIVE ACTION MEANS THE SERVER IS NOT RESPONDING TO REQUESTS. 146# AN INTERACTICE ACTION MEANS THE SERVER WILL NOT RESTART. 147# 148# THE SERVER MUST NOT BE ALLOWED EXECUTE UNTRUSTED PANIC ACTION CODE 149# PATTACH CAN BE USED AS AN ATTACK VECTOR. 150# 151# The panic action is a command which will be executed if the server 152# receives a fatal, non user generated signal, i.e. SIGSEGV, SIGBUS, 153# SIGABRT or SIGFPE. 154# 155# This can be used to start an interactive debugging session so 156# that information regarding the current state of the server can 157# be acquired. 158# 159# The following string substitutions are available: 160# - %e The currently executing program e.g. /sbin/radiusd 161# - %p The PID of the currently executing program e.g. 12345 162# 163# Standard ${} substitutions are also allowed. 164# 165# An example panic action for opening an interactive session in GDB would be: 166# 167#panic_action = "gdb %e %p" 168# 169# Again, don't use that on a production system. 170# 171# An example panic action for opening an automated session in GDB would be: 172# 173#panic_action = "gdb -silent -x ${raddbdir}/panic.gdb %e %p 2>&1 | tee ${logdir}/gdb-${name}-%p.log" 174# 175# That command can be used on a production system. 176# 177 178# max_request_time: The maximum time (in seconds) to handle a request. 179# 180# Requests which take more time than this to process may be killed, and 181# a REJECT message is returned. 182# 183# WARNING: If you notice that requests take a long time to be handled, 184# then this MAY INDICATE a bug in the server, in one of the modules 185# used to handle a request, OR in your local configuration. 186# 187# This problem is most often seen when using an SQL database. If it takes 188# more than a second or two to receive an answer from the SQL database, 189# then it probably means that you haven't indexed the database. See your 190# SQL server documentation for more information. 191# 192# Useful range of values: 5 to 120 193# 194max_request_time = 30 195 196# cleanup_delay: The time to wait (in seconds) before cleaning up 197# a reply which was sent to the NAS. 198# 199# The RADIUS request is normally cached internally for a short period 200# of time, after the reply is sent to the NAS. The reply packet may be 201# lost in the network, and the NAS will not see it. The NAS will then 202# re-send the request, and the server will respond quickly with the 203# cached reply. 204# 205# If this value is set too low, then duplicate requests from the NAS 206# MAY NOT be detected, and will instead be handled as separate requests. 207# 208# If this value is set too high, then the server will cache too many 209# requests, and some new requests may get blocked. (See 'max_requests'.) 210# 211# Useful range of values: 2 to 10 212# 213cleanup_delay = 5 214 215# max_requests: The maximum number of requests which the server keeps 216# track of. This should be 256 multiplied by the number of clients. 217# e.g. With 4 clients, this number should be 1024. 218# 219# If this number is too low, then when the server becomes busy, 220# it will not respond to any new requests, until the 'cleanup_delay' 221# time has passed, and it has removed the old requests. 222# 223# If this number is set too high, then the server will use a bit more 224# memory for no real benefit. 225# 226# If you aren't sure what it should be set to, it's better to set it 227# too high than too low. Setting it to 1000 per client is probably 228# the highest it should be. 229# 230# Useful range of values: 256 to infinity 231# 232max_requests = 16384 233 234# hostname_lookups: Log the names of clients or just their IP addresses 235# e.g., www.freeradius.org (on) or 206.47.27.232 (off). 236# 237# The default is 'off' because it would be overall better for the net 238# if people had to knowingly turn this feature on, since enabling it 239# means that each client request will result in AT LEAST one lookup 240# request to the nameserver. Enabling hostname_lookups will also 241# mean that your server may stop randomly for 30 seconds from time 242# to time, if the DNS requests take too long. 243# 244# Turning hostname lookups off also means that the server won't block 245# for 30 seconds, if it sees an IP address which has no name associated 246# with it. 247# 248# allowed values: {no, yes} 249# 250hostname_lookups = no 251 252# 253# Logging section. The various "log_*" configuration items 254# will eventually be moved here. 255# 256log { 257 # 258 # Destination for log messages. This can be one of: 259 # 260 # files - log to "file", as defined below. 261 # syslog - to syslog (see also the "syslog_facility", below. 262 # stdout - standard output 263 # stderr - standard error. 264 # 265 # The command-line option "-X" over-rides this option, and forces 266 # logging to go to stdout. 267 # 268 destination = files 269 270 # 271 # Highlight important messages sent to stderr and stdout. 272 # 273 # Option will be ignored (disabled) if output if TERM is not 274 # an xterm or output is not to a TTY. 275 # 276 colourise = yes 277 278 # 279 # The logging messages for the server are appended to the 280 # tail of this file if destination == "files" 281 # 282 # If the server is running in debugging mode, this file is 283 # NOT used. 284 # 285 file = ${logdir}/radius.log 286 287 # 288 # Which syslog facility to use, if ${destination} == "syslog" 289 # 290 # The exact values permitted here are OS-dependent. You probably 291 # don't want to change this. 292 # 293 syslog_facility = daemon 294 295 # Log the full User-Name attribute, as it was found in the request. 296 # 297 # allowed values: {no, yes} 298 # 299 stripped_names = no 300 301 # Log authentication requests to the log file. 302 # 303 # allowed values: {no, yes} 304 # 305 auth = no 306 307 # Log passwords with the authentication requests. 308 # auth_badpass - logs password if it's rejected 309 # auth_goodpass - logs password if it's correct 310 # 311 # allowed values: {no, yes} 312 # 313 auth_badpass = no 314 auth_goodpass = no 315 316 # Log additional text at the end of the "Login OK" messages. 317 # for these to work, the "auth" and "auth_goodpass" or "auth_badpass" 318 # configurations above have to be set to "yes". 319 # 320 # The strings below are dynamically expanded, which means that 321 # you can put anything you want in them. However, note that 322 # this expansion can be slow, and can negatively impact server 323 # performance. 324 # 325# msg_goodpass = "" 326# msg_badpass = "" 327 328 # The message when the user exceeds the Simultaneous-Use limit. 329 # 330 msg_denied = "You are already logged in - access denied" 331} 332 333# The program to execute to do concurrency checks. 334checkrad = ${sbindir}/checkrad 335 336# SECURITY CONFIGURATION 337# 338# There may be multiple methods of attacking on the server. This 339# section holds the configuration items which minimize the impact 340# of those attacks 341# 342security { 343 # chroot: directory where the server does "chroot". 344 # 345 # The chroot is done very early in the process of starting 346 # the server. After the chroot has been performed it 347 # switches to the "user" listed below (which MUST be 348 # specified). If "group" is specified, it switches to that 349 # group, too. Any other groups listed for the specified 350 # "user" in "/etc/group" are also added as part of this 351 # process. 352 # 353 # The current working directory (chdir / cd) is left 354 # *outside* of the chroot until all of the modules have been 355 # initialized. This allows the "raddb" directory to be left 356 # outside of the chroot. Once the modules have been 357 # initialized, it does a "chdir" to ${logdir}. This means 358 # that it should be impossible to break out of the chroot. 359 # 360 # If you are worried about security issues related to this 361 # use of chdir, then simply ensure that the "raddb" directory 362 # is inside of the chroot, end be sure to do "cd raddb" 363 # BEFORE starting the server. 364 # 365 # If the server is statically linked, then the only files 366 # that have to exist in the chroot are ${run_dir} and 367 # ${logdir}. If you do the "cd raddb" as discussed above, 368 # then the "raddb" directory has to be inside of the chroot 369 # directory, too. 370 # 371# chroot = /path/to/chroot/directory 372 373 # user/group: The name (or #number) of the user/group to run radiusd as. 374 # 375 # If these are commented out, the server will run as the 376 # user/group that started it. In order to change to a 377 # different user/group, you MUST be root ( or have root 378 # privileges ) to start the server. 379 # 380 # We STRONGLY recommend that you run the server with as few 381 # permissions as possible. That is, if you're not using 382 # shadow passwords, the user and group items below should be 383 # set to radius'. 384 # 385 # NOTE that some kernels refuse to setgid(group) when the 386 # value of (unsigned)group is above 60000; don't use group 387 # "nobody" on these systems! 388 # 389 # On systems with shadow passwords, you might have to set 390 # 'group = shadow' for the server to be able to read the 391 # shadow password file. If you can authenticate users while 392 # in debug mode, but not in daemon mode, it may be that the 393 # debugging mode server is running as a user that can read 394 # the shadow info, and the user listed below can not. 395 # 396 # The server will also try to use "initgroups" to read 397 # /etc/groups. It will join all groups where "user" is a 398 # member. This can allow for some finer-grained access 399 # controls. 400 # 401 user = root 402 group = root 403 404 # Core dumps are a bad thing. This should only be set to 405 # 'yes' if you're debugging a problem with the server. 406 # 407 # allowed values: {no, yes} 408 # 409 allow_core_dumps = no 410 411 # 412 # max_attributes: The maximum number of attributes 413 # permitted in a RADIUS packet. Packets which have MORE 414 # than this number of attributes in them will be dropped. 415 # 416 # If this number is set too low, then no RADIUS packets 417 # will be accepted. 418 # 419 # If this number is set too high, then an attacker may be 420 # able to send a small number of packets which will cause 421 # the server to use all available memory on the machine. 422 # 423 # Setting this number to 0 means "allow any number of attributes" 424 max_attributes = 200 425 426 # 427 # reject_delay: When sending an Access-Reject, it can be 428 # delayed for a few seconds. This may help slow down a DoS 429 # attack. It also helps to slow down people trying to brute-force 430 # crack a users password. 431 # 432 # Setting this number to 0 means "send rejects immediately" 433 # 434 # If this number is set higher than 'cleanup_delay', then the 435 # rejects will be sent at 'cleanup_delay' time, when the request 436 # is deleted from the internal cache of requests. 437 # 438 # As of Version 3.0.5, "reject_delay" has sub-second resolution. 439 # e.g. "reject_delay = 1.4" seconds is possible. 440 # 441 # Useful ranges: 1 to 5 442 reject_delay = 1 443 444 # 445 # status_server: Whether or not the server will respond 446 # to Status-Server requests. 447 # 448 # When sent a Status-Server message, the server responds with 449 # an Access-Accept or Accounting-Response packet. 450 # 451 # This is mainly useful for administrators who want to "ping" 452 # the server, without adding test users, or creating fake 453 # accounting packets. 454 # 455 # It's also useful when a NAS marks a RADIUS server "dead". 456 # The NAS can periodically "ping" the server with a Status-Server 457 # packet. If the server responds, it must be alive, and the 458 # NAS can start using it for real requests. 459 # 460 # See also raddb/sites-available/status 461 # 462 status_server = yes 463 464 465} 466 467# PROXY CONFIGURATION 468# 469# proxy_requests: Turns proxying of RADIUS requests on or off. 470# 471# The server has proxying turned on by default. If your system is NOT 472# set up to proxy requests to another server, then you can turn proxying 473# off here. This will save a small amount of resources on the server. 474# 475# If you have proxying turned off, and your configuration files say 476# to proxy a request, then an error message will be logged. 477# 478# To disable proxying, change the "yes" to "no", and comment the 479# $INCLUDE line. 480# 481# allowed values: {no, yes} 482# 483proxy_requests = no 484#$INCLUDE proxy.conf 485 486 487# CLIENTS CONFIGURATION 488# 489# Client configuration is defined in "clients.conf". 490# 491 492# The 'clients.conf' file contains all of the information from the old 493# 'clients' and 'naslist' configuration files. We recommend that you 494# do NOT use 'client's or 'naslist', although they are still 495# supported. 496# 497# Anything listed in 'clients.conf' will take precedence over the 498# information from the old-style configuration files. 499# 500$INCLUDE clients.conf 501 502 503# THREAD POOL CONFIGURATION 504# 505# The thread pool is a long-lived group of threads which 506# take turns (round-robin) handling any incoming requests. 507# 508# You probably want to have a few spare threads around, 509# so that high-load situations can be handled immediately. If you 510# don't have any spare threads, then the request handling will 511# be delayed while a new thread is created, and added to the pool. 512# 513# You probably don't want too many spare threads around, 514# otherwise they'll be sitting there taking up resources, and 515# not doing anything productive. 516# 517# The numbers given below should be adequate for most situations. 518# 519thread pool { 520 # Number of servers to start initially --- should be a reasonable 521 # ballpark figure. 522 start_servers = 5 523 524 # Limit on the total number of servers running. 525 # 526 # If this limit is ever reached, clients will be LOCKED OUT, so it 527 # should NOT BE SET TOO LOW. It is intended mainly as a brake to 528 # keep a runaway server from taking the system with it as it spirals 529 # down... 530 # 531 # You may find that the server is regularly reaching the 532 # 'max_servers' number of threads, and that increasing 533 # 'max_servers' doesn't seem to make much difference. 534 # 535 # If this is the case, then the problem is MOST LIKELY that 536 # your back-end databases are taking too long to respond, and 537 # are preventing the server from responding in a timely manner. 538 # 539 # The solution is NOT do keep increasing the 'max_servers' 540 # value, but instead to fix the underlying cause of the 541 # problem: slow database, or 'hostname_lookups=yes'. 542 # 543 # For more information, see 'max_request_time', above. 544 # 545 max_servers = 32 546 547 # Server-pool size regulation. Rather than making you guess 548 # how many servers you need, FreeRADIUS dynamically adapts to 549 # the load it sees, that is, it tries to maintain enough 550 # servers to handle the current load, plus a few spare 551 # servers to handle transient load spikes. 552 # 553 # It does this by periodically checking how many servers are 554 # waiting for a request. If there are fewer than 555 # min_spare_servers, it creates a new spare. If there are 556 # more than max_spare_servers, some of the spares die off. 557 # The default values are probably OK for most sites. 558 # 559 min_spare_servers = 3 560 max_spare_servers = 10 561 562 # When the server receives a packet, it places it onto an 563 # internal queue, where the worker threads (configured above) 564 # pick it up for processing. The maximum size of that queue 565 # is given here. 566 # 567 # When the queue is full, any new packets will be silently 568 # discarded. 569 # 570 # The most common cause of the queue being full is that the 571 # server is dependent on a slow database, and it has received 572 # a large "spike" of traffic. When that happens, there is 573 # very little you can do other than make sure the server 574 # receives less traffic, or make sure that the database can 575 # handle the load. 576 # 577# max_queue_size = 65536 578 579 # Clean up old threads periodically. For no reason other than 580 # it might be useful. 581 # 582 # '0' is a special value meaning 'infinity', or 'the servers never 583 # exit' 584 max_requests_per_server = 0 585 586 # Automatically limit the number of accounting requests. 587 # This configuration item tracks how many requests per second 588 # the server can handle. It does this by tracking the 589 # packets/s received by the server for processing, and 590 # comparing that to the packets/s handled by the child 591 # threads. 592 # 593 594 # If the received PPS is larger than the processed PPS, *and* 595 # the queue is more than half full, then new accounting 596 # requests are probabilistically discarded. This lowers the 597 # number of packets that the server needs to process. Over 598 # time, the server will "catch up" with the traffic. 599 # 600 # Throwing away accounting packets is usually safe and low 601 # impact. The NAS will retransmit them in a few seconds, or 602 # even a few minutes. Vendors should read RFC 5080 Section 2.2.1 603 # to see how accounting packets should be retransmitted. Using 604 # any other method is likely to cause network meltdowns. 605 # 606 auto_limit_acct = no 607} 608 609###################################################################### 610# 611# SNMP notifications. Uncomment the following line to enable 612# snmptraps. Note that you MUST also configure the full path 613# to the "snmptrap" command in the "trigger.conf" file. 614# 615#$INCLUDE trigger.conf 616 617# MODULE CONFIGURATION 618# 619# The names and configuration of each module is located in this section. 620# 621# After the modules are defined here, they may be referred to by name, 622# in other sections of this configuration file. 623# 624modules { 625 # 626 # Each module has a configuration as follows: 627 # 628 # name [ instance ] { 629 # config_item = value 630 # ... 631 # } 632 # 633 # The 'name' is used to load the 'rlm_name' library 634 # which implements the functionality of the module. 635 # 636 # The 'instance' is optional. To have two different instances 637 # of a module, it first must be referred to by 'name'. 638 # The different copies of the module are then created by 639 # inventing two 'instance' names, e.g. 'instance1' and 'instance2' 640 # 641 # The instance names can then be used in later configuration 642 # INSTEAD of the original 'name'. See the 'radutmp' configuration 643 # for an example. 644 # 645 646 # 647 # As of 3.0, modules are in mods-enabled/. Files matching 648 # the regex /[a-zA-Z0-9_.]+/ are loaded. The modules are 649 # initialized ONLY if they are referenced in a processing 650 # section, such as authorize, authenticate, accounting, 651 # pre/post-proxy, etc. 652 # 653 #$INCLUDE mods-enabled/ 654 pap { } 655 chap { } 656 mschap { } 657 digest { } 658 attr_filter attr_filter.access_reject { 659 key = "%{User-Name}" 660 filename = ${confdir}/access_reject 661 } 662 files { 663 usersfile = ${confdir}/users 664 } 665 666 attr_filter attr_filter.accounting_response { 667 key = "%{User-Name}" 668 filename = ${confdir}/accounting_response 669 } 670 attr_filter attr_filter.access_challenge { 671 key = "%{User-Name}" 672 filename = ${confdir}/access_challenge 673 } 674 expr { 675 safe_characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /äéöüàâæçèéêëîïôœùûüaÿÄÉÖÜßÀÂÆÇÈÉÊËÎÏÔŒÙÛÜŸ" 676 } 677} 678 679# Instantiation 680# 681# This section orders the loading of the modules. Modules 682# listed here will get loaded BEFORE the later sections like 683# authorize, authenticate, etc. get examined. 684# 685# This section is not strictly needed. When a section like 686# authorize refers to a module, it's automatically loaded and 687# initialized. However, some modules may not be listed in any 688# of the following sections, so they can be listed here. 689# 690# Also, listing modules here ensures that you have control over 691# the order in which they are initialized. If one module needs 692# something defined by another module, you can list them in order 693# here, and ensure that the configuration will be OK. 694# 695# After the modules listed here have been loaded, all of the modules 696# in the "mods-enabled" directory will be loaded. Loading the 697# "mods-enabled" directory means that unlike Version 2, you usually 698# don't need to list modules here. 699# 700instantiate { 701 # 702 # We list the counter module here so that it registers 703 # the check_name attribute before any module which sets 704 # it 705# daily 706 707 # subsections here can be thought of as "virtual" modules. 708 # 709 # e.g. If you have two redundant SQL servers, and you want to 710 # use them in the authorize and accounting sections, you could 711 # place a "redundant" block in each section, containing the 712 # exact same text. Or, you could uncomment the following 713 # lines, and list "redundant_sql" in the authorize and 714 # accounting sections. 715 # 716 # The "virtual" module defined here can also be used with 717 # dynamic expansions, under a few conditions: 718 # 719 # * The section is "redundant", or "load-balance", or 720 # "redundant-load-balance" 721 # * The section contains modules ONLY, and no sub-sections 722 # * all modules in the section are using the same rlm_ 723 # driver, e.g. They are all sql, or all ldap, etc. 724 # 725 # When those conditions are satisfied, the server will 726 # automatically register a dynamic expansion, using the 727 # name of the "virtual" module. In the example below, 728 # it will be "redundant_sql". You can then use this expansion 729 # just like any other: 730 # 731 # update reply { 732 # Filter-Id := "%{redundant_sql: ... }" 733 # } 734 # 735 # In this example, the expansion is done via module "sql1", 736 # and if that expansion fails, using module "sql2". 737 # 738 # For best results, configure the "pool" subsection of the 739 # module so that "retry_delay" is non-zero. That will allow 740 # the redundant block to quickly ignore all "down" SQL 741 # databases. If instead we have "retry_delay = 0", then 742 # every time the redundant block is used, the server will try 743 # to open a connection to every "down" database, causing 744 # problems. 745 # 746 #redundant redundant_sql { 747 # sql1 748 # sql2 749 #} 750} 751 752###################################################################### 753# 754# Policies are virtual modules, similar to those defined in the 755# "instantiate" section above. 756# 757# Defining a policy in one of the policy.d files means that it can be 758# referenced in multiple places as a *name*, rather than as a series of 759# conditions to match, and actions to take. 760# 761# Policies are something like subroutines in a normal language, but 762# they cannot be called recursively. They MUST be defined in order. 763# If policy A calls policy B, then B MUST be defined before A. 764# 765###################################################################### 766policy { 767# $INCLUDE policy.d/ 768} 769 770###################################################################### 771# 772# Load virtual servers. 773# 774# This next $INCLUDE line loads files in the directory that 775# match the regular expression: /[a-zA-Z0-9_.]+/ 776# 777# It allows you to define new virtual servers simply by placing 778# a file into the raddb/sites-enabled/ directory. 779# 780 781server default { 782# 783# If you want the server to listen on additional addresses, or on 784# additional ports, you can use multiple "listen" sections. 785# 786# Each section make the server listen for only one type of packet, 787# therefore authentication and accounting have to be configured in 788# different sections. 789# 790# The server ignore all "listen" section if you are using '-i' and '-p' 791# on the command line. 792# 793listen { 794 # Type of packets to listen for. 795 # Allowed values are: 796 # auth listen for authentication packets 797 # acct listen for accounting packets 798 # proxy IP to use for sending proxied packets 799 # detail Read from the detail file. For examples, see 800 # raddb/sites-available/copy-acct-to-home-server 801 # status listen for Status-Server packets. For examples, 802 # see raddb/sites-available/status 803 # coa listen for CoA-Request and Disconnect-Request 804 # packets. For examples, see the file 805 # raddb/sites-available/coa 806 # 807 type = auth 808 809 # Note: "type = proxy" lets you control the source IP used for 810 # proxying packets, with some limitations: 811 # 812 # * A proxy listener CANNOT be used in a virtual server section. 813 # * You should probably set "port = 0". 814 # * Any "clients" configuration will be ignored. 815 # 816 # See also proxy.conf, and the "src_ipaddr" configuration entry 817 # in the sample "home_server" section. When you specify the 818 # source IP address for packets sent to a home server, the 819 # proxy listeners are automatically created. 820 821 # ipaddr/ipv4addr/ipv6addr - IP address on which to listen. 822 # If multiple ones are listed, only the first one will 823 # be used, and the others will be ignored. 824 # 825 # The configuration options accept the following syntax: 826 # 827 # ipv4addr - IPv4 address (e.g.192.0.2.3) 828 # - wildcard (i.e. *) 829 # - hostname (radius.example.com) 830 # Only the A record for the host name is used. 831 # If there is no A record, an error is returned, 832 # and the server fails to start. 833 # 834 # ipv6addr - IPv6 address (e.g. 2001:db8::1) 835 # - wildcard (i.e. *) 836 # - hostname (radius.example.com) 837 # Only the AAAA record for the host name is used. 838 # If there is no AAAA record, an error is returned, 839 # and the server fails to start. 840 # 841 # ipaddr - IPv4 address as above 842 # - IPv6 address as above 843 # - wildcard (i.e. *), which means IPv4 wildcard. 844 # - hostname 845 # If there is only one A or AAAA record returned 846 # for the host name, it is used. 847 # If multiple A or AAAA records are returned 848 # for the host name, only the first one is used. 849 # If both A and AAAA records are returned 850 # for the host name, only the A record is used. 851 # 852 # ipv4addr = * 853 # ipv6addr = * 854 ipaddr = * 855 856 # Port on which to listen. 857 # Allowed values are: 858 # integer port number (1812) 859 # 0 means "use /etc/services for the proper port" 860 port = 0 861 862 # Some systems support binding to an interface, in addition 863 # to the IP address. This feature isn't strictly necessary, 864 # but for sites with many IP addresses on one interface, 865 # it's useful to say "listen on all addresses for eth0". 866 # 867 # If your system does not support this feature, you will 868 # get an error if you try to use it. 869 # 870# interface = eth0 871 872 # Per-socket lists of clients. This is a very useful feature. 873 # 874 # The name here is a reference to a section elsewhere in 875 # radiusd.conf, or clients.conf. Having the name as 876 # a reference allows multiple sockets to use the same 877 # set of clients. 878 # 879 # If this configuration is used, then the global list of clients 880 # is IGNORED for this "listen" section. Take care configuring 881 # this feature, to ensure you don't accidentally disable a 882 # client you need. 883 # 884 # See clients.conf for the configuration of "per_socket_clients". 885 # 886# clients = per_socket_clients 887 888 # 889 # Connection limiting for sockets with "proto = tcp". 890 # 891 # This section is ignored for other kinds of sockets. 892 # 893 limit { 894 # 895 # Limit the number of simultaneous TCP connections to the socket 896 # 897 # The default is 16. 898 # Setting this to 0 means "no limit" 899 max_connections = 16 900 901 # The per-socket "max_requests" option does not exist. 902 903 # 904 # The lifetime, in seconds, of a TCP connection. After 905 # this lifetime, the connection will be closed. 906 # 907 # Setting this to 0 means "forever". 908 lifetime = 0 909 910 # 911 # The idle timeout, in seconds, of a TCP connection. 912 # If no packets have been received over the connection for 913 # this time, the connection will be closed. 914 # 915 # Setting this to 0 means "no timeout". 916 # 917 # We STRONGLY RECOMMEND that you set an idle timeout. 918 # 919 idle_timeout = 30 920 } 921} 922 923# 924# This second "listen" section is for listening on the accounting 925# port, too. 926# 927listen { 928 ipaddr = * 929# ipv6addr = :: 930 port = 0 931 type = acct 932# interface = eth0 933# clients = per_socket_clients 934 935 limit { 936 # The number of packets received can be rate limited via the 937 # "max_pps" configuration item. When it is set, the server 938 # tracks the total number of packets received in the previous 939 # second. If the count is greater than "max_pps", then the 940 # new packet is silently discarded. This helps the server 941 # deal with overload situations. 942 # 943 # The packets/s counter is tracked in a sliding window. This 944 # means that the pps calculation is done for the second 945 # before the current packet was received. NOT for the current 946 # wall-clock second, and NOT for the previous wall-clock second. 947 # 948 # Useful values are 0 (no limit), or 100 to 10000. 949 # Values lower than 100 will likely cause the server to ignore 950 # normal traffic. Few systems are capable of handling more than 951 # 10K packets/s. 952 # 953 # It is most useful for accounting systems. Set it to 50% 954 # more than the normal accounting load, and you can be sure that 955 # the server will never get overloaded 956 # 957# max_pps = 0 958 959 # Only for "proto = tcp". These are ignored for "udp" sockets. 960 # 961# idle_timeout = 0 962# lifetime = 0 963# max_connections = 0 964 } 965} 966 967# IPv6 versions of the above - read their full config to understand options 968listen { 969 type = auth 970 ipv6addr = :: # any. ::1 == localhost 971 port = 0 972# interface = eth0 973# clients = per_socket_clients 974 limit { 975 max_connections = 16 976 lifetime = 0 977 idle_timeout = 30 978 } 979} 980 981listen { 982 ipv6addr = :: 983 port = 0 984 type = acct 985# interface = eth0 986# clients = per_socket_clients 987 988 limit { 989# max_pps = 0 990# idle_timeout = 0 991# lifetime = 0 992# max_connections = 0 993 } 994} 995 996# Authorization. First preprocess (hints and huntgroups files), 997# then realms, and finally look in the "users" file. 998# 999# Any changes made here should also be made to the "inner-tunnel" 1000# virtual server. 1001# 1002# The order of the realm modules will determine the order that 1003# we try to find a matching realm. 1004# 1005# Make *sure* that 'preprocess' comes before any realm if you 1006# need to setup hints for the remote radius server 1007authorize { 1008 # 1009 # Take a User-Name, and perform some checks on it, for spaces and other 1010 # invalid characters. If the User-Name appears invalid, reject the 1011 # request. 1012 # 1013 # See policy.d/filter for the definition of the filter_username policy. 1014 # 1015 #filter_username 1016 1017 # 1018 # Some broken equipment sends passwords with embedded zeros. 1019 # i.e. the debug output will show 1020 # 1021 # User-Password = "password\000\000" 1022 # 1023 # This policy will fix it to just be "password". 1024 # 1025# filter_password 1026 1027 # 1028 # The preprocess module takes care of sanitizing some bizarre 1029 # attributes in the request, and turning them into attributes 1030 # which are more standard. 1031 # 1032 # It takes care of processing the 'raddb/mods-config/preprocess/hints' 1033 # and the 'raddb/mods-config/preprocess/huntgroups' files. 1034 #preprocess 1035 1036 # If you intend to use CUI and you require that the Operator-Name 1037 # be set for CUI generation and you want to generate CUI also 1038 # for your local clients then uncomment the operator-name 1039 # below and set the operator-name for your clients in clients.conf 1040# operator-name 1041 1042 # 1043 # If you want to generate CUI for some clients that do not 1044 # send proper CUI requests, then uncomment the 1045 # cui below and set "add_cui = yes" for these clients in clients.conf 1046# cui 1047 1048 # 1049 # If you want to have a log of authentication requests, 1050 # un-comment the following line. 1051# auth_log 1052 1053 # 1054 # The chap module will set 'Auth-Type := CHAP' if we are 1055 # handling a CHAP request and Auth-Type has not already been set 1056 chap 1057 1058 # 1059 # If the users are logging in with an MS-CHAP-Challenge 1060 # attribute for authentication, the mschap module will find 1061 # the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP' 1062 # to the request, which will cause the server to then use 1063 # the mschap module for authentication. 1064 mschap 1065 1066 # 1067 # If you have a Cisco SIP server authenticating against 1068 # FreeRADIUS, uncomment the following line, and the 'digest' 1069 # line in the 'authenticate' section. 1070 digest 1071 1072 # 1073 # The WiMAX specification says that the Calling-Station-Id 1074 # is 6 octets of the MAC. This definition conflicts with 1075 # RFC 3580, and all common RADIUS practices. Un-commenting 1076 # the "wimax" module here means that it will fix the 1077 # Calling-Station-Id attribute to the normal format as 1078 # specified in RFC 3580 Section 3.21 1079# wimax 1080 1081 # 1082 # Look for IPASS style 'realm/', and if not found, look for 1083 # '@realm', and decide whether or not to proxy, based on 1084 # that. 1085# IPASS 1086 1087 # 1088 # If you are using multiple kinds of realms, you probably 1089 # want to set "ignore_null = yes" for all of them. 1090 # Otherwise, when the first style of realm doesn't match, 1091 # the other styles won't be checked. 1092 # 1093 #suffix 1094# ntdomain 1095 1096 # 1097 # This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP 1098 # authentication. 1099 # 1100 # It also sets the EAP-Type attribute in the request 1101 # attribute list to the EAP type from the packet. 1102 # 1103 # The EAP module returns "ok" or "updated" if it is not yet ready 1104 # to authenticate the user. The configuration below checks for 1105 # "ok", and stops processing the "authorize" section if so. 1106 # 1107 # Any LDAP and/or SQL servers will not be queried for the 1108 # initial set of packets that go back and forth to set up 1109 # TTLS or PEAP. 1110 # 1111 # The "updated" check is commented out for compatibility with 1112 # previous versions of this configuration, but you may wish to 1113 # uncomment it as well; this will further reduce the number of 1114 # LDAP and/or SQL queries for TTLS or PEAP. 1115 # 1116 1117 # 1118 # Pull crypt'd passwords from /etc/passwd or /etc/shadow, 1119 # using the system API's to get the password. If you want 1120 # to read /etc/passwd or /etc/shadow directly, see the 1121 # mods-available/passwd module. 1122 # 1123# unix 1124 1125 # 1126 # Read the 'users' file. In v3, this is located in 1127 # raddb/mods-config/files/authorize 1128 files 1129 1130 # 1131 # Look in an SQL database. The schema of the database 1132 # is meant to mirror the "users" file. 1133 # 1134 # See "Authorization Queries" in mods-available/sql 1135 -sql 1136 1137 # 1138 # If you are using /etc/smbpasswd, and are also doing 1139 # mschap authentication, the un-comment this line, and 1140 # configure the 'smbpasswd' module. 1141# smbpasswd 1142 1143 # 1144 # The ldap module reads passwords from the LDAP database. 1145 -ldap 1146 1147 # 1148 # Enforce daily limits on time spent logged in. 1149# daily 1150 1151 # 1152 #expiration 1153 #logintime 1154 1155 # 1156 # Multifactor authentification used if User-Name format test[0123456789]*-otp 1157 # and attribute &control:Tmp-Integer-0 (number of challenges) have a non zero value 1158 if (User-Name =~ /^test[0123456789]*-otp$/m && (!&State || &control:Tmp-Integer-0 > "%{expr: %{string:State}}") && &control:Tmp-Integer-0 > 0) { 1159 update control { 1160 &Auth-Type := "OTP" 1161 } 1162 } 1163 1164 # 1165 # If no other module has claimed responsibility for 1166 # authentication, then try to use PAP. This allows the 1167 # other modules listed above to add a "known good" password 1168 # to the request, and to do nothing else. The PAP module 1169 # will then see that password, and use it to do PAP 1170 # authentication. 1171 # 1172 # This module should be listed last, so that the other modules 1173 # get a chance to set Auth-Type for themselves. 1174 # 1175 pap 1176 1177 # 1178 # If "status_server = yes", then Status-Server messages are passed 1179 # through the following section, and ONLY the following section. 1180 # This permits you to do DB queries, for example. If the modules 1181 # listed here return "fail", then NO response is sent. 1182 # 1183# Autz-Type Status-Server { 1184# 1185# } 1186} 1187 1188 1189# Authentication. 1190# 1191# 1192# This section lists which modules are available for authentication. 1193# Note that it does NOT mean 'try each module in order'. It means 1194# that a module from the 'authorize' section adds a configuration 1195# attribute 'Auth-Type := FOO'. That authentication type is then 1196# used to pick the appropriate module from the list below. 1197# 1198 1199# In general, you SHOULD NOT set the Auth-Type attribute. The server 1200# will figure it out on its own, and will do the right thing. The 1201# most common side effect of erroneously setting the Auth-Type 1202# attribute is that one authentication method will work, but the 1203# others will not. 1204# 1205# The common reasons to set the Auth-Type attribute by hand 1206# is to either forcibly reject the user (Auth-Type := Reject), 1207# or to or forcibly accept the user (Auth-Type := Accept). 1208# 1209# Note that Auth-Type := Accept will NOT work with EAP. 1210# 1211# Please do not put "unlang" configurations into the "authenticate" 1212# section. Put them in the "post-auth" section instead. That's what 1213# the post-auth section is for. 1214# 1215authenticate { 1216 # 1217 # Challenge PAP authentication, when a back-end database listed 1218 # in the 'authorize' section supplies a password and Auth-Type=OTP. The 1219 # password can be clear-text, or encrypted. Initial State value is 1. 1220 # Number of challenges is a value of &control:Tmp-Octets-0. Default is 0 - 1221 # module skiped. 1222 Auth-Type OTP { 1223 pap { 1224 ok = 1 1225 reject = 1 1226 } 1227 if (ok) { 1228 update reply { 1229 &State := "%{expr: %{%{string:State}:-0} + 1}" 1230 &Reply-Message = "Please enter challenge password %{string:reply:State}." 1231 } 1232 } 1233 elsif (reject) { 1234 if (&State && User-Name == "test3-otp") { 1235 update reply { 1236 &State := "%{string:State}" 1237 &Reply-Message = "Please enter challenge password %{string:reply:State}." 1238 } 1239 } 1240 } 1241 update control { 1242 &Response-Packet-Type = Access-Challenge 1243 } 1244 } 1245 1246 # 1247 # PAP authentication, when a back-end database listed 1248 # in the 'authorize' section supplies a password. The 1249 # password can be clear-text, or encrypted. 1250 Auth-Type PAP { 1251 pap 1252 } 1253 1254 # 1255 # Most people want CHAP authentication 1256 # A back-end database listed in the 'authorize' section 1257 # MUST supply a CLEAR TEXT password. Encrypted passwords 1258 # won't work. 1259 Auth-Type CHAP { 1260 chap 1261 } 1262 1263 # 1264 # MSCHAP authentication. 1265 Auth-Type MS-CHAP { 1266 mschap 1267 } 1268 1269 # 1270 # For old names, too. 1271 # 1272 mschap 1273 1274 # 1275 # If you have a Cisco SIP server authenticating against 1276 # FreeRADIUS, uncomment the following line, and the 'digest' 1277 # line in the 'authorize' section. 1278 digest 1279 1280 # 1281 # Pluggable Authentication Modules. 1282# pam 1283 1284 # Uncomment it if you want to use ldap for authentication 1285 # 1286 # Note that this means "check plain-text password against 1287 # the ldap database", which means that EAP won't work, 1288 # as it does not supply a plain-text password. 1289 # 1290 # We do NOT recommend using this. LDAP servers are databases. 1291 # They are NOT authentication servers. FreeRADIUS is an 1292 # authentication server, and knows what to do with authentication. 1293 # LDAP servers do not. 1294 # 1295# Auth-Type LDAP { 1296# ldap 1297# } 1298 1299 # 1300 # Allow EAP authentication. 1301 #eap 1302 1303 # 1304 # The older configurations sent a number of attributes in 1305 # Access-Challenge packets, which wasn't strictly correct. 1306 # If you want to filter out these attributes, uncomment 1307 # the following lines. 1308 # 1309# Auth-Type eap { 1310# eap { 1311# handled = 1 1312# } 1313# if (handled && (Response-Packet-Type == Access-Challenge)) { 1314# attr_filter.access_challenge.post-auth 1315# handled # override the "updated" code from attr_filter 1316# } 1317# } 1318} 1319 1320 1321# 1322# Pre-accounting. Decide which accounting type to use. 1323# 1324preacct { 1325 #preprocess 1326 1327 # 1328 # Merge Acct-[Input|Output]-Gigawords and Acct-[Input-Output]-Octets 1329 # into a single 64bit counter Acct-[Input|Output]-Octets64. 1330 # 1331# acct_counters64 1332 1333 # 1334 # Session start times are *implied* in RADIUS. 1335 # The NAS never sends a "start time". Instead, it sends 1336 # a start packet, *possibly* with an Acct-Delay-Time. 1337 # The server is supposed to conclude that the start time 1338 # was "Acct-Delay-Time" seconds in the past. 1339 # 1340 # The code below creates an explicit start time, which can 1341 # then be used in other modules. It will be *mostly* correct. 1342 # Any errors are due to the 1-second resolution of RADIUS, 1343 # and the possibility that the time on the NAS may be off. 1344 # 1345 # The start time is: NOW - delay - session_length 1346 # 1347 1348# update request { 1349# &FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}" 1350# } 1351 1352 1353 # 1354 # Ensure that we have a semi-unique identifier for every 1355 # request, and many NAS boxes are broken. 1356 #acct_unique 1357 1358 # 1359 # Look for IPASS-style 'realm/', and if not found, look for 1360 # '@realm', and decide whether or not to proxy, based on 1361 # that. 1362 # 1363 # Accounting requests are generally proxied to the same 1364 # home server as authentication requests. 1365# IPASS 1366 #suffix 1367# ntdomain 1368 1369 # 1370 # Read the 'acct_users' file 1371 files 1372} 1373 1374# 1375# Accounting. Log the accounting data. 1376# 1377accounting { 1378 # Update accounting packet by adding the CUI attribute 1379 # recorded from the corresponding Access-Accept 1380 # use it only if your NAS boxes do not support CUI themselves 1381# cui 1382 # 1383 # Create a 'detail'ed log of the packets. 1384 # Note that accounting requests which are proxied 1385 # are also logged in the detail file. 1386 #detail 1387# daily 1388 1389 # Update the wtmp file 1390 # 1391 # If you don't use "radlast", you can delete this line. 1392 #unix 1393 1394 # 1395 # For Simultaneous-Use tracking. 1396 # 1397 # Due to packet losses in the network, the data here 1398 # may be incorrect. There is little we can do about it. 1399# radutmp 1400# sradutmp 1401 1402 # Return an address to the IP Pool when we see a stop record. 1403# main_pool 1404 1405 # 1406 # Log traffic to an SQL database. 1407 # 1408 # See "Accounting queries" in mods-available/sql 1409 -sql 1410 1411 # 1412 # If you receive stop packets with zero session length, 1413 # they will NOT be logged in the database. The SQL module 1414 # will print a message (only in debugging mode), and will 1415 # return "noop". 1416 # 1417 # You can ignore these packets by uncommenting the following 1418 # three lines. Otherwise, the server will not respond to the 1419 # accounting request, and the NAS will retransmit. 1420 # 1421# if (noop) { 1422# ok 1423# } 1424 1425 # Cisco VoIP specific bulk accounting 1426# pgsql-voip 1427 1428 # For Exec-Program and Exec-Program-Wait 1429 #exec 1430 1431 # Filter attributes from the accounting response. 1432 attr_filter.accounting_response 1433 1434 # 1435 # See "Autz-Type Status-Server" for how this works. 1436 # 1437# Acct-Type Status-Server { 1438# 1439# } 1440} 1441 1442 1443# Session database, used for checking Simultaneous-Use. Either the radutmp 1444# or rlm_sql module can handle this. 1445# The rlm_sql module is *much* faster 1446session { 1447# radutmp 1448 1449 # 1450 # See "Simultaneous Use Checking Queries" in mods-available/sql 1451# sql 1452} 1453 1454 1455# Post-Authentication 1456# Once we KNOW that the user has been authenticated, there are 1457# additional steps we can take. 1458post-auth { 1459 # 1460 # If you need to have a State attribute, you can 1461 # add it here. e.g. for later CoA-Request with 1462 # State, and Service-Type = Authorize-Only. 1463 # 1464# if (!&reply:State) { 1465# update reply { 1466# State := "0x%{randstr:16h}" 1467# } 1468# } 1469 1470 # 1471 # For EAP-TTLS and PEAP, add the cached attributes to the reply. 1472 # The "session-state" attributes are automatically cached when 1473 # an Access-Challenge is sent, and automatically retrieved 1474 # when an Access-Request is received. 1475 # 1476 # The session-state attributes are automatically deleted after 1477 # an Access-Reject or Access-Accept is sent. 1478 # 1479 update { 1480 &reply: += &session-state: 1481 } 1482 1483 # Get an address from the IP Pool. 1484# main_pool 1485 1486 1487 # Create the CUI value and add the attribute to Access-Accept. 1488 # Uncomment the line below if *returning* the CUI. 1489# cui 1490 1491 # 1492 # If you want to have a log of authentication replies, 1493 # un-comment the following line, and enable the 1494 # 'detail reply_log' module. 1495# reply_log 1496 1497 # 1498 # After authenticating the user, do another SQL query. 1499 # 1500 # See "Authentication Logging Queries" in mods-available/sql 1501 -sql 1502 1503 # 1504 # Un-comment the following if you want to modify the user's object 1505 # in LDAP after a successful login. 1506 # 1507# ldap 1508 1509 # For Exec-Program and Exec-Program-Wait 1510 #exec 1511 1512 # 1513 # Calculate the various WiMAX keys. In order for this to work, 1514 # you will need to define the WiMAX NAI, usually via 1515 # 1516 # update request { 1517 # WiMAX-MN-NAI = "%{User-Name}" 1518 # } 1519 # 1520 # If you want various keys to be calculated, you will need to 1521 # update the reply with "template" values. The module will see 1522 # this, and replace the template values with the correct ones 1523 # taken from the cryptographic calculations. e.g. 1524 # 1525 # update reply { 1526 # WiMAX-FA-RK-Key = 0x00 1527 # WiMAX-MSK = "%{EAP-MSK}" 1528 # } 1529 # 1530 # You may want to delete the MS-MPPE-*-Keys from the reply, 1531 # as some WiMAX clients behave badly when those attributes 1532 # are included. See "raddb/modules/wimax", configuration 1533 # entry "delete_mppe_keys" for more information. 1534 # 1535# wimax 1536 1537 1538 # If there is a client certificate (EAP-TLS, sometimes PEAP 1539 # and TTLS), then some attributes are filled out after the 1540 # certificate verification has been performed. These fields 1541 # MAY be available during the authentication, or they may be 1542 # available only in the "post-auth" section. 1543 # 1544 # The first set of attributes contains information about the 1545 # issuing certificate which is being used. The second 1546 # contains information about the client certificate (if 1547 # available). 1548# 1549# update reply { 1550# Reply-Message += "%{TLS-Cert-Serial}" 1551# Reply-Message += "%{TLS-Cert-Expiration}" 1552# Reply-Message += "%{TLS-Cert-Subject}" 1553# Reply-Message += "%{TLS-Cert-Issuer}" 1554# Reply-Message += "%{TLS-Cert-Common-Name}" 1555# Reply-Message += "%{TLS-Cert-Subject-Alt-Name-Email}" 1556# 1557# Reply-Message += "%{TLS-Client-Cert-Serial}" 1558# Reply-Message += "%{TLS-Client-Cert-Expiration}" 1559# Reply-Message += "%{TLS-Client-Cert-Subject}" 1560# Reply-Message += "%{TLS-Client-Cert-Issuer}" 1561# Reply-Message += "%{TLS-Client-Cert-Common-Name}" 1562# Reply-Message += "%{TLS-Client-Cert-Subject-Alt-Name-Email}" 1563# } 1564 1565 # Insert class attribute (with unique value) into response, 1566 # aids matching auth and acct records, and protects against duplicate 1567 # Acct-Session-Id. Note: Only works if the NAS has implemented 1568 # RFC 2865 behaviour for the class attribute, AND if the NAS 1569 # supports long Class attributes. Many older or cheap NASes 1570 # only support 16-octet Class attributes. 1571# insert_acct_class 1572 1573 # MacSEC requires the use of EAP-Key-Name. However, we don't 1574 # want to send it for all EAP sessions. Therefore, the EAP 1575 # modules put required data into the EAP-Session-Id attribute. 1576 # This attribute is never put into a request or reply packet. 1577 # 1578 # Uncomment the next few lines to copy the required data into 1579 # the EAP-Key-Name attribute 1580# if (&reply:EAP-Session-Id) { 1581# update reply { 1582# EAP-Key-Name := &reply:EAP-Session-Id 1583# } 1584# } 1585 1586 # Remove reply message if the response contains an EAP-Message 1587 #remove_reply_message_if_eap 1588 1589 # 1590 # Access-Reject packets are sent through the REJECT sub-section of the 1591 # post-auth section. 1592 # 1593 # Add the ldap module name (or instance) if you have set 1594 # 'edir_account_policy_check = yes' in the ldap module configuration 1595 # 1596 # The "session-state" attributes are not available here. 1597 Post-Auth-Type REJECT { 1598 # log failed authentications in SQL, too. 1599 attr_filter.access_reject 1600 1601 } 1602 1603 # 1604 1605 # 1606 # Filter access challenges. 1607 # 1608 Post-Auth-Type Challenge { 1609# remove_reply_message_if_eap 1610 attr_filter.access_challenge 1611 } 1612 1613} 1614 1615# 1616# When the server decides to proxy a request to a home server, 1617# the proxied request is first passed through the pre-proxy 1618# stage. This stage can re-write the request, or decide to 1619# cancel the proxy. 1620# 1621# Only a few modules currently have this method. 1622# 1623pre-proxy { 1624 # Before proxing the request add an Operator-Name attribute identifying 1625 # if the operator-name is found for this client. 1626 # No need to uncomment this if you have already enabled this in 1627 # the authorize section. 1628# operator-name 1629 1630 # The client requests the CUI by sending a CUI attribute 1631 # containing one zero byte. 1632 # Uncomment the line below if *requesting* the CUI. 1633# cui 1634 1635 # Uncomment the following line if you want to change attributes 1636 # as defined in the preproxy_users file. 1637# files 1638 1639 # Uncomment the following line if you want to filter requests 1640 # sent to remote servers based on the rules defined in the 1641 # 'attrs.pre-proxy' file. 1642# attr_filter.pre-proxy 1643 1644 # If you want to have a log of packets proxied to a home 1645 # server, un-comment the following line, and the 1646 # 'detail pre_proxy_log' section, above. 1647# pre_proxy_log 1648} 1649 1650# 1651# When the server receives a reply to a request it proxied 1652# to a home server, the request may be massaged here, in the 1653# post-proxy stage. 1654# 1655post-proxy { 1656 1657 # If you want to have a log of replies from a home server, 1658 # un-comment the following line, and the 'detail post_proxy_log' 1659 # section, above. 1660# post_proxy_log 1661 1662 # Uncomment the following line if you want to filter replies from 1663 # remote proxies based on the rules defined in the 'attrs' file. 1664# attr_filter.post-proxy 1665 1666 # 1667 # If you are proxying LEAP, you MUST configure the EAP 1668 # module, and you MUST list it here, in the post-proxy 1669 # stage. 1670 # 1671 # You MUST also use the 'nostrip' option in the 'realm' 1672 # configuration. Otherwise, the User-Name attribute 1673 # in the proxied request will not match the user name 1674 # hidden inside of the EAP packet, and the end server will 1675 # reject the EAP request. 1676 # 1677 eap 1678 1679 # 1680 # If the server tries to proxy a request and fails, then the 1681 # request is processed through the modules in this section. 1682 # 1683 # The main use of this section is to permit robust proxying 1684 # of accounting packets. The server can be configured to 1685 # proxy accounting packets as part of normal processing. 1686 # Then, if the home server goes down, accounting packets can 1687 # be logged to a local "detail" file, for processing with 1688 # radrelay. When the home server comes back up, radrelay 1689 # will read the detail file, and send the packets to the 1690 # home server. 1691 # 1692 # With this configuration, the server always responds to 1693 # Accounting-Requests from the NAS, but only writes 1694 # accounting packets to disk if the home server is down. 1695 # 1696# Post-Proxy-Type Fail-Accounting { 1697# detail 1698# } 1699} 1700} 1701