daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2012 20 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #
  2. ## radiusd.conf -- FreeRADIUS server configuration file.
  3. ##
  4. ##      http://www.freeradius.org/
  5. ##      $Id: radiusd.conf.in,v 1.188 2004/05/13 20:10:19 pnixon Exp $
  6. ##
  7.  
  8. #       The location of other config files and
  9. #       logfiles are declared in this file
  10. #
  11. #       Also general configuration for modules can be done
  12. #       in this file, it is exported through the API to
  13. #       modules that ask for it.
  14. #
  15. #       The configuration variables defined here are of the form ${foo}
  16. #       They are local to this file, and do not change from request to
  17. #       request.
  18. #
  19. #       The per-request variables are of the form %{Attribute-Name}, and
  20. #       are taken from the values of the attribute in the incoming
  21. #       request.  See 'doc/variables.txt' for more information.
  22.  
  23. prefix = /usr
  24. exec_prefix = /usr
  25. sysconfdir = /etc
  26. localstatedir = /var
  27. sbindir = /usr/sbin
  28. logdir = ${localstatedir}/log/radius
  29. raddbdir = ${sysconfdir}/raddb
  30. radacctdir = ${logdir}/radacct
  31.  
  32. #  Location of config and logfiles.
  33. confdir = ${raddbdir}
  34. run_dir = ${localstatedir}/run/radiusd
  35.  
  36. #
  37. #  The logging messages for the server are appended to the
  38. #  tail of this file.
  39. #
  40. log_file = ${logdir}/radius.log
  41.  
  42. #
  43. # libdir: Where to find the rlm_* modules.
  44. #
  45. #   This should be automatically set at configuration time.
  46. #
  47. #   If the server builds and installs, but fails at execution time
  48. #   with an 'undefined symbol' error, then you can use the libdir
  49. #   directive to work around the problem.
  50. #
  51. #   The cause is usually that a library has been installed on your
  52. #   system in a place where the dynamic linker CANNOT find it.  When
  53. #   executing as root (or another user), your personal environment MAY
  54. #   be set up to allow the dynamic linker to find the library.  When
  55. #   executing as a daemon, FreeRADIUS MAY NOT have the same
  56. #   personalized configuration.
  57. #
  58. #   To work around the problem, find out which library contains that symbol,
  59. #   and add the directory containing that library to the end of 'libdir',
  60. #   with a colon separating the directory names.  NO spaces are allowed.
  61. #
  62. #   e.g. libdir = /usr/local/lib:/opt/package/lib
  63. #
  64. #   You can also try setting the LD_LIBRARY_PATH environment variable
  65. #   in a script which starts the server.
  66. #
  67. #   If that does not work, then you can re-configure and re-build the
  68. #   server to NOT use shared libraries, via:
  69. #
  70. #       ./configure --disable-shared
  71. #       make
  72. #       make install
  73. #
  74. libdir = /usr/lib
  75.  
  76. #  pidfile: Where to place the PID of the RADIUS server.
  77. #
  78. #  The server may be signalled while it's running by using this
  79. #  file.
  80. #
  81. #  This file is written when ONLY running in daemon mode.
  82. #
  83. #  e.g.:  kill -HUP `cat /var/run/radiusd/radiusd.pid`
  84. #
  85. pidfile = ${run_dir}/radiusd.pid
  86.  
  87.  
  88. # user/group: The name (or #number) of the user/group to run radiusd as.
  89. #
  90. #   If these are commented out, the server will run as the user/group
  91. #   that started it.  In order to change to a different user/group, you
  92. #   MUST be root ( or have root privleges ) to start the server.
  93. #
  94. #   We STRONGLY recommend that you run the server with as few permissions
  95. #   as possible.  That is, if you're not using shadow passwords, the
  96. #   user and group items below should be set to 'nobody'.
  97. #
  98. #    On SCO (ODT 3) use "user = nouser" and "group = nogroup".
  99. #
  100. #  NOTE that some kernels refuse to setgid(group) when the value of
  101. #  (unsigned)group is above 60000; don't use group nobody on these systems!
  102. #
  103. #  On systems with shadow passwords, you might have to set 'group = shadow'
  104. #  for the server to be able to read the shadow password file.  If you can
  105. #  authenticate users while in debug mode, but not in daemon mode, it may be
  106. #  that the debugging mode server is running as a user that can read the
  107. #  shadow info, and the user listed below can not.
  108. #
  109. user = radiusd
  110. group = radiusd
  111.  
  112. #  max_request_time: The maximum time (in seconds) to handle a request.
  113. #
  114. #  Requests which take more time than this to process may be killed, and
  115. #  a REJECT message is returned.
  116. #
  117. #  WARNING: If you notice that requests take a long time to be handled,
  118. #  then this MAY INDICATE a bug in the server, in one of the modules
  119. #  used to handle a request, OR in your local configuration.
  120. #
  121. #  This problem is most often seen when using an SQL database.  If it takes
  122. #  more than a second or two to receive an answer from the SQL database,
  123. #  then it probably means that you haven't indexed the database.  See your
  124. #  SQL server documentation for more information.
  125. #
  126. #  Useful range of values: 5 to 120
  127. #
  128. max_request_time = 30
  129.  
  130. #  delete_blocked_requests: If the request takes MORE THAN 'max_request_time'
  131. #  to be handled, then maybe the server should delete it.
  132. #
  133. #  If you're running in threaded, or thread pool mode, this setting
  134. #  should probably be 'no'.  Setting it to 'yes' when using a threaded
  135. #  server MAY cause the server to crash!
  136. #
  137. delete_blocked_requests = no
  138.  
  139. #  cleanup_delay: The time to wait (in seconds) before cleaning up
  140. #  a reply which was sent to the NAS.
  141. #
  142. #  The RADIUS request is normally cached internally for a short period
  143. #  of time, after the reply is sent to the NAS.  The reply packet may be
  144. #  lost in the network, and the NAS will not see it.  The NAS will then
  145. #  re-send the request, and the server will respond quickly with the
  146. #  cached reply.
  147. #
  148. #  If this value is set too low, then duplicate requests from the NAS
  149. #  MAY NOT be detected, and will instead be handled as seperate requests.
  150. #
  151. #  If this value is set too high, then the server will cache too many
  152. #  requests, and some new requests may get blocked.  (See 'max_requests'.)
  153. #
  154. #  Useful range of values: 2 to 10
  155. #
  156. cleanup_delay = 5
  157.  
  158. #  max_requests: The maximum number of requests which the server keeps
  159. #  track of.  This should be 256 multiplied by the number of clients.
  160. #  e.g. With 4 clients, this number should be 1024.
  161. #
  162. #  If this number is too low, then when the server becomes busy,
  163. #  it will not respond to any new requests, until the 'cleanup_delay'
  164. #  time has passed, and it has removed the old requests.
  165. #
  166. #  If this number is set too high, then the server will use a bit more
  167. #  memory for no real benefit.
  168. #
  169. #  If you aren't sure what it should be set to, it's better to set it
  170. #  too high than too low.  Setting it to 1000 per client is probably
  171. #  the highest it should be.
  172. #
  173. #  Useful range of values: 256 to infinity
  174. #
  175. max_requests = 1024
  176.  
  177. #  bind_address:  Make the server listen on a particular IP address, and
  178. #  send replies out from that address.  This directive is most useful
  179. #  for machines with multiple IP addresses on one interface.
  180. #
  181. #  It can either contain "*", or an IP address, or a fully qualified
  182. #  Internet domain name.  The default is "*"
  183. #
  184. #  As of 1.0, you can also use the "listen" directive.  See below for
  185. #  more information.
  186. #
  187. bind_address = *
  188.  
  189. #  port: Allows you to bind FreeRADIUS to a specific port.
  190. #
  191. #  The default port that most NAS boxes use is 1645, which is historical.
  192. #  RFC 2138 defines 1812 to be the new port.  Many new servers and
  193. #  NAS boxes use 1812, which can create interoperability problems.
  194. #
  195. #  The port is defined here to be 0 so that the server will pick up
  196. #  the machine's local configuration for the radius port, as defined
  197. #  in /etc/services.
  198. #
  199. #  If you want to use the default RADIUS port as defined on your server,
  200. #  (usually through 'grep radius /etc/services') set this to 0 (zero).
  201. #
  202. #  A port given on the command-line via '-p' over-rides this one.
  203. #
  204. #  As of 1.0, you can also use the "listen" directive.  See below for
  205. #  more information.
  206. #
  207.  
  208. #
  209. #  By default, the server uses "bind_address" to listen to all IP's
  210. #  on a machine, or just one IP.  The "port" configuration is used
  211. #  to select the authentication port used when listening on those
  212. #  addresses.
  213. #
  214. #  If you want the server to listen on additional addresses, you can
  215. #  use the "listen" section.  A sample section (commented out) is included
  216. #  below.  This "listen" section duplicates the functionality of the
  217. #  "bind_address" and "port" configuration entries, but it only listens
  218. #  for authentication packets.
  219. #
  220. #  If you comment out the "bind_address" and "port" configuration entries,
  221. #  then it becomes possible to make the server accept only accounting,
  222. #  or authentication packets.  Previously, it always listened for both
  223. #  types of packets, and it was impossible to make it listen for only
  224. #  one type of packet.
  225. #
  226. #listen {
  227.         #  IP address on which to listen.
  228.         #  Allowed values are:
  229.         #       dotted quad (1.2.3.4)
  230.         #       hostname    (radius.example.com)
  231.         #       wildcard    (*)
  232. #       ipaddr = *
  233.  
  234.         #  Port on which to listen.
  235.         #  Allowed values are:
  236.         #       integer port number (1812)
  237.         #       0 means "use /etc/services for the proper port"
  238. #       port = 0
  239.  
  240.         #  Type of packets to listen for.
  241.         #  Allowed values are:
  242.         #       auth    listen for authentication packets
  243.         #       acct    listen for accounting packets
  244.         #
  245. #       type = auth
  246. #}
  247.  
  248.  
  249. #  hostname_lookups: Log the names of clients or just their IP addresses
  250. #  e.g., www.freeradius.org (on) or 206.47.27.232 (off).
  251. #
  252. #  The default is 'off' because it would be overall better for the net
  253. #  if people had to knowingly turn this feature on, since enabling it
  254. #  means that each client request will result in AT LEAST one lookup
  255. #  request to the nameserver.   Enabling hostname_lookups will also
  256. #  mean that your server may stop randomly for 30 seconds from time
  257. #  to time, if the DNS requests take too long.
  258. #
  259. #  Turning hostname lookups off also means that the server won't block
  260. #  for 30 seconds, if it sees an IP address which has no name associated
  261. #  with it.
  262. #
  263. #  allowed values: {no, yes}
  264. #
  265. hostname_lookups = no
  266.  
  267. #  Core dumps are a bad thing.  This should only be set to 'yes'
  268. #  if you're debugging a problem with the server.
  269. #
  270. #  allowed values: {no, yes}
  271. #
  272. allow_core_dumps = no
  273.  
  274. #  Regular expressions
  275. #
  276. #  These items are set at configure time.  If they're set to "yes",
  277. #  then setting them to "no" turns off regular expression support.
  278. #
  279. #  If they're set to "no" at configure time, then setting them to "yes"
  280. #  WILL NOT WORK.  It will give you an error.
  281. #
  282. regular_expressions     = yes
  283. extended_expressions    = yes
  284.  
  285. #  Log the full User-Name attribute, as it was found in the request.
  286. #
  287. # allowed values: {no, yes}
  288. #
  289. log_stripped_names = no
  290.  
  291. #  Log authentication requests to the log file.
  292. #
  293. #  allowed values: {no, yes}
  294. #
  295. log_auth = no
  296.  
  297. #  Log passwords with the authentication requests.
  298. #  log_auth_badpass  - logs password if it's rejected
  299. #  log_auth_goodpass - logs password if it's correct
  300. #
  301. #  allowed values: {no, yes}
  302. #
  303. log_auth_badpass = no
  304. log_auth_goodpass = no
  305.  
  306. # usercollide:  Turn "username collision" code on and off.  See the
  307. # "doc/duplicate-users" file
  308. #
  309. #  WARNING
  310. #  !!!!!!!  Setting this to "yes" may result in the server behaving
  311. #  !!!!!!!  strangely.  The "username collision" code will ONLY work
  312. #  !!!!!!!  with clear-text passwords.  Even then, it may not do what
  313. #  !!!!!!!  you want, or what you expect.
  314. #  !!!!!!!
  315. #  !!!!!!!  We STRONGLY RECOMMEND that you do not use this feature,
  316. #  !!!!!!!  and that you find another way of acheiving the same goal.
  317. #  !!!!!!!
  318. #  !!!!!!!  e,g. module fail-over.  See 'doc/configurable_failover'
  319. #  WARNING
  320. #
  321. usercollide = no
  322.  
  323. # lower_user / lower_pass:  
  324. # Lower case the username/password "before" or "after"
  325. # attempting to authenticate.  
  326. #
  327. #  If "before", the server will first modify the request and then try
  328. #  to auth the user.  If "after", the server will first auth using the
  329. #  values provided by the user.  If that fails it will reprocess the
  330. #  request after modifying it as you specify below.
  331. #
  332. #  This is as close as we can get to case insensitivity.  It is the
  333. #  admin's job to ensure that the username on the auth db side is
  334. #  *also* lowercase to make this work
  335. #
  336. # Default is 'no' (don't lowercase values)
  337. # Valid values = "before" / "after" / "no"
  338. #
  339. lower_user = no
  340. lower_pass = no
  341.  
  342. # nospace_user / nospace_pass:
  343. #
  344. #  Some users like to enter spaces in their username or password
  345. #  incorrectly.  To save yourself the tech support call, you can
  346. #  eliminate those spaces here:
  347. #
  348. # Default is 'no' (don't remove spaces)
  349. # Valid values = "before" / "after" / "no" (explanation above)
  350. #
  351. nospace_user = no
  352. nospace_pass = no
  353.  
  354. #  The program to execute to do concurrency checks.
  355. checkrad = ${sbindir}/checkrad
  356.  
  357. # SECURITY CONFIGURATION
  358. #
  359. #  There may be multiple methods of attacking on the server.  This
  360. #  section holds the configuration items which minimize the impact
  361. #  of those attacks
  362. #
  363. security {
  364.         #
  365.         #  max_attributes: The maximum number of attributes
  366.         #  permitted in a RADIUS packet.  Packets which have MORE
  367.         #  than this number of attributes in them will be dropped.
  368.         #
  369.         #  If this number is set too low, then no RADIUS packets
  370.         #  will be accepted.
  371.         #
  372.         #  If this number is set too high, then an attacker may be
  373.         #  able to send a small number of packets which will cause
  374.         #  the server to use all available memory on the machine.
  375.         #
  376.         #  Setting this number to 0 means "allow any number of attributes"
  377.         max_attributes = 200
  378.  
  379.         #
  380.         #  delayed_reject: When sending an Access-Reject, it can be
  381.         #  delayed for a few seconds.  This may help slow down a DoS
  382.         #  attack.  It also helps to slow down people trying to brute-force
  383.         #  crack a users password.
  384.         #
  385.         #  Setting this number to 0 means "send rejects immediately"
  386.         #
  387.         #  If this number is set higher than 'cleanup_delay', then the
  388.         #  rejects will be sent at 'cleanup_delay' time, when the request
  389.         #  is deleted from the internal cache of requests.
  390.         #
  391.         #  Useful ranges: 1 to 5
  392.         reject_delay = 1
  393.  
  394.         #
  395.         #  status_server: Whether or not the server will respond
  396.         #  to Status-Server requests.
  397.         #
  398.         #  Normally this should be set to "no", because they're useless.
  399.         #  See: http://www.freeradius.org/rfc/rfc2865.html#Keep-Alives
  400.         #
  401.         #  However, certain NAS boxes may require them.
  402.         #
  403.         #  When sent a Status-Server message, the server responds with
  404.         #  an Access-Accept packet, containing a Reply-Message attribute,
  405.         #  which is a string describing how long the server has been
  406.         #  running.
  407.         #
  408.         status_server = no
  409. }
  410.  
  411. # PROXY CONFIGURATION
  412. #
  413. #  proxy_requests: Turns proxying of RADIUS requests on or off.
  414. #
  415. #  The server has proxying turned on by default.  If your system is NOT
  416. #  set up to proxy requests to another server, then you can turn proxying
  417. #  off here.  This will save a small amount of resources on the server.
  418. #
  419. #  If you have proxying turned off, and your configuration files say
  420. #  to proxy a request, then an error message will be logged.
  421. #
  422. #  To disable proxying, change the "yes" to "no", and comment the
  423. #  $INCLUDE line.
  424. #
  425. #  allowed values: {no, yes}
  426. #
  427. proxy_requests  = no
  428. $INCLUDE  ${confdir}/proxy.conf
  429. # CLIENTS CONFIGURATION
  430. #
  431. #  Client configuration is defined in "clients.conf".  
  432. #
  433.  
  434. #  The 'clients.conf' file contains all of the information from the old
  435. #  'clients' and 'naslist' configuration files.  We recommend that you
  436. #  do NOT use 'client's or 'naslist', although they are still
  437. #  supported.
  438. #
  439. #  Anything listed in 'clients.conf' will take precedence over the
  440. #  information from the old-style configuration files.
  441. #
  442. $INCLUDE  ${confdir}/clients.conf
  443.  
  444.  
  445. # SNMP CONFIGURATION
  446. #
  447. #  Snmp configuration is only valid if SNMP support was enabled
  448. #  at compile time.
  449. #
  450. #  To enable SNMP querying of the server, set the value of the
  451. #  'snmp' attribute to 'yes'
  452. #
  453. snmp    = no
  454. $INCLUDE  ${confdir}/snmp.conf
  455.  
  456.  
  457. # THREAD POOL CONFIGURATION
  458. #
  459. #  The thread pool is a long-lived group of threads which
  460. #  take turns (round-robin) handling any incoming requests.
  461. #
  462. #  You probably want to have a few spare threads around,
  463. #  so that high-load situations can be handled immediately.  If you
  464. #  don't have any spare threads, then the request handling will
  465. #  be delayed while a new thread is created, and added to the pool.
  466. #
  467. #  You probably don't want too many spare threads around,
  468. #  otherwise they'll be sitting there taking up resources, and
  469. #  not doing anything productive.
  470. #
  471. #  The numbers given below should be adequate for most situations.
  472. #
  473. thread pool {
  474.         #  Number of servers to start initially --- should be a reasonable
  475.         #  ballpark figure.
  476.         start_servers = 5
  477.  
  478.         #  Limit on the total number of servers running.
  479.         #
  480.         #  If this limit is ever reached, clients will be LOCKED OUT, so it
  481.         #  should NOT BE SET TOO LOW.  It is intended mainly as a brake to
  482.         #  keep a runaway server from taking the system with it as it spirals
  483.         #  down...
  484.         #
  485.         #  You may find that the server is regularly reaching the
  486.         #  'max_servers' number of threads, and that increasing
  487.         #  'max_servers' doesn't seem to make much difference.
  488.         #
  489.         #  If this is the case, then the problem is MOST LIKELY that
  490.         #  your back-end databases are taking too long to respond, and
  491.         #  are preventing the server from responding in a timely manner.
  492.         #
  493.         #  The solution is NOT do keep increasing the 'max_servers'
  494.         #  value, but instead to fix the underlying cause of the
  495.         #  problem: slow database, or 'hostname_lookups=yes'.
  496.         #
  497.         #  For more information, see 'max_request_time', above.
  498.         #
  499.         max_servers = 32
  500.  
  501.         #  Server-pool size regulation.  Rather than making you guess
  502.         #  how many servers you need, FreeRADIUS dynamically adapts to
  503.         #  the load it sees, that is, it tries to maintain enough
  504.         #  servers to handle the current load, plus a few spare
  505.         #  servers to handle transient load spikes.
  506.         #
  507.         #  It does this by periodically checking how many servers are
  508.         #  waiting for a request.  If there are fewer than
  509.         #  min_spare_servers, it creates a new spare.  If there are
  510.         #  more than max_spare_servers, some of the spares die off.
  511.         #  The default values are probably OK for most sites.
  512.         #
  513.         min_spare_servers = 3
  514.         max_spare_servers = 10
  515.  
  516.         #  There may be memory leaks or resource allocation problems with
  517.         #  the server.  If so, set this value to 300 or so, so that the
  518.         #  resources will be cleaned up periodically.
  519.         #
  520.         #  This should only be necessary if there are serious bugs in the
  521.         #  server which have not yet been fixed.
  522.         #
  523.         #  '0' is a special value meaning 'infinity', or 'the servers never
  524.         #  exit'
  525.         max_requests_per_server = 0
  526. }
  527.  
  528. # MODULE CONFIGURATION
  529. #
  530. #  The names and configuration of each module is located in this section.
  531. #
  532. #  After the modules are defined here, they may be referred to by name,
  533. #  in other sections of this configuration file.
  534. #
  535. modules {
  536.         #
  537.         #  Each module has a configuration as follows:
  538. $INCLUDE  ${confdir}/sqlcounter.conf
  539.  
  540.         #
  541.         #       name [ instance ] {
  542.         #               config_item = value
  543.         #               ...
  544.         #       }
  545.         #
  546.         #  The 'name' is used to load the 'rlm_name' library
  547.         #  which implements the functionality of the module.
  548.         #
  549.         #  The 'instance' is optional.  To have two different instances
  550.         #  of a module, it first must be referred to by 'name'.
  551.         #  The different copies of the module are then created by
  552.         #  inventing two 'instance' names, e.g. 'instance1' and 'instance2'
  553.         #
  554.         #  The instance names can then be used in later configuration
  555.         #  INSTEAD of the original 'name'.  See the 'radutmp' configuration
  556.         #  below for an example.
  557.         #
  558.  
  559.         # PAP module to authenticate users based on their stored password
  560.         #
  561.         #  Supports multiple encryption schemes
  562.         #  clear: Clear text
  563.         #  crypt: Unix crypt
  564.         #    md5: MD5 ecnryption
  565.         #   sha1: SHA1 encryption.
  566.         #  DEFAULT: crypt
  567.         pap {
  568.                 encryption_scheme = crypt
  569.         }
  570.  
  571.         # CHAP module
  572.         #
  573.         #  To authenticate requests containing a CHAP-Password attribute.
  574.         #
  575.         chap {
  576.                 authtype = CHAP
  577.         }
  578.  
  579.         # Pluggable Authentication Modules
  580.         #
  581.         #  For Linux, see:
  582.         #       http://www.kernel.org/pub/linux/libs/pam/index.html
  583.         #
  584.         #  WARNING: On many systems, the system PAM libraries have
  585.         #           memory leaks!  We STRONGLY SUGGEST that you do not
  586.         #           use PAM for authentication, due to those memory leaks.
  587.         #
  588.         pam {
  589.                 #
  590.                 #  The name to use for PAM authentication.
  591.                 #  PAM looks in /etc/pam.d/${pam_auth_name}
  592.                 #  for it's configuration.  See 'redhat/radiusd-pam'
  593.                 #  for a sample PAM configuration file.
  594.                 #
  595.                 #  Note that any Pam-Auth attribute set in the 'authorize'
  596.                 #  section will over-ride this one.
  597.                 #
  598.                 pam_auth = radiusd
  599.         }
  600.  
  601.         # Unix /etc/passwd style authentication
  602.         #
  603.         unix {
  604.                 #
  605.                 #  Cache /etc/passwd, /etc/shadow, and /etc/group
  606.                 #
  607.                 #  The default is to NOT cache them.
  608.                 #
  609.                 #  For FreeBSD and NetBSD, you do NOT want to enable
  610.                 #  the cache, as it's password lookups are done via a
  611.                 #  database, so set this value to 'no'.
  612.                 #
  613.                 #  Some systems (e.g. RedHat Linux with pam_pwbd) can
  614.                 #  take *seconds* to check a password, when th passwd
  615.                 #  file containing 1000's of entries.  For those systems,
  616.                 #  you should set the cache value to 'yes', and set
  617.                 #  the locations of the 'passwd', 'shadow', and 'group'
  618.                 #  files, below.
  619.                 #
  620.                 # allowed values: {no, yes}
  621.                 cache = no
  622.  
  623.                 # Reload the cache every 600 seconds (10mins). 0 to disable.
  624.                 cache_reload = 600
  625.  
  626.                 #
  627.                 #  Define the locations of the normal passwd, shadow, and
  628.                 #  group files.
  629.                 #
  630.                 #  'shadow' is commented out by default, because not all
  631.                 #  systems have shadow passwords.
  632.                 #
  633.                 #  To force the module to use the system password functions,
  634.                 #  instead of reading the files, leave the following entries
  635.                 #  commented out.
  636.                 #
  637.                 #  This is required for some systems, like FreeBSD,
  638.                 #  and Mac OSX.
  639.                 #
  640.                 #       passwd = /etc/passwd
  641.                 shadow = /etc/shadow
  642.                 #       group = /etc/group
  643.  
  644.                 #
  645.                 #  The location of the "wtmp" file.
  646.                 #  This should be moved to it's own module soon.
  647.                 #
  648.                 #  The only use for 'radlast'.  If you don't use
  649.                 #  'radlast', then you can comment out this item.
  650.                 #
  651.                 radwtmp = ${logdir}/radwtmp
  652.         }
  653.  
  654.         #  Extensible Authentication Protocol
  655.         #
  656.         #  For all EAP related authentications.
  657.         #  Now in another file, because it is very large.
  658.         #
  659. $INCLUDE ${confdir}/eap.conf
  660.  
  661.         # Microsoft CHAP authentication
  662.         #
  663.         #  This module supports MS-CHAP and MS-CHAPv2 authentication.
  664.         #  It also enforces the SMB-Account-Ctrl attribute.
  665.         #
  666.         mschap {
  667.                 #
  668.                 #  As of 0.9, the mschap module does NOT support
  669.                 #  reading from /etc/smbpasswd.
  670.                 #
  671.                 #  If you are using /etc/smbpasswd, see the 'passwd'
  672.                 #  module for an example of how to use /etc/smbpasswd
  673.  
  674.                 # authtype value, if present, will be used
  675.                 # to overwrite (or add) Auth-Type during
  676.                 # authorization. Normally should be MS-CHAP
  677.                 authtype = MS-CHAP
  678.                
  679.                 # if use_mppe is not set to no mschap will
  680.                 # add MS-CHAP-MPPE-Keys for MS-CHAPv1 and
  681.                 # MS-MPPE-Recv-Key/MS-MPPE-Send-Key for MS-CHAPv2
  682.                 #
  683.                 #use_mppe = no
  684.  
  685.                 # if mppe is enabled require_encryption makes
  686.                 # encryption moderate
  687.                 #
  688.                 #require_encryption = yes
  689.  
  690.                 # require_strong always requires 128 bit key
  691.                 # encryption
  692.                 #
  693.                 #require_strong = yes
  694.  
  695.                 # Windows sends us a username in the form of
  696.                 # DOMAIN\user, but sends the challenge response
  697.                 # based on only the user portion.  This hack
  698.                 # corrects for that incorrect behavior.
  699.                 #
  700.                 #with_ntdomain_hack = no
  701.  
  702.                 # The module can perform authentication itself, OR
  703.                 # use a Windows Domain Controller.  This configuration
  704.                 # directive tells the module to call the ntlm_auth
  705.                 # program, which will do the authentication, and return
  706.                 # the NT-Key.  Note that you MUST have "winbindd" and
  707.                 # "nmbd" running on the local machine for ntlm_auth
  708.                 # to work.  See the ntlm_auth program documentation
  709.                 # for details.
  710.                 #
  711.                 # Be VERY careful when editing the following line!
  712.                 #
  713.                 #ntlm_auth = "/path/to/ntlm_auth --request-nt-key --username=%{Stripped-User-Name:-%{User-Name:-None}} --challenge=%{mschap:Challenge:-00} --nt-response=%{mschap:NT-Response:-00}"
  714.         }
  715.  
  716.         # Lightweight Directory Access Protocol (LDAP)
  717.         #
  718.         #  This module definition allows you to use LDAP for
  719.         #  authorization and authentication (Auth-Type := LDAP)
  720.         #
  721.         #  See doc/rlm_ldap for description of configuration options
  722.         #  and sample authorize{} and authenticate{} blocks
  723.         ldap {
  724.                 server = "ldap.your.domain"
  725.                 # identity = "cn=admin,o=My Org,c=UA"
  726.                 # password = mypass
  727.                 basedn = "o=My Org,c=UA"
  728.                 filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
  729.                 # base_filter = "(objectclass=radiusprofile)"
  730.  
  731.                 # set this to 'yes' to use TLS encrypted connections
  732.                 # to the LDAP database by using the StartTLS extended
  733.                 # operation.
  734.                 # The StartTLS operation is supposed to be used with normal
  735.                 # ldap connections instead of using ldaps (port 689) connections
  736.                 start_tls = no
  737.  
  738.                 # tls_cacertfile        = /path/to/cacert.pem
  739.                 # tls_cacertdir         = /path/to/ca/dir/
  740.                 # tls_certfile          = /path/to/radius.crt
  741.                 # tls_keyfile           = /path/to/radius.key
  742.                 # tls_randfile          = /path/to/rnd
  743.                 # tls_require_cert      = "demand"
  744.  
  745.                 # default_profile = "cn=radprofile,ou=dialup,o=My Org,c=UA"
  746.                 # profile_attribute = "radiusProfileDn"
  747.                 access_attr = "dialupAccess"
  748.  
  749.                 # Mapping of RADIUS dictionary attributes to LDAP
  750.                 # directory attributes.
  751.                 dictionary_mapping = ${raddbdir}/ldap.attrmap
  752.  
  753.                 ldap_connections_number = 5
  754.  
  755.                 #
  756.                 # NOTICE: The password_header directive is NOT case insensitive
  757.                 #
  758.                 # password_header = "{clear}"
  759.                 #
  760.                 #  The server can usually figure this out on its own, and pull
  761.                 #  the correct User-Password or NT-Password from the database.
  762.                 #
  763.                 #  Note that NT-Passwords MUST be stored as a 32-digit hex
  764.                 #  string, and MUST start off with "0x", such as:
  765.                 #
  766.                 #       0x000102030405060708090a0b0c0d0e0f
  767.                 #
  768.                 #  Without the leading "0x", NT-Passwords will not work.
  769.                 #  This goes for NT-Passwords stored in SQL, too.
  770.                 #
  771.                 # password_attribute = userPassword
  772.                 # groupname_attribute = cn
  773.                 # groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
  774.                 # groupmembership_attribute = radiusGroupName
  775.                 timeout = 4
  776.                 timelimit = 3
  777.                 net_timeout = 1
  778.                 # compare_check_items = yes
  779.                 # do_xlat = yes
  780.                 # access_attr_used_for_allow = yes
  781.         }
  782.  
  783.         # passwd module allows to do authorization via any passwd-like
  784.         # file and to extract any attributes from these modules
  785.         #
  786.         # parameters are:
  787.         #   filename - path to filename
  788.         #   format - format for filename record. This parameters
  789.         #            correlates record in the passwd file and RADIUS
  790.         #            attributes.
  791.         #
  792.         #            Field marked as '*' is key field. That is, the parameter
  793.         #            with this name from the request is used to search for
  794.         #            the record from passwd file
  795.         #            Attribute marked as '=' is added to reply_itmes instead
  796.         #            of default configure_itmes
  797.         #            Attribute marked as '~' is added to request_items
  798.         #
  799.         #            Field marked as ',' may contain a comma separated list
  800.         #            of attributes.
  801.         #   authtype - if record found this Auth-Type is used to authenticate
  802.         #            user
  803.         #   hashsize - hashtable size. If 0 or not specified records are not
  804.         #            stored in memory and file is red on every request.
  805.         #   allowmultiplekeys - if few records for every key are allowed
  806.         #   ignorenislike - ignore NIS-related records
  807.         #   delimiter - symbol to use as a field separator in passwd file,
  808.         #            for format ':' symbol is always used. '\0', '\n' are
  809.         #            not allowed
  810.         #
  811.  
  812.         #  An example configuration for using /etc/smbpasswd.
  813.         #
  814.         #passwd etc_smbpasswd {
  815.         #       filename = /etc/smbpasswd
  816.         #       format = "*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::"
  817.         #       authtype = MS-CHAP
  818.         #       hashsize = 100
  819.         #       ignorenislike = no
  820.         #       allowmultiplekeys = no
  821.         #}
  822.  
  823.         #  Similar configuration, for the /etc/group file. Adds a Group-Name
  824.         #  attribute for every group that the user is member of.
  825.         #
  826.         #passwd etc_group {
  827.         #       filename = /etc/group
  828.         #       format = "=Group-Name:::*,User-Name"
  829.         #       hashsize = 50
  830.         #       ignorenislike = yes
  831.         #       allowmultiplekeys = yes
  832.         #       delimiter = ":"
  833.         #}
  834.  
  835.         # Realm module, for proxying.
  836.         #
  837.         #  You can have multiple instances of the realm module to
  838.         #  support multiple realm syntaxs at the same time.  The
  839.         #  search order is defined by the order in the authorize and
  840.         #  preacct sections.
  841.         #
  842.         #  Four config options:
  843.         #       format         -  must be 'prefix' or 'suffix'
  844.         #       delimiter      -  must be a single character
  845.         #       ignore_default -  set to 'yes' or 'no'
  846.         #       ignore_null    -  set to 'yes' or 'no'
  847.         #
  848.         #  ignore_default and ignore_null can be set to 'yes' to prevent
  849.         #  the module from matching against DEFAULT or NULL realms.  This
  850.         #  may be useful if you have have multiple instances of the
  851.         #  realm module.
  852.         #
  853.         #  They both default to 'no'.
  854.         #
  855.  
  856.         #  'realm/username'
  857.         #
  858.         #  Using this entry, IPASS users have their realm set to "IPASS".
  859.         realm IPASS {
  860.                 format = prefix
  861.                 delimiter = "/"
  862.                 ignore_default = no
  863.                 ignore_null = no
  864.         }
  865.  
  866.         #  'username@realm'
  867.         #
  868.         realm suffix {
  869.                 format = suffix
  870.                 delimiter = "@"
  871.                 ignore_default = no
  872.                 ignore_null = no
  873.         }
  874.  
  875.         #  'username%realm'
  876.         #
  877.         realm realmpercent {
  878.                 format = suffix
  879.                 delimiter = "%"
  880.                 ignore_default = no
  881.                 ignore_null = no
  882.         }
  883.  
  884.         #
  885.         #  'domain\user'
  886.         #
  887.         realm ntdomain {
  888.                 format = prefix
  889.                 delimiter = "\\"
  890.                 ignore_default = no
  891.                 ignore_null = no
  892.         }      
  893.  
  894.         #  A simple value checking module
  895.         #
  896.         #  It can be used to check if an attribute value in the request
  897.         #  matches a (possibly multi valued) attribute in the check
  898.         #  items This can be used for example for caller-id
  899.         #  authentication.  For the module to run, both the request
  900.         #  attribute and the check items attribute must exist
  901.         #
  902.         #  i.e.
  903.         #  A user has an ldap entry with 2 radiusCallingStationId
  904.         #  attributes with values "12345678" and "12345679".  If we
  905.         #  enable rlm_checkval, then any request which contains a
  906.         #  Calling-Station-Id with one of those two values will be
  907.         #  accepted.  Requests with other values for
  908.         #  Calling-Station-Id will be rejected.
  909.         #
  910.         #  Regular expressions in the check attribute value are allowed
  911.         #  as long as the operator is '=~'
  912.         #
  913.         checkval {
  914.                 # The attribute to look for in the request
  915.                 item-name = Calling-Station-Id
  916.  
  917.                 # The attribute to look for in check items. Can be multi valued
  918.                 check-name = Calling-Station-Id
  919.  
  920.                 # The data type. Can be
  921.                 # string,integer,ipaddr,date,abinary,octets
  922.                 data-type = string
  923.  
  924.                 # If set to yes and we dont find the item-name attribute in the
  925.                 # request then we send back a reject
  926.                 # DEFAULT is no
  927.                 #notfound-reject = no
  928.         }
  929.        
  930.         #  rewrite arbitrary packets.  Useful in accounting and authorization.
  931.         #
  932.         #
  933.         #  The module can also use the Rewrite-Rule attribute. If it
  934.         #  is set and matches the name of the module instance, then
  935.         #  that module instance will be the only one which runs.
  936.         #
  937.         #  Also if new_attribute is set to yes then a new attribute
  938.         #  will be created containing the value replacewith and it
  939.         #  will be added to searchin (packet, reply, proxy, proxy_reply or config).
  940.         # searchfor,ignore_case and max_matches will be ignored in that case.
  941.         #
  942.         # Backreferences are supported: %{0} will contain the string the whole match
  943.         # and %{1} to %{8} will contain the contents of the 1st to the 8th parentheses
  944.         #
  945.         # If max_matches is greater than one the backreferences will correspond to the
  946.         # first match
  947.  
  948.         #
  949.         #attr_rewrite sanecallerid {
  950.         #       attribute = Called-Station-Id
  951.                 # may be "packet", "reply", "proxy", "proxy_reply" or "config"
  952.         #       searchin = packet
  953.         #       searchfor = "[+ ]"
  954.         #       replacewith = ""
  955.         #       ignore_case = no
  956.         #       new_attribute = no
  957.         #       max_matches = 10
  958.         #       ## If set to yes then the replace string will be appended to the original string
  959.         #       append = no
  960.         #}
  961.  
  962.         # Preprocess the incoming RADIUS request, before handing it off
  963.         # to other modules.
  964.         #
  965.         #  This module processes the 'huntgroups' and 'hints' files.
  966.         #  In addition, it re-writes some weird attributes created
  967.         #  by some NASes, and converts the attributes into a form which
  968.         #  is a little more standard.
  969.         #
  970.         preprocess {
  971.                 huntgroups = ${confdir}/huntgroups
  972.                 hints = ${confdir}/hints
  973.  
  974.                 # This hack changes Ascend's wierd port numberings
  975.                 # to standard 0-??? port numbers so that the "+" works
  976.                 # for IP address assignments.
  977.                 with_ascend_hack = no
  978.                 ascend_channels_per_line = 23
  979.  
  980.                 # Windows NT machines often authenticate themselves as
  981.                 # NT_DOMAIN\username
  982.                 #
  983.                 # If this is set to 'yes', then the NT_DOMAIN portion
  984.                 # of the user-name is silently discarded.
  985.                 #
  986.                 # This configuration entry SHOULD NOT be used.
  987.                 # See the "realms" module for a better way to handle
  988.                 # NT domains.
  989.                 with_ntdomain_hack = no
  990.  
  991.                 # Specialix Jetstream 8500 24 port access server.
  992.                 #
  993.                 # If the user name is 10 characters or longer, a "/"
  994.                 # and the excess characters after the 10th are
  995.                 # appended to the user name.
  996.                 #
  997.                 # If you're not running that NAS, you don't need
  998.                 # this hack.
  999.                 with_specialix_jetstream_hack = no
  1000.  
  1001.                 # Cisco sends it's VSA attributes with the attribute
  1002.                 # name *again* in the string, like:
  1003.                 #
  1004.                 #   H323-Attribute = "h323-attribute=value".
  1005.                 #
  1006.                 # If this configuration item is set to 'yes', then
  1007.                 # the redundant data in the the attribute text is stripped
  1008.                 # out.  The result is:
  1009.                 #
  1010.                 #  H323-Attribute = "value"
  1011.                 #
  1012.                 # If you're not running a Cisco NAS, you don't need
  1013.                 # this hack.
  1014.                 with_cisco_vsa_hack = no
  1015.         }
  1016.  
  1017.         # Livingston-style 'users' file
  1018.         #
  1019.         files {
  1020.                 usersfile = ${confdir}/users
  1021.                 acctusersfile = ${confdir}/acct_users
  1022.  
  1023.                 #  If you want to use the old Cistron 'users' file
  1024.                 #  with FreeRADIUS, you should change the next line
  1025.                 #  to 'compat = cistron'.  You can the copy your 'users'
  1026.                 #  file from Cistron.
  1027.                 compat = no
  1028.         }
  1029.  
  1030.         # Write a detailed log of all accounting records received.
  1031.         #
  1032.         detail {
  1033.                 #  Note that we do NOT use NAS-IP-Address here, as
  1034.                 #  that attribute MAY BE from the originating NAS, and
  1035.                 #  NOT from the proxy which actually sent us the
  1036.                 #  request.  The Client-IP-Address attribute is ALWAYS
  1037.                 #  the address of the client which sent us the
  1038.                 #  request.
  1039.                 #
  1040.                 #  The following line creates a new detail file for
  1041.                 #  every radius client (by IP address or hostname).
  1042.                 #  In addition, a new detail file is created every
  1043.                 #  day, so that the detail file doesn't have to go
  1044.                 #  through a 'log rotation'
  1045.                 #
  1046.                 #  If your detail files are large, you may also want
  1047.                 #  to add a ':%H' (see doc/variables.txt) to the end
  1048.                 #  of it, to create a new detail file every hour, e.g.:
  1049.                 #
  1050.                 #   ..../detail-%Y%m%d:%H
  1051.                 #
  1052.                 #  This will create a new detail file for every hour.
  1053.                 #
  1054.                 detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d
  1055.  
  1056.                 #
  1057.                 #  The Unix-style permissions on the 'detail' file.
  1058.                 #
  1059.                 #  The detail file often contains secret or private
  1060.                 #  information about users.  So by keeping the file
  1061.                 #  permissions restrictive, we can prevent unwanted
  1062.                 #  people from seeing that information.
  1063.                 detailperm = 0600
  1064.         }
  1065.  
  1066.         #
  1067.         #  Many people want to log authentication requests.
  1068.         #  Rather than modifying the server core to print out more
  1069.         #  messages, we can use a different instance of the 'detail'
  1070.         #  module, to log the authentication requests to a file.
  1071.         #
  1072.         #  You will also need to un-comment the 'auth_log' line
  1073.         #  in the 'authorize' section, below.
  1074.         #
  1075.         # detail auth_log {
  1076.                 # detailfile = ${radacctdir}/%{Client-IP-Address}/auth-detail-%Y%m%d
  1077.  
  1078.                 #
  1079.                 #  This MUST be 0600, otherwise anyone can read
  1080.                 #  the users passwords!
  1081.                 # detailperm = 0600
  1082.         # }
  1083.  
  1084.         #
  1085.         #  This module logs authentication reply packets sent
  1086.         #  to a NAS.  Both Access-Accept and Access-Reject packets
  1087.         #  are logged.
  1088.         #
  1089.         #  You will also need to un-comment the 'reply_log' line
  1090.         #  in the 'post-auth' section, below.
  1091.         #
  1092.         # detail reply_log {
  1093.                 # detailfile = ${radacctdir}/%{Client-IP-Address}/reply-detail-%Y%m%d
  1094.  
  1095.                 #
  1096.                 #  This MUST be 0600, otherwise anyone can read
  1097.                 #  the users passwords!
  1098.                 # detailperm = 0600
  1099.         # }
  1100.  
  1101.         #
  1102.         #  This module logs packets proxied to a home server.
  1103.         #
  1104.         #  You will also need to un-comment the 'pre_proxy_log' line
  1105.         #  in the 'pre-proxy' section, below.
  1106.         #
  1107.         # detail pre_proxy_log {
  1108.                 # detailfile = ${radacctdir}/%{Client-IP-Address}/pre-proxy-detail-%Y%m%d
  1109.  
  1110.                 #
  1111.                 #  This MUST be 0600, otherwise anyone can read
  1112.                 #  the users passwords!
  1113.                 # detailperm = 0600
  1114.         # }
  1115.  
  1116.         #
  1117.         #  This module logs response packets from a home server.
  1118.         #
  1119.         #  You will also need to un-comment the 'post_proxy_log' line
  1120.         #  in the 'post-proxy' section, below.
  1121.         #
  1122.         # detail post_proxy_log {
  1123.                 # detailfile = ${radacctdir}/%{Client-IP-Address}/post-proxy-detail-%Y%m%d
  1124.  
  1125.                 #
  1126.                 #  This MUST be 0600, otherwise anyone can read
  1127.                 #  the users passwords!
  1128.                 # detailperm = 0600
  1129.         # }
  1130.  
  1131.         # Create a unique accounting session Id.  Many NASes re-use or
  1132.         # repeat values for Acct-Session-Id, causing no end of
  1133.         # confusion.
  1134.         #
  1135.         #  This module will add a (probably) unique session id
  1136.         #  to an accounting packet based on the attributes listed
  1137.         #  below found in the packet.  See doc/rlm_acct_unique for
  1138.         #  more information.
  1139.         #
  1140.         acct_unique {
  1141.                 key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
  1142.         }
  1143.  
  1144.  
  1145.         #  Include another file that has the SQL-related configuration.
  1146.         #  This is another file only because it tends to be big.
  1147.         #
  1148.         #  The following configuration file is for use with MySQL.
  1149.         #
  1150.         #  For Postgresql, use:         ${confdir}/postgresql.conf
  1151.         #  For MS-SQL, use:             ${confdir}/mssql.conf
  1152.         #  For Oracle, use:             ${confdir}/oraclesql.conf
  1153.         #
  1154.         $INCLUDE  ${confdir}/sql.conf
  1155.  
  1156.  
  1157.         #  For Cisco VoIP specific accounting with Postgresql,
  1158.         #  use:         ${confdir}/pgsql-voip.conf
  1159.         #
  1160.         #  You will also need the sql schema from:
  1161.         #        src/billing/cisco_h323_db_schema-postgres.sql
  1162.         #  Note: This config can be use AS WELL AS the standard sql
  1163.         #  config if you need SQL based Auth
  1164.        
  1165.  
  1166.         #  Write a 'utmp' style file, of which users are currently
  1167.         #  logged in, and where they've logged in from.
  1168.         #
  1169.         #  This file is used mainly for Simultaneous-Use checking,
  1170.         #  and also 'radwho', to see who's currently logged in.
  1171.         #
  1172.         radutmp {
  1173.                 #  Where the file is stored.  It's not a log file,
  1174.                 #  so it doesn't need rotating.
  1175.                 #
  1176.                 filename = ${logdir}/radutmp
  1177.  
  1178.                 #  The field in the packet to key on for the
  1179.                 #  'user' name,  If you have other fields which you want
  1180.                 #  to use to key on to control Simultaneous-Use,
  1181.                 #  then you can use them here.
  1182.                 #
  1183.                 #  Note, however, that the size of the field in the
  1184.                 #  'utmp' data structure is small, around 32
  1185.                 #  characters, so that will limit the possible choices
  1186.                 #  of keys.
  1187.                 #
  1188.                 #  You may want instead: %{Stripped-User-Name:-%{User-Name}}
  1189.                 username = %{User-Name}
  1190.  
  1191.  
  1192.                 #  Whether or not we want to treat "user" the same
  1193.                 #  as "USER", or "User".  Some systems have problems
  1194.                 #  with case sensitivity, so this should be set to
  1195.                 #  'no' to enable the comparisons of the key attribute
  1196.                 #  to be case insensitive.
  1197.                 #
  1198.                 case_sensitive = yes
  1199.  
  1200.                 #  Accounting information may be lost, so the user MAY
  1201.                 #  have logged off of the NAS, but we haven't noticed.
  1202.                 #  If so, we can verify this information with the NAS,
  1203.                 #
  1204.                 #  If we want to believe the 'utmp' file, then this
  1205.                 #  configuration entry can be set to 'no'.
  1206.                 #
  1207.                 check_with_nas = yes           
  1208.  
  1209.                 # Set the file permissions, as the contents of this file
  1210.                 # are usually private.
  1211.                 perm = 0600
  1212.  
  1213.                 callerid = "yes"
  1214.         }
  1215.  
  1216.         # "Safe" radutmp - does not contain caller ID, so it can be
  1217.         # world-readable, and radwho can work for normal users, without
  1218.         # exposing any information that isn't already exposed by who(1).
  1219.         #
  1220.         # This is another 'instance' of the radutmp module, but it is given
  1221.         # then name "sradutmp" to identify it later in the "accounting"
  1222.         # section.
  1223.         radutmp sradutmp {
  1224.                 filename = ${logdir}/sradutmp
  1225.                 perm = 0644
  1226.                 callerid = "no"
  1227.         }
  1228.  
  1229.         # attr_filter - filters the attributes received in replies from
  1230.         # proxied servers, to make sure we send back to our RADIUS client
  1231.         # only allowed attributes.
  1232.         attr_filter {
  1233.                 attrsfile = ${confdir}/attrs
  1234.         }
  1235.  
  1236.         #  counter module:
  1237.         #  This module takes an attribute (count-attribute).
  1238.         #  It also takes a key, and creates a counter for each unique
  1239.         #  key.  The count is incremented when accounting packets are
  1240.         #  received by the server.  The value of the increment depends
  1241.         #  on the attribute type.
  1242.         #  If the attribute is Acct-Session-Time or of an integer type we add the
  1243.         #  value of the attribute. If it is anything else we increase the
  1244.         #  counter by one.
  1245.         #
  1246.         #  The 'reset' parameter defines when the counters are all reset to
  1247.         #  zero.  It can be hourly, daily, weekly, monthly or never.
  1248.         #
  1249.         #  hourly: Reset on 00:00 of every hour
  1250.         #  daily: Reset on 00:00:00 every day
  1251.         #  weekly: Reset on 00:00:00 on sunday
  1252.         #  monthly: Reset on 00:00:00 of the first day of each month
  1253.         #
  1254.         #  It can also be user defined. It should be of the form:
  1255.         #  num[hdwm] where:
  1256.         #  h: hours, d: days, w: weeks, m: months
  1257.         #  If the letter is ommited days will be assumed. In example:
  1258.         #  reset = 10h (reset every 10 hours)
  1259.         #  reset = 12  (reset every 12 days)
  1260.         #
  1261.         #
  1262.         #  The check-name attribute defines an attribute which will be
  1263.         #  registered by the counter module and can be used to set the
  1264.         #  maximum allowed value for the counter after which the user
  1265.         #  is rejected.
  1266.         #  Something like:
  1267.         #
  1268.         #  DEFAULT Max-Daily-Session := 36000
  1269.         #          Fall-Through = 1
  1270.         #
  1271.         #  You should add the counter module in the instantiate
  1272.         #  section so that it registers check-name before the files
  1273.         #  module reads the users file.
  1274.         #
  1275.         #  If check-name is set and the user is to be rejected then we
  1276.         #  send back a Reply-Message and we log a Failure-Message in
  1277.         #  the radius.log
  1278.         #  If the count attribute is Acct-Session-Time then on each login
  1279.         #  we send back the remaining online time as a Session-Timeout attribute
  1280.         #
  1281.         #  The counter-name can also be used instead of using the check-name
  1282.         #  like below:
  1283.         #
  1284.         #  DEFAULT  Daily-Session-Time > 3600, Auth-Type = Reject
  1285.         #      Reply-Message = "You've used up more than one hour today"
  1286.         #
  1287.         #  The allowed-servicetype attribute can be used to only take
  1288.         #  into account specific sessions. For example if a user first
  1289.         #  logs in through a login menu and then selects ppp there will
  1290.         #  be two sessions. One for Login-User and one for Framed-User
  1291.         #  service type. We only need to take into account the second one.
  1292.         #
  1293.         #  The module should be added in the instantiate, authorize and
  1294.         #  accounting sections.  Make sure that in the authorize
  1295.         #  section it comes after any module which sets the
  1296.         #  'check-name' attribute.
  1297.         #
  1298.         #counter daily {
  1299.         #       filename = ${raddbdir}/db.daily
  1300.         #       key = User-Name
  1301.         #       count-attribute = Acct-Session-Time
  1302.         #       reset = daily
  1303.         #       counter-name = Daily-Session-Time
  1304.         #       check-name = Max-Daily-Session
  1305.         #       allowed-servicetype = Framed-User
  1306.         #       cache-size = 5000
  1307.         #}
  1308.  
  1309.         # The "always" module is here for debugging purposes. Each
  1310.         # instance simply returns the same result, always, without
  1311.         # doing anything.
  1312.         always fail {
  1313.                 rcode = fail
  1314.         }
  1315.         always reject {
  1316.                 rcode = reject
  1317.         }
  1318.         always ok {
  1319.                 rcode = ok
  1320.                 simulcount = 0
  1321.                 mpp = no
  1322.         }
  1323.  
  1324.         #
  1325.         #  The 'expression' module currently has no configuration.
  1326.         #
  1327.         #  This module is useful only for 'xlat'.  To use it,
  1328.         #  put 'exec' into the 'instantiate' section.  You can then
  1329.         #  do dynamic translation of attributes like:
  1330.         #
  1331.         #  Attribute-Name = `%{expr:2 + 3 + %{exec: uid -u}}`
  1332.         #
  1333.         #  The value of the attribute will be replaced with the output
  1334.         #  of the program which is executed.  Due to RADIUS protocol
  1335.         #  limitations, any output over 253 bytes will be ignored.
  1336.         expr {
  1337.         }
  1338.  
  1339.         #
  1340.         #  The 'digest' module currently has no configuration.
  1341.         #
  1342.         #  "Digest" authentication against a Cisco SIP server.
  1343.         #  See 'doc/rfc/draft-sterman-aaa-sip-00.txt' for details
  1344.         #  on performing digest authentication for Cisco SIP servers.
  1345.         #
  1346.         digest {
  1347.         }
  1348.  
  1349.         #
  1350.         #  Execute external programs
  1351.         #
  1352.         #  This module is useful only for 'xlat'.  To use it,
  1353.         #  put 'exec' into the 'instantiate' section.  You can then
  1354.         #  do dynamic translation of attributes like:
  1355.         #
  1356.         #  Attribute-Name = `%{exec:/path/to/program args}`
  1357.         #
  1358.         #  The value of the attribute will be replaced with the output
  1359.         #  of the program which is executed.  Due to RADIUS protocol
  1360.         #  limitations, any output over 253 bytes will be ignored.
  1361.         #
  1362.         #  The RADIUS attributes from the user request will be placed
  1363.         #  into environment variables of the executed program, as
  1364.         #  described in 'doc/variables.txt'
  1365.         #
  1366.         exec {
  1367.                 wait = yes
  1368.                 input_pairs = request
  1369.         }
  1370.  
  1371.         #
  1372.         #  This is a more general example of the execute module.
  1373.         #
  1374.         #  This one is called "echo".
  1375.         #
  1376.         #  Attribute-Name = `%{echo:/path/to/program args}`
  1377.         #
  1378.         #  If you wish to execute an external program in more than
  1379.         #  one section (e.g. 'authorize', 'pre_proxy', etc), then it
  1380.         #  is probably best to define a different instance of the
  1381.         #  'exec' module for every section.    
  1382.         #      
  1383.         exec echo {
  1384.                 #
  1385.                 #  Wait for the program to finish.
  1386.                 #
  1387.                 #  If we do NOT wait, then the program is "fire and
  1388.                 #  forget", and any output attributes from it are ignored.
  1389.                 #
  1390.                 #  If we are looking for the program to output
  1391.                 #  attributes, and want to add those attributes to the
  1392.                 #  request, then we MUST wait for the program to
  1393.                 #  finish, and therefore set 'wait=yes'
  1394.                 #
  1395.                 # allowed values: {no, yes}
  1396.                 wait = yes
  1397.  
  1398.                 #
  1399.                 #  The name of the program to execute, and it's
  1400.                 #  arguments.  Dynamic translation is done on this
  1401.                 #  field, so things like the following example will
  1402.                 #  work.
  1403.                 #
  1404.                 program = "/bin/echo %{User-Name}"
  1405.  
  1406.                 #
  1407.                 #  The attributes which are placed into the
  1408.                 #  environment variables for the program.
  1409.                 #
  1410.                 #  Allowed values are:
  1411.                 #
  1412.                 #       request         attributes from the request
  1413.                 #       config          attributes from the configuration items list
  1414.                 #       reply           attributes from the reply
  1415.                 #       proxy-request   attributes from the proxy request
  1416.                 #       proxy-reply     attributes from the proxy reply
  1417.                 #
  1418.                 #  Note that some attributes may not exist at some
  1419.                 #  stages.  e.g. There may be no proxy-reply
  1420.                 #  attributes if this module is used in the
  1421.                 #  'authorize' section.
  1422.                 #
  1423.                 input_pairs = request
  1424.  
  1425.                 #
  1426.                 #  Where to place the output attributes (if any) from
  1427.                 #  the executed program.  The values allowed, and the
  1428.                 #  restrictions as to availability, are the same as
  1429.                 #  for the input_pairs.
  1430.                 #
  1431.                 output_pairs = reply
  1432.  
  1433.                 #
  1434.                 #  When to execute the program.  If the packet
  1435.                 #  type does NOT match what's listed here, then
  1436.                 #  the module does NOT execute the program.
  1437.                 #
  1438.                 #  For a list of allowed packet types, see
  1439.                 #  the 'dictionary' file, and look for VALUEs
  1440.                 #  of the Packet-Type attribute.
  1441.                 #
  1442.                 #  By default, the module executes on ANY packet.
  1443.                 #  Un-comment out the following line to tell the
  1444.                 #  module to execute only if an Access-Accept is
  1445.                 #  being sent to the NAS.
  1446.                 #
  1447.                 #packet_type = Access-Accept
  1448.         }
  1449.  
  1450.         #  Do server side ip pool management. Should be added in post-auth and
  1451.         #  accounting sections.
  1452.         #
  1453.         #  The module also requires the existance of the Pool-Name
  1454.         #  attribute. That way the administrator can add the Pool-Name
  1455.         #  attribute in the user profiles and use different pools
  1456.         #  for different users. The Pool-Name attribute is a *check* item not
  1457.         #  a reply item.
  1458.         #
  1459.         # Example:
  1460.         # radiusd.conf: ippool students { [...] }
  1461.         # users file  : DEFAULT Group == students, Pool-Name := "students"
  1462.         #
  1463.         # ********* IF YOU CHANGE THE RANGE PARAMETERS YOU MUST *********
  1464.         # ********* THEN ERASE THE DB FILES                     *********
  1465.         #
  1466.         ippool main_pool {
  1467.  
  1468.                 #  range-start,range-stop: The start and end ip
  1469.                 #  addresses for the ip pool
  1470.                 range-start = 192.168.1.1
  1471.                 range-stop = 192.168.3.254
  1472.  
  1473.                 #  netmask: The network mask used for the ip's
  1474.                 netmask = 255.255.255.0
  1475.  
  1476.                 #  cache-size: The gdbm cache size for the db
  1477.                 #  files. Should be equal to the number of ip's
  1478.                 #  available in the ip pool
  1479.                 cache-size = 800
  1480.  
  1481.                 # session-db: The main db file used to allocate ip's to clients
  1482.                 session-db = ${raddbdir}/db.ippool
  1483.  
  1484.                 # ip-index: Helper db index file used in multilink
  1485.                 ip-index = ${raddbdir}/db.ipindex
  1486.  
  1487.                 # override: Will this ippool override a Framed-IP-Address already set
  1488.                 override = no
  1489.  
  1490.                 # maximum-timeout: If not zero specifies the maximum time in seconds an
  1491.                 # entry may be active. Default: 0
  1492.                 maximum-timeout = 0
  1493.         }
  1494.  
  1495.         # ANSI X9.9 token support.  Not included by default.
  1496.         # $INCLUDE  ${confdir}/x99.conf
  1497.  
  1498. }
  1499.  
  1500. # Instantiation
  1501. #
  1502. #  This section orders the loading of the modules.  Modules
  1503. #  listed here will get loaded BEFORE the later sections like
  1504. #  authorize, authenticate, etc. get examined.
  1505. #
  1506. #  This section is not strictly needed.  When a section like
  1507. #  authorize refers to a module, it's automatically loaded and
  1508. #  initialized.  However, some modules may not be listed in any
  1509. #  of the following sections, so they can be listed here.
  1510. #
  1511. #  Also, listing modules here ensures that you have control over
  1512. #  the order in which they are initalized.  If one module needs
  1513. #  something defined by another module, you can list them in order
  1514. #  here, and ensure that the configuration will be OK.
  1515. #
  1516. instantiate {
  1517.         #
  1518.         #  Allows the execution of external scripts.
  1519.         #  The entire command line (and output) must fit into 253 bytes.
  1520.         #
  1521.         #  e.g. Framed-Pool = `%{exec:/bin/echo foo}`
  1522.         exec
  1523.  
  1524.         #
  1525.         #  The expression module doesn't do authorization,
  1526.         #  authentication, or accounting.  It only does dynamic
  1527.         #  translation, of the form:
  1528.         #
  1529.         #       Session-Timeout = `%{expr:2 + 3}`
  1530.         #
  1531.         #  So the module needs to be instantiated, but CANNOT be
  1532.         #  listed in any other section.  See 'doc/rlm_expr' for
  1533.         #  more information.
  1534.         #
  1535.         expr
  1536.         noresetcounter
  1537.         dailycounter
  1538.         weeklycounter
  1539.         monthlycounter
  1540.         #expiration
  1541.         #logintime
  1542.  
  1543.         #
  1544.         # We add the counter module here so that it registers
  1545.         # the check-name attribute before any module which sets
  1546.         # it
  1547. #       daily
  1548. }
  1549.  
  1550. #  Authorization. First preprocess (hints and huntgroups files),
  1551. #  then realms, and finally look in the "users" file.
  1552. #
  1553. #  The order of the realm modules will determine the order that
  1554. #  we try to find a matching realm.
  1555. #
  1556. #  Make *sure* that 'preprocess' comes before any realm if you
  1557. #  need to setup hints for the remote radius server
  1558. authorize {
  1559.         #
  1560.         #  The preprocess module takes care of sanitizing some bizarre
  1561.         #  attributes in the request, and turning them into attributes
  1562.         #  which are more standard.
  1563.         #
  1564.         #  It takes care of processing the 'raddb/hints' and the
  1565.         #  'raddb/huntgroups' files.
  1566.         #
  1567.         #  It also adds the %{Client-IP-Address} attribute to the request.
  1568.         preprocess
  1569.  
  1570.         #
  1571.         #  If you want to have a log of authentication requests,
  1572.         #  un-comment the following line, and the 'detail auth_log'
  1573.         #  section, above.
  1574. #       auth_log
  1575.        
  1576. #       attr_filter
  1577.  
  1578.         #
  1579.         #  The chap module will set 'Auth-Type := CHAP' if we are
  1580.         #  handling a CHAP request and Auth-Type has not already been set
  1581.         chap
  1582.  
  1583.         #
  1584.         #  If the users are logging in with an MS-CHAP-Challenge
  1585.         #  attribute for authentication, the mschap module will find
  1586.         #  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
  1587.         #  to the request, which will cause the server to then use
  1588.         #  the mschap module for authentication.
  1589.         mschap
  1590.  
  1591.         #
  1592.         #  If you have a Cisco SIP server authenticating against
  1593.         #  FreeRADIUS, uncomment the following line, and the 'digest'
  1594.         #  line in the 'authenticate' section.
  1595. #       digest
  1596.  
  1597.         #
  1598.         #  Look for IPASS style 'realm/', and if not found, look for
  1599.         #  '@realm', and decide whether or not to proxy, based on
  1600.         #  that.
  1601. #       IPASS
  1602.  
  1603.         #
  1604.         #  If you are using multiple kinds of realms, you probably
  1605.         #  want to set "ignore_null = yes" for all of them.
  1606.         #  Otherwise, when the first style of realm doesn't match,
  1607.         #  the other styles won't be checked.
  1608.         #
  1609.         suffix
  1610. #       ntdomain
  1611.  
  1612.         #
  1613.         #  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
  1614.         #  authentication.
  1615.         #
  1616.         #  It also sets the EAP-Type attribute in the request
  1617.         #  attribute list to the EAP type from the packet.
  1618.         eap
  1619.  
  1620.         #
  1621.         #  Read the 'users' file
  1622. #       files
  1623.  
  1624.         #
  1625.         #  Look in an SQL database.  The schema of the database
  1626.         #  is meant to mirror the "users" file.
  1627.         #
  1628.         #  See "Authorization Queries" in sql.conf
  1629.         sql
  1630.  
  1631.         #
  1632.         #  If you are using /etc/smbpasswd, and are also doing
  1633.         #  mschap authentication, the un-comment this line, and
  1634.         #  configure the 'etc_smbpasswd' module, above.
  1635. #       etc_smbpasswd
  1636.  
  1637.         #
  1638.         #  The ldap module will set Auth-Type to LDAP if it has not
  1639.         #  already been set
  1640. #       ldap
  1641.  
  1642.         #
  1643.         #  Enforce daily limits on time spent logged in.
  1644. #       daily
  1645.  
  1646.         #
  1647.         # Use the checkval module
  1648. #       checkval
  1649.         noresetcounter
  1650.         dailycounter
  1651.         weeklycounter
  1652.         monthlycounter
  1653. }
  1654.  
  1655.  
  1656. #  Authentication.
  1657. #
  1658. #
  1659. #  This section lists which modules are available for authentication.
  1660. #  Note that it does NOT mean 'try each module in order'.  It means
  1661. #  that a module from the 'authorize' section adds a configuration
  1662. #  attribute 'Auth-Type := FOO'.  That authentication type is then
  1663. #  used to pick the apropriate module from the list below.
  1664. #
  1665.  
  1666. #  In general, you SHOULD NOT set the Auth-Type attribute.  The server
  1667. #  will figure it out on its own, and will do the right thing.  The
  1668. #  most common side effect of erroneously setting the Auth-Type
  1669. #  attribute is that one authentication method will work, but the
  1670. #  others will not.
  1671. #
  1672. #  The common reasons to set the Auth-Type attribute by hand
  1673. #  is to either forcibly reject the user, or forcibly accept him.
  1674. #
  1675. authenticate {
  1676.         #
  1677.         #  PAP authentication, when a back-end database listed
  1678.         #  in the 'authorize' section supplies a password.  The
  1679.         #  password can be clear-text, or encrypted.
  1680.         Auth-Type PAP {
  1681.                 pap
  1682.         }
  1683.  
  1684.         #
  1685.         #  Most people want CHAP authentication
  1686.         #  A back-end database listed in the 'authorize' section
  1687.         #  MUST supply a CLEAR TEXT password.  Encrypted passwords
  1688.         #  won't work.
  1689.         Auth-Type CHAP {
  1690.                 chap
  1691.         }
  1692.  
  1693.         #
  1694.         #  MSCHAP authentication.
  1695.         Auth-Type MS-CHAP {
  1696.                 mschap
  1697.         }
  1698.  
  1699.         #
  1700.         #  If you have a Cisco SIP server authenticating against
  1701.         #  FreeRADIUS, uncomment the following line, and the 'digest'
  1702.         #  line in the 'authorize' section.
  1703. #       digest
  1704.  
  1705.         #
  1706.         #  Pluggable Authentication Modules.
  1707. #       pam
  1708.  
  1709.         #
  1710.         #  See 'man getpwent' for information on how the 'unix'
  1711.         #  module checks the users password.  Note that packets
  1712.         #  containing CHAP-Password attributes CANNOT be authenticated
  1713.         #  against /etc/passwd!  See the FAQ for details.
  1714.         #  
  1715.         unix
  1716.  
  1717.         # Uncomment it if you want to use ldap for authentication
  1718.         #
  1719.         # Note that this means "check plain-text password against
  1720.         # the ldap database", which means that EAP won't work,
  1721.         # as it does not supply a plain-text password.
  1722. #       Auth-Type LDAP {
  1723. #               ldap
  1724. #       }
  1725.  
  1726.         #
  1727.         #  Allow EAP authentication.
  1728.         eap
  1729. }
  1730.  
  1731.  
  1732. #
  1733. #  Pre-accounting.  Decide which accounting type to use.
  1734. #
  1735. preacct {
  1736.         preprocess
  1737.  
  1738.         #
  1739.         #  Ensure that we have a semi-unique identifier for every
  1740.         #  request, and many NAS boxes are broken.
  1741.         acct_unique
  1742.  
  1743.         #
  1744.         #  Look for IPASS-style 'realm/', and if not found, look for
  1745.         #  '@realm', and decide whether or not to proxy, based on
  1746.         #  that.
  1747.         #
  1748.         #  Accounting requests are generally proxied to the same
  1749.         #  home server as authentication requests.
  1750. #       IPASS
  1751.         suffix
  1752. #       ntdomain
  1753.  
  1754.         #
  1755.         #  Read the 'acct_users' file
  1756. #       files
  1757. }
  1758.  
  1759. #
  1760. #  Accounting.  Log the accounting data.
  1761. #
  1762. accounting {
  1763.         #
  1764.         #  Create a 'detail'ed log of the packets.
  1765.         #  Note that accounting requests which are proxied
  1766.         #  are also logged in the detail file.
  1767.         detail
  1768. #       daily
  1769. #       noresetcounter
  1770.         #  Update the wtmp file
  1771.         #
  1772.         #  If you don't use "radlast", you can delete this line.
  1773.         unix
  1774.  
  1775.         #
  1776.         #  For Simultaneous-Use tracking.
  1777.         #
  1778.         #  Due to packet losses in the network, the data here
  1779.         #  may be incorrect.  There is little we can do about it.
  1780.         radutmp
  1781. #       sradutmp
  1782.  
  1783.         #  Return an address to the IP Pool when we see a stop record.
  1784. #       main_pool
  1785.  
  1786.         #
  1787.         #  Log traffic to an SQL database.
  1788.         #
  1789.         #  See "Accounting queries" in sql.conf
  1790.         sql
  1791.  
  1792.  
  1793.         #  Cisco VoIP specific bulk accounting
  1794. #       pgsql-voip
  1795.  
  1796. }
  1797.  
  1798.  
  1799. #  Session database, used for checking Simultaneous-Use. Either the radutmp
  1800. #  or rlm_sql module can handle this.
  1801. #  The rlm_sql module is *much* faster
  1802. session {
  1803.         radutmp
  1804.  
  1805.         #
  1806.         #  See "Simultaneous Use Checking Querie" in sql.conf
  1807.         sql
  1808. }
  1809.  
  1810.  
  1811. #  Post-Authentication
  1812. #  Once we KNOW that the user has been authenticated, there are
  1813. #  additional steps we can take.
  1814. post-auth {
  1815.         #  Get an address from the IP Pool.
  1816. #       main_pool
  1817.  
  1818.         #
  1819.         #  If you want to have a log of authentication replies,
  1820.         #  un-comment the following line, and the 'detail reply_log'
  1821.         #  section, above.
  1822. #       reply_log
  1823.  
  1824.         #
  1825.         #  After authenticating the user, do another SQL qeury.
  1826.         #
  1827.         #  See "Authentication Logging Queries" in sql.conf
  1828. #       sql
  1829.  
  1830.         #
  1831.         #  Access-Reject packets are sent through the REJECT sub-section
  1832.         #  of the post-auth section.
  1833.         #
  1834. #       Post-Auth-Type REJECT {
  1835. #               insert-module-name-here
  1836. #       }
  1837.  
  1838. }
  1839.  
  1840. #
  1841. #  When the server decides to proxy a request to a home server,
  1842. #  the proxied request is first passed through the pre-proxy
  1843. #  stage.  This stage can re-write the request, or decide to
  1844. #  cancel the proxy.
  1845. #
  1846. #  Only a few modules currently have this method.
  1847. #
  1848. pre-proxy {
  1849. #       attr_rewrite
  1850.  
  1851.         #  If you want to have a log of packets proxied to a home
  1852.         #  server, un-comment the following line, and the
  1853.         #  'detail pre_proxy_log' section, above.
  1854. #       pre_proxy_log
  1855. }
  1856.  
  1857. #
  1858. #  When the server receives a reply to a request it proxied
  1859. #  to a home server, the request may be massaged here, in the
  1860. #  post-proxy stage.
  1861. #
  1862. post-proxy {
  1863.         #
  1864.  
  1865.         #  If you want to have a log of replies from a home server,
  1866.         #  un-comment the following line, and the 'detail post_proxy_log'
  1867.         #  section, above.
  1868. #       post_proxy_log
  1869.  
  1870. #       attr_rewrite
  1871.  
  1872.         #  Uncomment the following line if you want to filter replies from
  1873.         #  remote proxies based on the rules defined in the 'attrs' file.
  1874.  
  1875. #       attr_filter
  1876.  
  1877.         #
  1878.         #  If you are proxying LEAP, you MUST configure the EAP
  1879.         #  module, and you MUST list it here, in the post-proxy
  1880.         #  stage.
  1881.         #
  1882.         #  You MUST also use the 'nostrip' option in the 'realm'
  1883.         #  configuration.  Otherwise, the User-Name attribute
  1884.         #  in the proxied request will not match the user name
  1885.         #  hidden inside of the EAP packet, and the end server will
  1886.         #  reject the EAP request.
  1887.         #
  1888.         eap
  1889. }
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top