Guest User

shitting radius

a guest
Nov 17th, 2017
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.41 KB | None | 0 0
  1. prefix = /usr
  2. exec_prefix = /usr
  3. sysconfdir = /etc
  4. localstatedir = /var
  5. sbindir = ${exec_prefix}/sbin
  6. logdir = /var/log/freeradius
  7. raddbdir = /etc/freeradius
  8. radacctdir = ${logdir}/radacct
  9.  
  10. #
  11. # name of the running server. See also the "-n" command-line option.
  12. name = net0-freerad
  13.  
  14. # Location of config and logfiles.
  15. confdir = ${raddbdir}
  16. run_dir = ${localstatedir}/run/freeradius
  17.  
  18. # Should likely be ${localstatedir}/lib/radiusd
  19. db_dir = ${raddbdir}
  20.  
  21. #
  22. # libdir: Where to find the rlm_* modules.
  23. #
  24. # This should be automatically set at configuration time.
  25. #
  26. # If the server builds and installs, but fails at execution time
  27. # with an 'undefined symbol' error, then you can use the libdir
  28. # directive to work around the problem.
  29. #
  30. # The cause is usually that a library has been installed on your
  31. # system in a place where the dynamic linker CANNOT find it. When
  32. # executing as root (or another user), your personal environment MAY
  33. # be set up to allow the dynamic linker to find the library. When
  34. # executing as a daemon, FreeRADIUS MAY NOT have the same
  35. # personalized configuration.
  36. #
  37. # To work around the problem, find out which library contains that symbol,
  38. # and add the directory containing that library to the end of 'libdir',
  39. # with a colon separating the directory names. NO spaces are allowed.
  40. #
  41. # e.g. libdir = /usr/local/lib:/opt/package/lib
  42. #
  43. # You can also try setting the LD_LIBRARY_PATH environment variable
  44. # in a script which starts the server.
  45. #
  46. # If that does not work, then you can re-configure and re-build the
  47. # server to NOT use shared libraries, via:
  48. #
  49. # ./configure --disable-shared
  50. # make
  51. # make install
  52. #
  53. libdir = /usr/lib/freeradius
  54.  
  55. # pidfile: Where to place the PID of the RADIUS server.
  56. #
  57. # The server may be signalled while it's running by using this
  58. # file.
  59. #
  60. # This file is written when ONLY running in daemon mode.
  61. #
  62. # e.g.: kill -HUP `cat /var/run/radiusd/radiusd.pid`
  63. #
  64. pidfile = ${run_dir}/${name}.pid
  65.  
  66. # user/group: The name (or #number) of the user/group to run radiusd as.
  67. #
  68. # If these are commented out, the server will run as the user/group
  69. # that started it. In order to change to a different user/group, you
  70. # MUST be root ( or have root privleges ) to start the server.
  71. #
  72. # We STRONGLY recommend that you run the server with as few permissions
  73. # as possible. That is, if you're not using shadow passwords, the
  74. # user and group items below should be set to radius'.
  75. #
  76. # NOTE that some kernels refuse to setgid(group) when the value of
  77. # (unsigned)group is above 60000; don't use group nobody on these systems!
  78. #
  79. # On systems with shadow passwords, you might have to set 'group = shadow'
  80. # for the server to be able to read the shadow password file. If you can
  81. # authenticate users while in debug mode, but not in daemon mode, it may be
  82. # that the debugging mode server is running as a user that can read the
  83. # shadow info, and the user listed below can not.
  84. #
  85. # The server will also try to use "initgroups" to read /etc/groups.
  86. # It will join all groups where "user" is a member. This can allow
  87. # for some finer-grained access controls.
  88. #
  89. user = freerad
  90. group = freerad
  91.  
  92. # max_request_time: The maximum time (in seconds) to handle a request.
  93. #
  94. # Requests which take more time than this to process may be killed, and
  95. # a REJECT message is returned.
  96. #
  97. # WARNING: If you notice that requests take a long time to be handled,
  98. # then this MAY INDICATE a bug in the server, in one of the modules
  99. # used to handle a request, OR in your local configuration.
  100. #
  101. # This problem is most often seen when using an SQL database. If it takes
  102. # more than a second or two to receive an answer from the SQL database,
  103. # then it probably means that you haven't indexed the database. See your
  104. # SQL server documentation for more information.
  105. #
  106. # Useful range of values: 5 to 120
  107. #
  108. max_request_time = 30
  109.  
  110. # cleanup_delay: The time to wait (in seconds) before cleaning up
  111. # a reply which was sent to the NAS.
  112. #
  113. # The RADIUS request is normally cached internally for a short period
  114. # of time, after the reply is sent to the NAS. The reply packet may be
  115. # lost in the network, and the NAS will not see it. The NAS will then
  116. # re-send the request, and the server will respond quickly with the
  117. # cached reply.
  118. #
  119. # If this value is set too low, then duplicate requests from the NAS
  120. # MAY NOT be detected, and will instead be handled as seperate requests.
  121. #
  122. # If this value is set too high, then the server will cache too many
  123. # requests, and some new requests may get blocked. (See 'max_requests'.)
  124. #
  125. # Useful range of values: 2 to 10
  126. #
  127. cleanup_delay = 5
  128.  
  129. # max_requests: The maximum number of requests which the server keeps
  130. # track of. This should be 256 multiplied by the number of clients.
  131. # e.g. With 4 clients, this number should be 1024.
  132. #
  133. # If this number is too low, then when the server becomes busy,
  134. # it will not respond to any new requests, until the 'cleanup_delay'
  135. # time has passed, and it has removed the old requests.
  136. #
  137. # If this number is set too high, then the server will use a bit more
  138. # memory for no real benefit.
  139. #
  140. # If you aren't sure what it should be set to, it's better to set it
  141. # too high than too low. Setting it to 1000 per client is probably
  142. # the highest it should be.
  143. #
  144. # Useful range of values: 256 to infinity
  145. #
  146. max_requests = 1024
  147.  
  148. # listen: Make the server listen on a particular IP address, and send
  149. # replies out from that address. This directive is most useful for
  150. # hosts with multiple IP addresses on one interface.
  151. #
  152. # If you want the server to listen on additional addresses, or on
  153. # additionnal ports, you can use multiple "listen" sections.
  154. #
  155. # Each section make the server listen for only one type of packet,
  156. # therefore authentication and accounting have to be configured in
  157. # different sections.
  158. #
  159. # The server ignore all "listen" section if you are using '-i' and '-p'
  160. # on the command line.
  161. #
  162. listen {
  163. # Type of packets to listen for.
  164. # Allowed values are:
  165. # auth listen for authentication packets
  166. # acct listen for accounting packets
  167. # proxy IP to use for sending proxied packets
  168. # detail Read from the detail file. For examples, see
  169. # raddb/sites-available/copy-acct-to-home-server
  170. # status listen for Status-Server packets. For examples,
  171. # see raddb/sites-available/status
  172. # coa listen for CoA-Request and Disconnect-Request
  173. # packets. For examples, see the file
  174. # raddb/sites-available/coa-server
  175. #
  176. type = auth
  177.  
  178. # Note: "type = proxy" lets you control the source IP used for
  179. # proxying packets, with some limitations:
  180. #
  181. # * A proxy listener CANNOT be used in a virtual server section.
  182. # * You should probably set "port = 0".
  183. # * Any "clients" configuration will be ignored.
  184. #
  185. # See also proxy.conf, and the "src_ipaddr" configuration entry
  186. # in the sample "home_server" section. When you specify the
  187. # source IP address for packets sent to a home server, the
  188. # proxy listeners are automatically created.
  189.  
  190. # IP address on which to listen.
  191. # Allowed values are:
  192. # dotted quad (1.2.3.4)
  193. # hostname (radius.example.com)
  194. # wildcard (*)
  195. ipaddr = *
  196.  
  197. # Port on which to listen.
  198. # Allowed values are:
  199. # integer port number (1812)
  200. # 0 means "use /etc/services for the proper port"
  201. port = 0
  202. }
  203.  
  204. # This second "listen" section is for listening on the accounting
  205. # port, too.
  206. #
  207. listen {
  208. ipaddr = *
  209. port = 0
  210. type = acct
  211. }
  212.  
  213. # hostname_lookups: Log the names of clients or just their IP addresses
  214. # e.g., www.freeradius.org (on) or 206.47.27.232 (off).
  215. #
  216. # The default is 'off' because it would be overall better for the net
  217. # if people had to knowingly turn this feature on, since enabling it
  218. # means that each client request will result in AT LEAST one lookup
  219. # request to the nameserver. Enabling hostname_lookups will also
  220. # mean that your server may stop randomly for 30 seconds from time
  221. # to time, if the DNS requests take too long.
  222. #
  223. # Turning hostname lookups off also means that the server won't block
  224. # for 30 seconds, if it sees an IP address which has no name associated
  225. # with it.
  226. #
  227. # allowed values: {no, yes}
  228. #
  229. hostname_lookups = no
  230.  
  231. # Core dumps are a bad thing. This should only be set to 'yes'
  232. # if you're debugging a problem with the server.
  233. #
  234. # allowed values: {no, yes}
  235. #
  236. allow_core_dumps = no
  237.  
  238. # Regular expressions
  239. #
  240. # These items are set at configure time. If they're set to "yes",
  241. # then setting them to "no" turns off regular expression support.
  242. #
  243. # If they're set to "no" at configure time, then setting them to "yes"
  244. # WILL NOT WORK. It will give you an error.
  245. #
  246. regular_expressions = yes
  247. extended_expressions = yes
  248.  
  249. #
  250. # Logging section. The various "log_*" configuration items
  251. # will eventually be moved here.
  252. #
  253. log {
  254. #
  255. # Destination for log messages. This can be one of:
  256. #
  257. # files - log to "file", as defined below.
  258. # syslog - to syslog (see also the "syslog_facility", below.
  259. # stdout - standard output
  260. # stderr - standard error.
  261. #
  262. # The command-line option "-X" over-rides this option, and forces
  263. # logging to go to stdout.
  264. #
  265. destination = files
  266.  
  267. #
  268. # The logging messages for the server are appended to the
  269. # tail of this file if destination == "files"
  270. #
  271. # If the server is running in debugging mode, this file is
  272. # NOT used.
  273. #
  274. file = ${logdir}/radius.log
  275.  
  276. #
  277. # Which syslog facility to use, if ${destination} == "syslog"
  278. #
  279. # The exact values permitted here are OS-dependent. You probably
  280. # don't want to change this.
  281. #
  282. syslog_facility = daemon
  283.  
  284. # Log the full User-Name attribute, as it was found in the request.
  285. #
  286. # allowed values: {no, yes}
  287. #
  288. stripped_names = no
  289.  
  290. # Log authentication requests to the log file.
  291. #
  292. # allowed values: {no, yes}
  293. #
  294. auth = no
  295.  
  296. # Log passwords with the authentication requests.
  297. # auth_badpass - logs password if it's rejected
  298. # auth_goodpass - logs password if it's correct
  299. #
  300. # allowed values: {no, yes}
  301. #
  302. auth_badpass = yes
  303. auth_goodpass = no
  304. }
  305.  
  306. # The program to execute to do concurrency checks.
  307. checkrad = ${sbindir}/checkrad
  308.  
  309. # SECURITY CONFIGURATION
  310. #
  311. # There may be multiple methods of attacking on the server. This
  312. # section holds the configuration items which minimize the impact
  313. # of those attacks
  314. #
  315. security {
  316. #
  317. # max_attributes: The maximum number of attributes
  318. # permitted in a RADIUS packet. Packets which have MORE
  319. # than this number of attributes in them will be dropped.
  320. #
  321. # If this number is set too low, then no RADIUS packets
  322. # will be accepted.
  323. #
  324. # If this number is set too high, then an attacker may be
  325. # able to send a small number of packets which will cause
  326. # the server to use all available memory on the machine.
  327. #
  328. # Setting this number to 0 means "allow any number of attributes"
  329. max_attributes = 200
  330.  
  331. #
  332. # reject_delay: When sending an Access-Reject, it can be
  333. # delayed for a few seconds. This may help slow down a DoS
  334. # attack. It also helps to slow down people trying to brute-force
  335. # crack a users password.
  336. #
  337. # Setting this number to 0 means "send rejects immediately"
  338. #
  339. # If this number is set higher than 'cleanup_delay', then the
  340. # rejects will be sent at 'cleanup_delay' time, when the request
  341. # is deleted from the internal cache of requests.
  342. #
  343. # Useful ranges: 1 to 5
  344. reject_delay = 1
  345.  
  346. #
  347. # status_server: Whether or not the server will respond
  348. # to Status-Server requests.
  349. #
  350. # When sent a Status-Server message, the server responds with
  351. # an Access-Accept or Accounting-Response packet.
  352. #
  353. # This is mainly useful for administrators who want to "ping"
  354. # the server, without adding test users, or creating fake
  355. # accounting packets.
  356. #
  357. # It's also useful when a NAS marks a RADIUS server "dead".
  358. # The NAS can periodically "ping" the server with a Status-Server
  359. # packet. If the server responds, it must be alive, and the
  360. # NAS can start using it for real requests.
  361. #
  362. # See also raddb/sites-available/status
  363. #
  364. status_server = yes
  365. }
  366.  
  367. # PROXY CONFIGURATION
  368. #
  369. # proxy_requests: Turns proxying of RADIUS requests on or off.
  370. #
  371. # The server has proxying turned on by default. If your system is NOT
  372. # set up to proxy requests to another server, then you can turn proxying
  373. # off here. This will save a small amount of resources on the server.
  374. #
  375. # If you have proxying turned off, and your configuration files say
  376. # to proxy a request, then an error message will be logged.
  377. #
  378. # To disable proxying, change the "yes" to "no", and comment the
  379. # $INCLUDE line.
  380. #
  381. # allowed values: {no, yes}
  382. #
  383. proxy_requests = yes
  384. $INCLUDE proxy.conf
  385.  
  386.  
  387. # CLIENTS CONFIGURATION
  388. #
  389. # Client configuration is defined in "clients.conf".
  390. #
  391.  
  392. # The 'clients.conf' file contains all of the information from the old
  393. # 'clients' and 'naslist' configuration files. We recommend that you
  394. # do NOT use 'client's or 'naslist', although they are still
  395. # supported.
  396. #
  397. # Anything listed in 'clients.conf' will take precedence over the
  398. # information from the old-style configuration files.
  399. #
  400. $INCLUDE clients.conf
  401.  
  402.  
  403. # THREAD POOL CONFIGURATION
  404. #
  405. # The thread pool is a long-lived group of threads which
  406. # take turns (round-robin) handling any incoming requests.
  407. #
  408. # You probably want to have a few spare threads around,
  409. # so that high-load situations can be handled immediately. If you
  410. # don't have any spare threads, then the request handling will
  411. # be delayed while a new thread is created, and added to the pool.
  412. #
  413. # You probably don't want too many spare threads around,
  414. # otherwise they'll be sitting there taking up resources, and
  415. # not doing anything productive.
  416. #
  417. # The numbers given below should be adequate for most situations.
  418. #
  419. thread pool {
  420. # Number of servers to start initially --- should be a reasonable
  421. # ballpark figure.
  422. start_servers = <%= @servers_num %>
  423.  
  424. # Limit on the total number of servers running.
  425. #
  426. # If this limit is ever reached, clients will be LOCKED OUT, so it
  427. # should NOT BE SET TOO LOW. It is intended mainly as a brake to
  428. # keep a runaway server from taking the system with it as it spirals
  429. # down...
  430. #
  431. # You may find that the server is regularly reaching the
  432. # 'max_servers' number of threads, and that increasing
  433. # 'max_servers' doesn't seem to make much difference.
  434. #
  435. # If this is the case, then the problem is MOST LIKELY that
  436. # your back-end databases are taking too long to respond, and
  437. # are preventing the server from responding in a timely manner.
  438. #
  439. # The solution is NOT do keep increasing the 'max_servers'
  440. # value, but instead to fix the underlying cause of the
  441. # problem: slow database, or 'hostname_lookups=yes'.
  442. #
  443. # For more information, see 'max_request_time', above.
  444. #
  445. max_servers = <%= @max_server %>
  446.  
  447. # Server-pool size regulation. Rather than making you guess
  448. # how many servers you need, FreeRADIUS dynamically adapts to
  449. # the load it sees, that is, it tries to maintain enough
  450. # servers to handle the current load, plus a few spare
  451. # servers to handle transient load spikes.
  452. #
  453. # It does this by periodically checking how many servers are
  454. # waiting for a request. If there are fewer than
  455. # min_spare_servers, it creates a new spare. If there are
  456. # more than max_spare_servers, some of the spares die off.
  457. # The default values are probably OK for most sites.
  458. #
  459. min_spare_servers = 3
  460. max_spare_servers = 10
  461.  
  462. # There may be memory leaks or resource allocation problems with
  463. # the server. If so, set this value to 300 or so, so that the
  464. # resources will be cleaned up periodically.
  465. #
  466. # This should only be necessary if there are serious bugs in the
  467. # server which have not yet been fixed.
  468. #
  469. # '0' is a special value meaning 'infinity', or 'the servers never
  470. # exit'
  471. max_requests_per_server = 0
  472. }
  473.  
  474. # MODULE CONFIGURATION
  475. #
  476. # The names and configuration of each module is located in this section.
  477. #
  478. # After the modules are defined here, they may be referred to by name,
  479. # in other sections of this configuration file.
  480. #
  481. modules {
  482. #
  483. # Each module has a configuration as follows:
  484. #
  485. # name [ instance ] {
  486. # config_item = value
  487. # ...
  488. # }
  489. #
  490. # The 'name' is used to load the 'rlm_name' library
  491. # which implements the functionality of the module.
  492. #
  493. # The 'instance' is optional. To have two different instances
  494. # of a module, it first must be referred to by 'name'.
  495. # The different copies of the module are then created by
  496. # inventing two 'instance' names, e.g. 'instance1' and 'instance2'
  497. #
  498. # The instance names can then be used in later configuration
  499. # INSTEAD of the original 'name'. See the 'radutmp' configuration
  500. # for an example.
  501. #
  502.  
  503. #
  504. # As of 2.0.5, most of the module configurations are in a
  505. # sub-directory. Files matching the regex /[a-zA-Z0-9_.]+/
  506. # are loaded. The modules are initialized ONLY if they are
  507. # referenced in a processing section, such as authorize,
  508. # authenticate, accounting, pre/post-proxy, etc.
  509. #
  510. $INCLUDE ${confdir}/modules/
  511.  
  512. # Extensible Authentication Protocol
  513. #
  514. # For all EAP related authentications.
  515. # Now in another file, because it is very large.
  516. #
  517. $INCLUDE eap.conf
  518. }
  519.  
  520. # Instantiation
  521. #
  522. # This section orders the loading of the modules. Modules
  523. # listed here will get loaded BEFORE the later sections like
  524. # authorize, authenticate, etc. get examined.
  525. #
  526. # This section is not strictly needed. When a section like
  527. # authorize refers to a module, it's automatically loaded and
  528. # initialized. However, some modules may not be listed in any
  529. # of the following sections, so they can be listed here.
  530. #
  531. # Also, listing modules here ensures that you have control over
  532. # the order in which they are initalized. If one module needs
  533. # something defined by another module, you can list them in order
  534. # here, and ensure that the configuration will be OK.
  535. #
  536. instantiate {
  537. #
  538. # Allows the execution of external scripts.
  539. # The entire command line (and output) must fit into 253 bytes.
  540. #
  541. # e.g. Framed-Pool = `%{exec:/bin/echo foo}`
  542. exec
  543. python
  544.  
  545. #
  546. # The expression module doesn't do authorization,
  547. # authentication, or accounting. It only does dynamic
  548. # translation, of the form:
  549. #
  550. # Session-Timeout = `%{expr:2 + 3}`
  551. #
  552. # So the module needs to be instantiated, but CANNOT be
  553. # listed in any other section. See 'doc/rlm_expr' for
  554. # more information.
  555. #
  556. expr
  557.  
  558. #
  559. # We add the counter module here so that it registers
  560. # the check-name attribute before any module which sets
  561. # it
  562. # daily
  563. expiration
  564. logintime
  565. }
  566.  
  567. ######################################################################
  568. #
  569. # Policies that can be applied in multiple places are listed
  570. # globally. That way, they can be defined once, and referred
  571. # to multiple times.
  572. #
  573. ######################################################################
  574. $INCLUDE policy.conf
  575.  
  576. ######################################################################
  577. #
  578. # Load virtual servers.
  579. #
  580. # This next $INCLUDE line loads files in the directory that
  581. # match the regular expression: /[a-zA-Z0-9_.]+/
  582. #
  583. # It allows you to define new virtual servers simply by placing
  584. # a file into the raddb/sites-enabled/ directory.
  585. #
  586. $INCLUDE sites-enabled/
Add Comment
Please, Sign In to add comment