You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

templates.conf 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # -*- text -*-
  2. ##
  3. ## templates.conf -- configurations to be used in multiple places
  4. ##
  5. ## $Id: c26e7d3945427350ebe8995f6c197efaecec5eb4 $
  6. ######################################################################
  7. #
  8. # Version 2.0 has a useful new feature called "templates".
  9. #
  10. # Use templates by adding a line in radiusd.conf:
  11. #
  12. # $INCLUDE templates.conf
  13. #
  14. # The goal of the templates is to have common configuration located
  15. # in this file, and to list only the *differences* in the individual
  16. # sections. This feature is most useful for sections like "clients"
  17. # or "home_servers", where many may be defined, and each one has
  18. # similar repeated configuration.
  19. #
  20. # Something similar to templates can be done by putting common
  21. # configuration into separate files, and using "$INCLUDE file...",
  22. # but this is more flexible, and simpler to understand. It's also
  23. # cheaper for the server, because "$INCLUDE" makes a copy of the
  24. # configuration for inclusion, and templates are simply referenced.
  25. #
  26. # The templates are defined in the "templates" section, so that they
  27. # do not affect the rest of the server configuration.
  28. #
  29. # A section can reference a template by using "$template name"
  30. #
  31. templates {
  32. #
  33. # The contents of the templates section are other
  34. # configuration sections that would normally go into
  35. # the configuration files.
  36. #
  37. #
  38. # This is a default template for the "home_server" section.
  39. # Note that there is no name for the section.
  40. #
  41. # Any configuration item that is valid for a "home_server"
  42. # section is also valid here. When a "home_server" section
  43. # is defined in proxy.conf, this section is referenced as
  44. # the template.
  45. #
  46. # Configuration items that are explicitly listed in a
  47. # "home_server" section of proxy.conf are used in
  48. # preference to the configuration items listed here.
  49. #
  50. # However, if a configuration item is NOT listed in a
  51. # "home_server" section of proxy.conf, then the value here
  52. # is used.
  53. #
  54. # This functionality lets you put common configuration into
  55. # a template, and to put only the unique configuration
  56. # items in "proxy.conf". Each section in proxy.conf can
  57. # then contain a line "$template home_server", which will
  58. # cause it to reference this template.
  59. #
  60. home_server {
  61. response_window = 20
  62. zombie_period = 40
  63. revive_interval = 120
  64. #
  65. # Etc.
  66. }
  67. #
  68. # You can also have named templates. For example, if you
  69. # are proxying to 3 different home servers all at the same
  70. # site, with identical configurations (other than IP
  71. # addresses), you can use this named template.
  72. #
  73. # Then, each "home_server" section in "proxy.conf" would
  74. # only list the IP address of that home server, and a
  75. # line saying
  76. #
  77. # $template example_com
  78. #
  79. # That would tell FreeRADIUS to look in the section below
  80. # for the rest of the configuration items.
  81. #
  82. # For various reasons, you shouldn't have a "." in the template
  83. # name. Doing so means that the server will be unable to find
  84. # the template.
  85. #
  86. example_com {
  87. type = auth
  88. port = 1812
  89. secret = testing123
  90. response_window = 20
  91. #
  92. # Etc...
  93. }
  94. #
  95. # You can have templates for other sections, too, but they
  96. # seem to be most useful for home_servers.
  97. #
  98. # For now, you can use templates only for sections in
  99. # radiusd.conf, not sub-sections. So you still have to use
  100. # the "$INCLUDE file.." method for things like defining
  101. # multiple "sql" modules, each with similar configuration.
  102. #
  103. }