Advertisement
Guest User

csf-config

a guest
Mar 11th, 2015
4,288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 92.86 KB | None | 0 0
  1. ###############################################################################
  2. # SECTION:Initial Settings
  3. ###############################################################################
  4. # Testing flag - enables a CRON job that clears iptables incase of
  5. # configuration problems when you start csf. This should be enabled until you
  6. # are sure that the firewall works - i.e. incase you get locked out of your
  7. # server! Then do remember to set it to 0 and restart csf when you're sure
  8. # everything is OK. Stopping csf will remove the line from /etc/crontab
  9. #
  10. # lfd will not start while this is enabled
  11. TESTING = "0"
  12.  
  13. # The interval for the crontab in minutes. Since this uses the system clock the
  14. # CRON job will run at the interval past the hour and not from when you issue
  15. # the start command. Therefore an interval of 5 minutes means the firewall
  16. # will be cleared in 0-5 minutes from the firewall start
  17. TESTING_INTERVAL = "5"
  18.  
  19. # SECURITY WARNING
  20. # ================
  21. #
  22. # Unfortunately, syslog and rsyslog allow end-users to log messages to some
  23. # system logs via the same unix socket that other local services use. This
  24. # means that any log line shown in these system logs that syslog or rsyslog
  25. # maintain can be spoofed (they are exactly the same as real log lines).
  26. #
  27. # Since some of the features of lfd rely on such log lines, spoofed messages
  28. # can cause false-positive matches which can lead to confusion at best, or
  29. # blocking of any innocent IP address or making the server inaccessible at
  30. # worst.
  31. #
  32. # Any option that relies on the log entries in the files listed in
  33. # /etc/syslog.conf and /etc/rsyslog.conf should therefore be considered
  34. # vulnerable to exploitation by end-users and scripts run by end-users.
  35. #
  36. # NOTE: Not all log files are affected as they may not use syslog/rsyslog
  37. #
  38. # The option RESTRICT_SYSLOG disables all these features that rely on affected
  39. # logs. These options are:
  40. # LF_SSHD LF_FTPD LF_IMAPD LF_POP3D LF_BIND LF_SUHOSIN LF_SSH_EMAIL_ALERT
  41. # LF_SU_EMAIL_ALERT LF_CONSOLE_EMAIL_ALERT LF_DISTATTACK LF_DISTFTP
  42. # LT_POP3D LT_IMAPD PS_INTERVAL UID_INTERVAL WEBMIN_LOG LF_WEBMIN_EMAIL_ALERT
  43. # PORTKNOCKING_ALERT
  44. #
  45. # This list of options use the logs but are not disabled by RESTRICT_SYSLOG:
  46. # ST_ENABLE SYSLOG_CHECK LOGSCANNER CUSTOM*_LOG
  47. #
  48. # The following options are still enabled by default on new installations so
  49. # that, on balance, csf/lfd still provides expected levels of security:
  50. # LF_SSHD LF_FTPD LF_POP3D LF_IMAPD LF_SSH_EMAIL_ALERT LF_SU_EMAIL_ALERT
  51. #
  52. # If you set RESTRICT_SYSLOG to "0" or "2" and enable any of the options listed
  53. # above, it should be done with the knowledge that any of the those options
  54. # that are enabled could be triggered by spoofed log lines and lead to the
  55. # server being inaccessible in the worst case. If you do not want to take that
  56. # risk you should set RESTRICT_SYSLOG to "1" and those features will not work
  57. # but you will not be protected from the exploits that they normally help block
  58. #
  59. # The recommended setting for RESTRICT_SYSLOG is "3" to restrict who can access
  60. # the syslog/rsyslog unix socket.
  61. #
  62. # For further advice on how to help mitigate these issues, see
  63. # /etc/csf/readme.txt
  64. #
  65. # 0 = Allow those options listed above to be used and configured
  66. # 1 = Disable all the options listed above and prevent them from being used
  67. # 2 = Disable only alerts about this feature and do nothing else
  68. # 3 = Restrict syslog/rsyslog access to RESTRICT_SYSLOG_GROUP ** RECOMMENDED **
  69. RESTRICT_SYSLOG = "0"
  70.  
  71. # The following setting is used if RESTRICT_SYSLOG is set to 3. It restricts
  72. # write access to the syslog/rsyslog unix socket(s). The group must not already
  73. # exists in /etc/group before setting RESTRICT_SYSLOG to 3, so set the option
  74. # to a unique name for the server
  75. #
  76. # You can add users to this group by changing /etc/csf/csf.syslogusers and then
  77. # restarting lfd afterwards. This will create the system group and add the
  78. # users from csf.syslogusers if they exist to that group and will change the
  79. # permissions on the syslog/rsyslog unix socket(s). The socket(s) will be
  80. # monitored and the permissions re-applied should syslog/rsyslog be restarted
  81. #
  82. # Using this option will prevent some legitimate logging, e.g. end-user cron
  83. # job logs
  84. #
  85. # If you want to revert RESTRICT_SYSLOG to another option and disable this
  86. # feature, change the setting of RESTRICT_SYSLOG and then restart lfd and then
  87. # syslog/rsyslog and the unix sockets will be reset
  88. RESTRICT_SYSLOG_GROUP = "mysyslog"
  89.  
  90. # This options restricts the ability to modify settings within this file from
  91. # the csf UI. Should the parent control panel be compromised, these restricted
  92. # options could be used to further compromise the server. For this reason we
  93. # recommend leaving this option set to at least "1" and if any of the
  94. # restricted items need to be changed, they are done so from the root shell
  95. #
  96. # 0 = Unrestricted UI
  97. # 1 = Restricted UI
  98. # 2 = Disabled UI
  99. RESTRICT_UI = "1"
  100.  
  101. # Enabling auto updates creates a cron job called /etc/cron.d/csf_update which
  102. # runs once per day to see if there is an update to csf+lfd and upgrades if
  103. # available and restarts csf and lfd
  104. #
  105. # You should check for new version announcements at http://blog.configserver.com
  106. AUTO_UPDATES = "1"
  107.  
  108. ###############################################################################
  109. # SECTION:IPv4 Port Settings
  110. ###############################################################################
  111. # Lists of ports in the following comma separated lists can be added using a
  112. # colon (e.g. 30000:35000).
  113.  
  114. # Allow incoming TCP ports
  115. TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096,4082,4083,4084,4085"
  116.  
  117. # Allow outgoing TCP ports
  118. TCP_OUT = "20,21,22,25,37,43,53,80,110,113,443,587,873,993,995,2086,2087,2089,2703,4082,4083,4084,4085"
  119.  
  120. # Allow incoming UDP ports
  121. UDP_IN = "20,21,53,4082,4083,4084,4085"
  122.  
  123. # Allow outgoing UDP ports
  124. # To allow outgoing traceroute add 33434:33523 to this list
  125. UDP_OUT = "20,21,53,113,123,873,6277,4082,4083,4084,4085"
  126.  
  127. # Allow incoming PING
  128. ICMP_IN = "1"
  129.  
  130. # Set the per IP address incoming ICMP packet rate
  131. # To disable rate limiting set to "0"
  132. ICMP_IN_RATE = "1/s"
  133.  
  134. # Allow outgoing PING
  135. ICMP_OUT = "1"
  136.  
  137. # Set the per IP address outgoing ICMP packet rate (hits per second allowed),
  138. # e.g. "1/s"
  139. #
  140. # Recommend disabling on cPanel servers as cPanel uses ping test to determine
  141. # fastest mirrors for various functions
  142. #
  143. # To disable rate limiting set to "0"
  144. ICMP_OUT_RATE = "0"
  145.  
  146. ###############################################################################
  147. # SECTION:IPv6 Port Settings
  148. ###############################################################################
  149. # IPv6: (Requires ip6tables)
  150. #
  151. # Pre v2.6.20 kernels do not perform stateful connection tracking, so a static
  152. # firewall is configured as a fallback instead if IPV6_SPI is set to 0 below
  153. #
  154. # Supported:
  155. # Temporary ACCEPT/DENY, GLOBAL_DENY, GLOBAL_ALLOW, SMTP_BLOCK, LF_PERMBLOCK,
  156. # PACKET_FILTER, WATCH_MODE, Advanced Allow/Deny Filters, RELAY_*, CLUSTER_*
  157. #
  158. # Not supported:
  159. # CC_DENY, CC_ALLOW, CC_ALLOW_FILTER, SYNFLOOD, PORTFLOOD,
  160. # ICMP_IN, ICMP_OUT, LF_NETBLOCK, MESSENGER, CC_IGNORE, CONNLIMIT,
  161. # CC_ALLOW_PORTS, CC_DENY_PORTS
  162. #
  163. # Partially supported:
  164. # CC_LOOKUPS - reverse DNS only and requires the perl module Socket6 from cpan
  165. #
  166. # MESSENGER service - not supported: no REDIRECT support in ip6tables as yet
  167. #
  168. IPV6 = "1"
  169.  
  170. # IPv6 uses icmpv6 packets very heavily. By default, csf will allow all icmpv6
  171. # traffic in the INPUT and OUTPUT chains. However, this could increase the risk
  172. # of icmpv6 attacks. To restrict incoming icmpv6, set to "1" but may break some
  173. # connection types
  174. IPV6_ICMP_STRICT = "0"
  175.  
  176. # Pre v2.6.20 kernel must set this option to "0" as no working state module is
  177. # present, so a static firewall is configured as a fallback
  178. #
  179. # A workaround has been added for CentOS/RedHat v5 and custom kernels that do
  180. # not support IPv6 connection tracking by opening ephemeral port range
  181. # 32768:61000. This is only applied if IPV6_SPI is not enabled. This is the
  182. # same workaround implemented by RedHat in the sample default IPv6 rules
  183. #
  184. # Because connection tracking does not work on such kernels, applications that
  185. # rely on it (e.g. apache, passive ftp, etc) will not function unless you open
  186. # all outgoing ports. To do this set the following:
  187. #
  188. # TCP6_OUT = "0:65535"
  189. # UDP6_OUT = "0:65535"
  190. #
  191. # If you allow incoming ipv6 DNS lookups you will need to use the following
  192. # directive in the options{} section of your named.conf:
  193. #
  194. # query-source-v6 port 53;
  195. #
  196. # This will force ipv6 incoming DNS traffic only through port 53
  197. #
  198. # These changes are not necessary if the SPI firewall is used
  199. IPV6_SPI = "1"
  200.  
  201. # Allow incoming IPv6 TCP ports
  202. TCP6_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096"
  203.  
  204. # Allow outgoing IPv6 TCP ports
  205. TCP6_OUT = "20,21,22,25,37,43,53,80,110,113,443,587,873,993,995,2086,2087,2089,2703"
  206.  
  207. # Allow incoming IPv6 UDP ports
  208. UDP6_IN = "20,21,53"
  209.  
  210. # Allow outgoing IPv6 UDP ports
  211. # To allow outgoing traceroute add 33434:33523 to this list
  212. UDP6_OUT = "20,21,53,113,123,873,6277"
  213.  
  214. ###############################################################################
  215. # SECTION:General Settings
  216. ###############################################################################
  217. # By default, csf will auto-configure iptables to filter all traffic except on
  218. # the loopback device. If you only want iptables rules applied to a specific
  219. # NIC, then list it here (e.g. eth1, or eth+)
  220. ETH_DEVICE = ""
  221.  
  222. # By adding a device to this option, ip6tables can be configured only on the
  223. # specified device. Otherwise, ETH_DEVICE and then the default setting will be
  224. # used
  225. ETH6_DEVICE = ""
  226.  
  227. # If you don't want iptables rules applied to specific NICs, then list them in
  228. # a comma separated list (e.g "eth1,eth2")
  229. ETH_DEVICE_SKIP = ""
  230.  
  231. # To switch from the deprecated iptables "state" module to the "conntrack"
  232. # module, change this to 1
  233. USE_CONNTRACK = "0"
  234.  
  235. # Check whether syslog is running. Many of the lfd checks require syslog to be
  236. # running correctly. This test will send a coded message to syslog every
  237. # SYSLOG_CHECK seconds. lfd will check SYSLOG_LOG log lines for the coded
  238. # message. If it fails to do so within SYSLOG_CHECK seconds an alert using
  239. # syslogalert.txt is sent
  240. #
  241. # A value of betwen 300 and 3600 seconds is suggested. Set to 0 to disable
  242. SYSLOG_CHECK = "0"
  243.  
  244. # Enable this option if you do not wish to block all IP's that have
  245. # authenticated using POP before SMTP (i.e. are valid clients). This option
  246. # checks for IP addresses in /etc/relayhosts, which last for 30 minutes in that
  247. # file after a successful POP authentication.
  248. #
  249. # Set the value to 0 to disable the feature
  250. RELAYHOSTS = "0"
  251.  
  252. # Enable this option if you want lfd to ignore (i.e. don't block) IP addresses
  253. # listed in csf.allow in addition to csf.ignore (the default). This option
  254. # should be used with caution as it would mean that IP's allowed through the
  255. # firewall from infected PC's could launch attacks on the server that lfd
  256. # would ignore
  257. IGNORE_ALLOW = "0"
  258.  
  259. # Enable the following option if you want to apply strict iptables rules to DNS
  260. # traffic (i.e. relying on iptables connection tracking). Enabling this option
  261. # could cause DNS resolution issues both to and from the server but could help
  262. # prevent abuse of the local DNS server
  263. DNS_STRICT = "0"
  264.  
  265. # Enable the following option if you want to apply strict iptables rules to DNS
  266. # traffic between the server and the nameservers listed in /etc/resolv.conf
  267. # Enabling this option could cause DNS resolution issues both to and from the
  268. # server but could help prevent abuse of the local DNS server
  269. DNS_STRICT_NS = "0"
  270.  
  271. # Limit the number of IP's kept in the /etc/csf/csf.deny file
  272. #
  273. # Care should be taken when increasing this value on servers with low memory
  274. # resources or hard limits (such as Virtuozzo/OpenVZ) as too many rules (in the
  275. # thousands) can sometimes cause network slowdown
  276. #
  277. # The value set here is the maximum number of IPs/CIDRs allowed
  278. # if the limit is reached, the entries will be rotated so that the oldest
  279. # entries (i.e. the ones at the top) will be removed and the latest is added.
  280. # The limit is only checked when using csf -d (which is what lfd also uses)
  281. # Set to 0 to disable limiting
  282. #
  283. # For implementations wishing to set this value significantly higher, we
  284. # recommend using the IPSET option
  285. DENY_IP_LIMIT = "200"
  286.  
  287. # Limit the number of IP's kept in the temprary IP ban list. If the limit is
  288. # reached the oldest IP's in the ban list will be removed and allowed
  289. # regardless of the amount of time remaining for the block
  290. # Set to 0 to disable limiting
  291. DENY_TEMP_IP_LIMIT = "100"
  292.  
  293. # Enable login failure detection daemon (lfd). If set to 0 none of the
  294. # following settings will have any effect as the daemon won't start.
  295. LF_DAEMON = "1"
  296.  
  297. # Check whether csf appears to have been stopped and restart if necessary,
  298. # unless TESTING is enabled above. The check is done every 300 seconds
  299. LF_CSF = "1"
  300.  
  301. # This option uses IPTABLES_SAVE, IPTABLES_RESTORE and IP6TABLES_SAVE,
  302. # IP6TABLES_RESTORE in two ways:
  303. #
  304. # 1. On a clean server reboot the entire csf iptables configuration is saved
  305. # and then restored where possible to provide a near instant firewall
  306. # startup[*]
  307. #
  308. # 2. On csf restart or lfd reloading tables, CC_* as well as SPAMHAUS, DSHIELD,
  309. # BOGON, TOR are loaded using this method in a fraction of the time than if
  310. # this setting is disabled
  311. #
  312. # [*]Not supported on all OS platforms
  313. #
  314. # Set to "0" to disable this functionality
  315. FASTSTART = "1"
  316.  
  317. # This option allows you to use ipset v6+ for the following csf options:
  318. # CC_* and /etc/csf/csf.blocklist, /etc/csf/csf.allow, /etc/csf/csf.deny,
  319. # GLOBAL_DENY, GLOBAL_ALLOW, DYNDNS, GLOBAL_DYNDNS, MESSENGER
  320. #
  321. # ipset will only be used with the above options when listing IPv4 IPs and
  322. # CIDRs. IPv6 IPs, Advanced Allow Filters and temporary blocks use traditional
  323. # iptables
  324. #
  325. # Using ipset moves the onus of ip matching against large lists away from
  326. # iptables rules and to a purpose built and optimised database matching
  327. # utility. It also simplifies the switching in of updated lists
  328. #
  329. # To use this option you must have a fully functioning installation of ipset
  330. # installed either via rpm or source from http://ipset.netfilter.org/
  331. #
  332. # Note: Using ipset has many advantages, some disadvantages are that you will
  333. # no longer see packet and byte counts against IPs and it makes identifying
  334. # blocked/allowed IPs that little bit harder
  335. #
  336. # Note: If you mainly use IP address only entries in csf.deny, you can increase
  337. # the value of DENY_IP_LIMIT significantly if you wish
  338. #
  339. # Note: It's highly unlikely that ipset will function on Virtuozzo/OpenVZ
  340. # containers even if it has been installed
  341. #
  342. # If you find any problems, please post on forums.configserver.com with full
  343. # details of the issue
  344. LF_IPSET = "0"
  345.  
  346. # If you enable this option then whenever a CLI request to restart csf is used
  347. # lfd will restart csf instead within LF_PARSE seconds
  348. #
  349. # This feature can be helpful for restarting configurations that cannot use
  350. # FASTSTART
  351. LFDSTART = "0"
  352.  
  353. # Enable verbose output of iptables commands
  354. VERBOSE = "1"
  355.  
  356. # Drop out of order packets and packets in an INVALID state in iptables
  357. # connection tracking
  358. PACKET_FILTER = "1"
  359.  
  360. # Perform reverse DNS lookups on IP addresses. See also CC_LOOKUPS
  361. LF_LOOKUPS = "1"
  362.  
  363. ###############################################################################
  364. # SECTION:SMTP Settings
  365. ###############################################################################
  366. # Block outgoing SMTP except for root, exim and mailman (forces scripts/users
  367. # to use the exim/sendmail binary instead of sockets access). This replaces the
  368. # protection as WHM > Tweak Settings > SMTP Tweaks
  369. #
  370. # This option uses the iptables ipt_owner/xt_owner module and must be loaded
  371. # for it to work. It may not be available on some VPS platforms
  372. #
  373. # Note: Run /etc/csf/csftest.pl to check whether this option will function on
  374. # this server
  375. SMTP_BLOCK = "0"
  376.  
  377. # If SMTP_BLOCK is enabled but you want to allow local connections to port 25
  378. # on the server (e.g. for webmail or web scripts) then enable this option to
  379. # allow outgoing SMTP connections to the loopback device
  380. SMTP_ALLOWLOCAL = "1"
  381.  
  382. # This is a comma separated list of the ports to block. You should list all
  383. # ports that exim is configured to listen on
  384. SMTP_PORTS = "25,465,587"
  385.  
  386. # Always allow the following comma separated users and groups to bypass
  387. # SMTP_BLOCK
  388. #
  389. # Note: root (UID:0) is always allowed
  390. SMTP_ALLOWUSER = "cpanel"
  391. SMTP_ALLOWGROUP = "mail,mailman"
  392.  
  393. # This option will only allow SMTP AUTH to be advertised to the IP addresses
  394. # listed in /etc/csf/csf.smtpauth on EXIM mail servers
  395. #
  396. # The additional option CC_ALLOW_SMTPAUTH can be used with this option to
  397. # additionally restrict access to specific countries
  398. #
  399. # This is to help limit attempts at distributed attacks against SMTP AUTH which
  400. # are difficult to achieve since port 25 needs to be open to relay email
  401. #
  402. # The reason why this works is that if EXIM does not advertise SMTP AUTH on a
  403. # connection, then SMTP AUTH will not accept logins, defeating the attacks
  404. # without restricting mail relaying
  405. #
  406. # Note: csf and lfd must be restarted if /etc/csf/csf.smtpauth is modified so
  407. # that the lookup file in /etc/exim.smtpauth is regenerated from the
  408. # information from /etc/csf/csf.smtpauth plus any countries listed in
  409. # CC_ALLOW_SMTPAUTH
  410. #
  411. # NOTE: To make this option work you MUST make the modifications to exim.conf
  412. # as explained in "Exim SMTP AUTH Restriction" section in /etc/csf/readme.txt
  413. # after enabling the option here, otherwise this option will not work
  414. #
  415. # To enable this option, set to 1 and make the exim configuration changes
  416. # To disable this option, set to 0 and undo the exim configuration changes
  417. SMTPAUTH_RESTRICT = "0"
  418.  
  419. ###############################################################################
  420. # SECTION:Port Flood Settings
  421. ###############################################################################
  422. # Enable SYN Flood Protection. This option configures iptables to offer some
  423. # protection from tcp SYN packet DOS attempts. You should set the RATE so that
  424. # false-positives are kept to a minimum otherwise visitors may see connection
  425. # issues (check /var/log/messages for *SYNFLOOD Blocked*). See the iptables
  426. # man page for the correct --limit rate syntax
  427. #
  428. # Note: This option should ONLY be enabled if you know you are under a SYN
  429. # flood attack as it will slow down all new connections from any IP address to
  430. # the server if triggered
  431. SYNFLOOD = "0"
  432. SYNFLOOD_RATE = "100/s"
  433. SYNFLOOD_BURST = "150"
  434.  
  435. # Connection Limit Protection. This option configures iptables to offer more
  436. # protection from DOS attacks against specific ports. It can also be used as a
  437. # way to simply limit resource usage by IP address to specific server services.
  438. # This option limits the number of concurrent new connections per IP address
  439. # that can be made to specific ports
  440. #
  441. # This feature does not work on servers that do not have the iptables module
  442. # xt_connlimit loaded. Typically, this will be with MONOLITHIC kernels. VPS
  443. # server admins should check with their VPS host provider that the iptables
  444. # module is included
  445. #
  446. # For further information and syntax refer to the Connection Limit Protection
  447. # section of the csf readme.txt
  448. #
  449. # Note: Run /etc/csf/csftest.pl to check whether this option will function on
  450. # this server
  451. CONNLIMIT = ""
  452.  
  453. # Port Flood Protection. This option configures iptables to offer protection
  454. # from DOS attacks against specific ports. This option limits the number of
  455. # new connections per time interval that can be made to specific ports
  456. #
  457. # This feature does not work on servers that do not have the iptables module
  458. # ipt_recent loaded. Typically, this will be with MONOLITHIC kernels. VPS
  459. # server admins should check with their VPS host provider that the iptables
  460. # module is included
  461. #
  462. # For further information and syntax refer to the Port Flood Protection
  463. # section of the csf readme.txt
  464. #
  465. # Note: Run /etc/csf/csftest.pl to check whether this option will function on
  466. # this server
  467. PORTFLOOD = ""
  468.  
  469. # Outgoing UDP Flood Protection. This option limits outbound UDP packet floods.
  470. # These typically originate from exploit scripts uploaded through vulnerable
  471. # web scripts. Care should be taken on servers that use services that utilise
  472. # high levels of UDP outbound traffic, such as SNMP, so you may need to alter
  473. # the UDPFLOOD_LIMIT and UDPFLOOD_BURST options to suit your environment
  474. #
  475. # We recommend enabling User ID Tracking (UID_INTERVAL) with this feature
  476. UDPFLOOD = "0"
  477. UDPFLOOD_LIMIT = "100/s"
  478. UDPFLOOD_BURST = "500"
  479.  
  480. # This is a list of usernames that should not be rate limited, such as "named"
  481. # to prevent bind traffic from being limited.
  482. #
  483. # Note: root (UID:0) is always allowed
  484. UDPFLOOD_ALLOWUSER = "named"
  485.  
  486. ###############################################################################
  487. # SECTION:Logging Settings
  488. ###############################################################################
  489. # Log lfd messages to SYSLOG in addition to /var/log/lfd.log. You must have the
  490. # perl module Sys::Syslog installed to use this feature
  491. SYSLOG = "0"
  492.  
  493. # Drop target for iptables rules. This can be set to either DROP ot REJECT.
  494. # REJECT will send back an error packet, DROP will not respond at all. REJECT
  495. # is more polite, however it does provide extra information to a hacker and
  496. # lets them know that a firewall is blocking their attempts. DROP hangs their
  497. # connection, thereby frustrating attempts to port scan the server.
  498. DROP = "DROP"
  499.  
  500. # Enable logging of dropped connections to blocked ports to syslog, usually
  501. # /var/log/messages. This option needs to be enabled to use Port Scan Tracking
  502. DROP_LOGGING = "1"
  503.  
  504. # Enable logging of dropped incoming connections from blocked IP addresses
  505. #
  506. # This option will be disabled if you enable Port Scan Tracking (PS_INTERVAL)
  507. DROP_IP_LOGGING = "0"
  508.  
  509. # Enable logging of dropped outgoing connections
  510. #
  511. # Note: Only outgoing SYN packets for TCP connections are logged, other
  512. # protocols log all packets
  513. #
  514. # We recommend that you enable this option
  515. DROP_OUT_LOGGING = "1"
  516.  
  517. # Together with DROP_OUT_LOGGING enabled, this option logs the UID connecting
  518. # out (where available) which can help track abuse
  519. DROP_UID_LOGGING = "1"
  520.  
  521. # Only log incoming reserved port dropped connections (0:1023). This can reduce
  522. # the amount of log noise from dropped connections, but will affect options
  523. # such as Port Scan Tracking (PS_INTERVAL)
  524. DROP_ONLYRES = "0"
  525.  
  526. # Commonly blocked ports that you do not want logging as they tend to just fill
  527. # up the log file. These ports are specifically blocked (applied to TCP and UDP
  528. # protocols) for incoming connections
  529. DROP_NOLOG = "67,68,111,113,135:139,445,500,513,520"
  530.  
  531. # Log packets dropped by the packet filtering option PACKET_FILTER
  532. DROP_PF_LOGGING = "0"
  533.  
  534. # Log packets dropped by the Connection Limit Protection option CONNLIMIT. If
  535. # this is enabled and Port Scan Tracking (PS_INTERVAL) is also enabled, IP
  536. # addresses breaking the Connection Limit Protection will be blocked
  537. CONNLIMIT_LOGGING = "0"
  538.  
  539. # Enable logging of UDP floods. This should be enabled, especially with User ID
  540. # Tracking enabled
  541. UDPFLOOD_LOGGING = "1"
  542.  
  543. # Send an alert if log file flooding is detected which causes lfd to skip log
  544. # lines to prevent lfd from looping. If this alert is sent you should check the
  545. # reported log file for the reason for the flooding
  546. LOGFLOOD_ALERT = "0"
  547.  
  548. # Configure csf to watch IP addresses (with csf -w [ip]). This option will add
  549. # overhead to packet traversal through iptables and syslog logging, so should
  550. # only be enabled while actively watching IP addresses. See readme.txt for more
  551. # information on the use of this option
  552. WATCH_MODE = "0"
  553.  
  554. ###############################################################################
  555. # SECTION:Reporting Settings
  556. ###############################################################################
  557. # By default, lfd will send alert emails using the relevant alert template to
  558. # the To: address configured within that template. Setting the following
  559. # option will override the configured To: field in all lfd alert emails
  560. #
  561. # Leave this option empty to use the To: field setting in each alert template
  562. LF_ALERT_TO = ""
  563.  
  564. # By default, lfd will send alert emails using the relevant alert template from
  565. # the From: address configured within that template. Setting the following
  566. # option will override the configured From: field in all lfd alert emails
  567. #
  568. # Leave this option empty to use the From: field setting in each alert template
  569. LF_ALERT_FROM = ""
  570.  
  571. # By default, lfd will send all alerts using the SENDMAIL binary. To send using
  572. # SMTP directly, you can set the following to a relaying SMTP server, e.g.
  573. # "127.0.0.1". Leave this setting blank to use SENDMAIL
  574. LF_ALERT_SMTP = ""
  575.  
  576. # Block Reporting. lfd can run an external script when it performs and IP
  577. # address block following for example a login failure. The following setting
  578. # is to the full path of the external script which must be executable. See
  579. # readme.txt for format details
  580. #
  581. # Leave this setting blank to disable
  582. BLOCK_REPORT = ""
  583.  
  584. # To also run an external script when a temporary block is unblocked: the
  585. # following setting can be the full path of the external script which must be
  586. # executable. See readme.txt for format details
  587. #
  588. # Leave this setting blank to disable
  589. UNBLOCK_REPORT = ""
  590.  
  591. # In addition to the standard lfd email alerts, you can additionally enable the
  592. # sending of X-ARF reports (see http://www.x-arf.org/specification.html). Only
  593. # block alert messages will be sent. The reports use our schema at:
  594. # https://download.configserver.com/abuse_login-attack_0.2.json
  595. #
  596. # These reports are in a format accepted by many Netblock owners and should
  597. # help them investigate abuse. This option is not designed to automatically
  598. # forward these reports to the Netblock owners and should be checked for
  599. # false-positive blocks before reporting
  600. #
  601. # Note: The following block types are not reported through this feature:
  602. # LF_PERMBLOCK, LF_NETBLOCK, LF_DISTATTACK, LF_DISTFTP, RT_*_ALERT
  603. X_ARF = "0"
  604.  
  605. # By default, lfd will send emails from the root forwarder. Setting the
  606. # following option will override this
  607. X_ARF_FROM = ""
  608.  
  609. # By default, lfd will send emails to the root forwarder. Setting the following
  610. # option will override this
  611. X_ARF_TO = ""
  612.  
  613. ###############################################################################
  614. # SECTION:Temp to Perm/Netblock Settings
  615. ###############################################################################
  616. # Temporary to Permanent IP blocking. The following enables this feature to
  617. # permanently block IP addresses that have been temporarily blocked more than
  618. # LF_PERMBLOCK_COUNT times in the last LF_PERMBLOCK_INTERVAL seconds. Set
  619. # LF_PERMBLOCK to "1" to enable this feature
  620. #
  621. # Care needs to be taken when setting LF_PERMBLOCK_INTERVAL as it needs to be
  622. # at least LF_PERMBLOCK_COUNT multiplied by the longest temporary time setting
  623. # (TTL) for blocked IPs, to be effective
  624. #
  625. # Set LF_PERMBLOCK to "0" to disable this feature
  626. LF_PERMBLOCK = "1"
  627. LF_PERMBLOCK_INTERVAL = "86400"
  628. LF_PERMBLOCK_COUNT = "4"
  629. LF_PERMBLOCK_ALERT = "1"
  630.  
  631. # Permanently block IPs by network class. The following enables this feature
  632. # to permanently block classes of IP address where individual IP addresses
  633. # within the same class LF_NETBLOCK_CLASS have already been blocked more than
  634. # LF_NETBLOCK_COUNT times in the last LF_NETBLOCK_INTERVAL seconds. Set
  635. # LF_NETBLOCK to "1" to enable this feature
  636. #
  637. # This can be an affective way of blocking DDOS attacks launched from within
  638. # the same network class
  639. #
  640. # Valid settings for LF_NETBLOCK_CLASS are "A", "B" and "C", care and
  641. # consideration is required when blocking network classes A or B
  642. #
  643. # Set LF_NETBLOCK to "0" to disable this feature
  644. LF_NETBLOCK = "0"
  645. LF_NETBLOCK_INTERVAL = "86400"
  646. LF_NETBLOCK_COUNT = "4"
  647. LF_NETBLOCK_CLASS = "C"
  648. LF_NETBLOCK_ALERT = "1"
  649.  
  650. ###############################################################################
  651. # SECTION:Global Lists/DYNDNS/Blocklists
  652. ###############################################################################
  653. # Safe Chain Update. If enabled, all dynamic update chains (GALLOW*, GDENY*,
  654. # SPAMHAUS, DSHIELD, BOGON, CC_ALLOW, CC_DENY, ALLOWDYN*) will create a new
  655. # chain when updating, and insert it into the relevant LOCALINPUT/LOCALOUTPUT
  656. # chain, then flush and delete the old dynamic chain and rename the new chain.
  657. #
  658. # This prevents a small window of opportunity opening when an update occurs and
  659. # the dynamic chain is flushed for the new rules.
  660. #
  661. # This option should not be enabled on servers with long dynamic chains (e.g.
  662. # CC_DENY/CC_ALLOW lists) and low memory. It should also not be enabled on
  663. # Virtuozzo VPS servers with a restricted numiptent value. This is because each
  664. # chain will effectively be duplicated while the update occurs, doubling the
  665. # number of iptables rules
  666. SAFECHAINUPDATE = "0"
  667.  
  668. # If you wish to allow access from dynamic DNS records (for example if your IP
  669. # address changes whenever you connect to the internet but you have a dedicated
  670. # dynamic DNS record from the likes of dyndns.org) then you can list the FQDN
  671. # records in csf.dyndns and then set the following to the number of seconds to
  672. # poll for a change in the IP address. If the IP address has changed iptables
  673. # will be updated.
  674. #
  675. # If the FQDN has multiple A records then all of the IP addresses will be
  676. # processed. If IPV6 is enabled and the perl module Socket6 from cpan.org is
  677. # installed, then all IPv6 AAAA IP address records will also be allowed.
  678. #
  679. # A setting of 600 would check for IP updates every 10 minutes. Set the value
  680. # to 0 to disable the feature
  681. DYNDNS = "0"
  682.  
  683. # To always ignore DYNDNS IP addresses in lfd blocking, set the following
  684. # option to 1
  685. DYNDNS_IGNORE = "0"
  686.  
  687. # The follow Global options allow you to specify a URL where csf can grab a
  688. # centralised copy of an IP allow or deny block list of your own. You need to
  689. # specify the full URL in the following options, i.e.:
  690. # http://www.somelocation.com/allow.txt
  691. #
  692. # The actual retrieval of these IP's is controlled by lfd, so you need to set
  693. # LF_GLOBAL to the interval (in seconds) when you want lfd to retrieve. lfd
  694. # will perform the retrieval when it runs and then again at the specified
  695. # interval. A sensible interval would probably be every 3600 seconds (1 hour).
  696. # A minimum value of 300 is enforced for LF_GLOBAL if enabled
  697. #
  698. # You do not have to specify both an allow and a deny file
  699. #
  700. # You can also configure a global ignore file for IP's that lfd should ignore
  701. LF_GLOBAL = "0"
  702.  
  703. GLOBAL_ALLOW = ""
  704. GLOBAL_DENY = ""
  705. GLOBAL_IGNORE = ""
  706.  
  707. # Provides the same functionality as DYNDNS but with a GLOBAL URL file. Set
  708. # this to the URL of the file containing DYNDNS entries
  709. GLOBAL_DYNDNS = ""
  710.  
  711. # Set the following to the number of seconds to poll for a change in the IP
  712. # address resoved from GLOBAL_DYNDNS
  713. GLOBAL_DYNDNS_INTERVAL = "600"
  714.  
  715. # To always ignore GLOBAL_DYNDNS IP addresses in lfd blocking, set the following
  716. # option to 1
  717. GLOBAL_DYNDNS_IGNORE = "0"
  718.  
  719. # Blocklists are controlled by modifying /etc/csf/csf.blocklists
  720. #
  721. # If you don't want BOGON rules applied to specific NICs, then list them in
  722. # a comma separated list (e.g "eth1,eth2")
  723. LF_BOGON_SKIP = ""
  724.  
  725. # The following option can be used to select either HTTP::Tiny or
  726. # LWP::UserAgent to retrieve URL data. HTTP::Tiny is much faster than
  727. # LWP::UserAgent and is included in the csf distribution. LWP::UserAgent may
  728. # have to be installed manually, but it can better support https:// URL's
  729. # which also needs the LWP::Protocol::https perl module
  730. #
  731. # For example:
  732. #
  733. # On rpm based systems:
  734. #
  735. # yum install perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch
  736. #
  737. # On APT based systems:
  738. #
  739. # apt-get install libwww-perl liblwp-protocol-https-perl
  740. #
  741. # Via cpan:
  742. #
  743. # perl -MCPAN -eshell
  744. # cpan> install LWP LWP::Protocol::https
  745. #
  746. # We recommend setting this set to "2" as upgrades to csf will be performed
  747. # over SSL to https://download.configserver.com
  748. #
  749. # "1" = HTTP::Tiny
  750. # "2" = LWP::UserAgent
  751. URLGET = "2"
  752.  
  753. ###############################################################################
  754. # SECTION:Country Code Lists and Settings
  755. ###############################################################################
  756. # Country Code to CIDR allow/deny. In the following two options you can allow
  757. # or deny whole country CIDR ranges. The CIDR blocks are generated from the
  758. # Maxmind GeoLite Country database http://www.maxmind.com/app/geolitecountry
  759. # and entirely relies on that service being available
  760. #
  761. # Specify the the two-letter ISO Country Code(s). The iptables rules are for
  762. # incoming connections only
  763. #
  764. # WARNING: These lists are never 100% accurate and some ISP's (e.g. AOL) use
  765. # non-geographic IP address designations for their clients
  766. #
  767. # WARNING: Some of the CIDR lists are huge and each one requires a rule within
  768. # the incoming iptables chain. This can result in significant performance
  769. # overheads and could render the server inaccessible in some circumstances. For
  770. # this reason (amongst others) we do not recommend using these options
  771. #
  772. # WARNING: Due to the resource constraints on VPS servers this feature should
  773. # not be used on such systems unless you choose very small CC zones
  774. #
  775. # WARNING: CC_ALLOW allows access through all ports in the firewall. For this
  776. # reason CC_ALLOW probably has very limited use and CC_ALLOW_FILTER is
  777. # preferred
  778. #
  779. # Each option is a comma separated list of CC's, e.g. "US,GB,DE"
  780. CC_DENY = ""
  781. CC_ALLOW = ""
  782.  
  783. # An alternative to CC_ALLOW is to only allow access from the following
  784. # countries but still filter based on the port and packets rules. All other
  785. # connections are dropped
  786. CC_ALLOW_FILTER = ""
  787.  
  788. # This option allows access from the following countries to specific ports
  789. # listed in CC_ALLOW_PORTS_TCP and CC_ALLOW_PORTS_UDP
  790. #
  791. # Note: The rules for this feature are inserted after the allow and deny
  792. # rules to still allow blocking of IP addresses
  793. #
  794. # Each option is a comma separated list of CC's, e.g. "US,GB,DE"
  795. CC_ALLOW_PORTS = ""
  796.  
  797. # All listed ports should be removed from TCP_IN/UDP_IN to block access from
  798. # elsewhere. This option uses the same format as TCP_IN/UDP_IN
  799. #
  800. # An example would be to list port 21 here and remove it from TCP_IN/UDP_IN
  801. # then only counties listed in CC_ALLOW_PORTS can access FTP
  802. CC_ALLOW_PORTS_TCP = ""
  803. CC_ALLOW_PORTS_UDP = ""
  804.  
  805. # This option denies access from the following countries to specific ports
  806. # listed in CC_DENY_PORTS_TCP and CC_DENY_PORTS_UDP
  807. #
  808. # Note: The rules for this feature are inserted after the allow and deny
  809. # rules to still allow allowing of IP addresses
  810. #
  811. # Each option is a comma separated list of CC's, e.g. "US,GB,DE"
  812. CC_DENY_PORTS = ""
  813.  
  814. # This option uses the same format as TCP_IN/UDP_IN. The ports listed should
  815. # NOT be removed from TCP_IN/UDP_IN
  816. #
  817. # An example would be to list port 21 here then counties listed in
  818. # CC_DENY_PORTS cannot access FTP
  819. CC_DENY_PORTS_TCP = ""
  820. CC_DENY_PORTS_UDP = ""
  821.  
  822. # This Country Code list will prevent lfd from blocking IP address hits for the
  823. # listed CC's
  824. #
  825. # CC_LOOKUPS must be enabled to use this option
  826. CC_IGNORE = ""
  827.  
  828. # This Country Code list will only allow SMTP AUTH to be advertised to the
  829. # listed countries in EXIM. This is to help limit attempts at distributed
  830. # attacks against SMTP AUTH which are difficult to achive since port 25 needs
  831. # to be open to relay email
  832. #
  833. # The reason why this works is that if EXIM does not advertise SMTP AUTH on a
  834. # connection, then SMTP AUTH will not accept logins, defeating the attacks
  835. # without restricting mail relaying
  836. #
  837. # This option can generate a very large list of IP addresses that could easily
  838. # severely impact on SMTP (mail) performance, so care must be taken when
  839. # selecting countries and if performance issues ensue
  840. #
  841. # The option SMTPAUTH_RESTRICT must be enabled to use this option
  842. CC_ALLOW_SMTPAUTH = ""
  843.  
  844. # Set this option to a valid CIDR (i.e. 1 to 32) to ignore CIDR blocks smaller
  845. # than this value when implementing CC_DENY/CC_ALLOW/CC_ALLOW_FILTER. This can
  846. # help reduce the number of CC entries and may improve iptables throughput.
  847. # Obviously, this will deny/allow fewer IP addresses depending on how small you
  848. # configure the option
  849. #
  850. # For example, to ignore all CIDR (and single IP) entries small than a /16, set
  851. # this option to "16". Set to "" to block all CC IP addresses
  852. CC_DROP_CIDR = ""
  853.  
  854. # Display Country Code and Country for reported IP addresses. This option can
  855. # be configured to use the MaxMind Country Database or the more detailed (and
  856. # much larger and therefore slower) MaxMind City Database
  857. #
  858. # "0" - disable
  859. # "1" - Reports: Country Code and Country
  860. # "2" - Reports: Country Code and Country and Region and City
  861. # "3" - Reports: Country Code and Country and Region and City and ASN
  862. CC_LOOKUPS = "1"
  863.  
  864. # This option tells lfd how often to retrieve the Maxmind GeoLite Country
  865. # database for CC_ALLOW, CC_ALLOW_FILTER, CC_DENY, CC_IGNORE and CC_LOOKUPS (in
  866. # days)
  867. CC_INTERVAL = "7"
  868.  
  869. ###############################################################################
  870. # SECTION:Login Failure Blocking and Alerts
  871. ###############################################################################
  872. # The following[*] triggers are application specific. If you set LF_TRIGGER to
  873. # "0" the value of each trigger is the number of failures against that
  874. # application that will trigger lfd to block the IP address
  875. #
  876. # If you set LF_TRIGGER to a value greater than "0" then the following[*]
  877. # application triggers are simply on or off ("0" or "1") and the value of
  878. # LF_TRIGGER is the total cumulative number of failures that will trigger lfd
  879. # to block the IP address
  880. #
  881. # Setting the application trigger to "0" disables it
  882. LF_TRIGGER = "0"
  883.  
  884. # If LF_TRIGGER is > "0" then LF_TRIGGER_PERM can be set to "1" to permanently
  885. # block the IP address, or LF_TRIGGER_PERM can be set to a value greater than
  886. # "1" and the IP address will be blocked temporarily for that value in seconds.
  887. # For example:
  888. # LF_TRIGGER_PERM = "1" => the IP is blocked permanently
  889. # LF_TRIGGER_PERM = "3600" => the IP is blocked temporarily for 1 hour
  890. #
  891. # If LF_TRIGGER is "0", then the application LF_[application]_PERM value works
  892. # in the same way as above and LF_TRIGGER_PERM serves no function
  893. LF_TRIGGER_PERM = "1"
  894.  
  895. # To only block access to the failed application instead of a complete block
  896. # for an ip address, you can set the following to "1", but LF_TRIGGER must be
  897. # set to "0" with specific application[*] trigger levels also set appropriately
  898. #
  899. # The ports that are blocked can be configured by changing the PORTS_* options
  900. LF_SELECT = "0"
  901.  
  902. # Send an email alert if an IP address is blocked by one of the [*] triggers
  903. LF_EMAIL_ALERT = "1"
  904.  
  905. # [*]Enable login failure detection of sshd connections
  906. #
  907. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  908. # this file about RESTRICT_SYSLOG before enabling this option:
  909. LF_SSHD = "5"
  910. LF_SSHD_PERM = "1"
  911.  
  912. # [*]Enable login failure detection of ftp connections
  913. #
  914. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  915. # this file about RESTRICT_SYSLOG before enabling this option:
  916. LF_FTPD = "10"
  917. LF_FTPD_PERM = "1"
  918.  
  919. # [*]Enable login failure detection of SMTP AUTH connections
  920. LF_SMTPAUTH = "5"
  921. LF_SMTPAUTH_PERM = "1"
  922.  
  923. # [*]Enable syntax failure detection of Exim connections
  924. LF_EXIMSYNTAX = "10"
  925. LF_EXIMSYNTAX_PERM = "1"
  926.  
  927. # [*]Enable login failure detection of pop3 connections
  928. #
  929. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  930. # this file about RESTRICT_SYSLOG before enabling this option:
  931. LF_POP3D = "10"
  932. LF_POP3D_PERM = "1"
  933.  
  934. # [*]Enable login failure detection of imap connections
  935. #
  936. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  937. # this file about RESTRICT_SYSLOG before enabling this option:
  938. LF_IMAPD = "10"
  939. LF_IMAPD_PERM = "1"
  940.  
  941. # [*]Enable login failure detection of Apache .htpasswd connections
  942. # Due to the often high logging rate in the Apache error log, you might want to
  943. # enable this option only if you know you are suffering from attacks against
  944. # password protected directories
  945. LF_HTACCESS = "5"
  946. LF_HTACCESS_PERM = "1"
  947.  
  948. # [*]Enable login failure detection of cpanel, webmail and whm connections
  949. LF_CPANEL = "5"
  950. LF_CPANEL_PERM = "1"
  951.  
  952. # [*]Enable failure detection of repeated Apache mod_security rule triggers
  953. LF_MODSEC = "5"
  954. LF_MODSEC_PERM = "1"
  955.  
  956. # [*]Enable detection of repeated BIND denied requests
  957. # This option should be enabled with care as it will prevent blocked IPs from
  958. # resolving any domains on the server. You might want to set the trigger value
  959. # reasonably high to avoid this
  960. # Example: LF_BIND = "100"
  961. LF_BIND = "0"
  962. LF_BIND_PERM = "1"
  963.  
  964. # [*]Enable detection of repeated suhosin ALERTs
  965. # Example: LF_SUHOSIN = "5"
  966. #
  967. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  968. # this file about RESTRICT_SYSLOG before enabling this option:
  969. LF_SUHOSIN = "0"
  970. LF_SUHOSIN_PERM = "1"
  971.  
  972. # [*]Enable detection of repeated cxs ModSecurity mod_security rule triggers
  973. # This option will block IP addresses if cxs detects a hits from the
  974. # ModSecurity rule associated with it
  975. #
  976. # Note: This option takes precedence over LF_MODSEC and removes any hits
  977. # counted towards LF_MODSEC for the cxs rule
  978. #
  979. # This setting should probably set very low, perhaps to 1, if you want to
  980. # effectively block IP addresses for this trigger option
  981. LF_CXS = "0"
  982. LF_CXS_PERM = "1"
  983.  
  984. # [*]Enable detection of repeated Apache mod_qos rule triggers
  985. LF_QOS = "0"
  986. LF_QOS_PERM = "1"
  987.  
  988. # [*]Enable detection of repeated Apache symlink race condition triggers from
  989. # the Apache patch provided by:
  990. # http://www.mail-archive.com/dev@httpd.apache.org/msg55666.html
  991. # This patch has also been included by cPanel via the easyapache option:
  992. # "Symlink Race Condition Protection"
  993. LF_SYMLINK = "0"
  994. LF_SYMLINK_PERM = "1"
  995.  
  996. # [*]Enable login failure detection of webmin connections
  997. #
  998. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  999. # this file about RESTRICT_SYSLOG before enabling this option:
  1000. LF_WEBMIN = "0"
  1001. LF_WEBMIN_PERM = "1"
  1002.  
  1003. # Send an email alert if anyone logs in successfully using SSH
  1004. #
  1005. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1006. # this file about RESTRICT_SYSLOG before enabling this option:
  1007. LF_SSH_EMAIL_ALERT = "1"
  1008.  
  1009. # Send an email alert if anyone uses su to access another account. This will
  1010. # send an email alert whether the attempt to use su was successful or not
  1011. #
  1012. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1013. # this file about RESTRICT_SYSLOG before enabling this option:
  1014. LF_SU_EMAIL_ALERT = "1"
  1015.  
  1016. # Send an email alert if anyone accesses webmin
  1017. #
  1018. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1019. # this file about RESTRICT_SYSLOG before enabling this option:
  1020. LF_WEBMIN_EMAIL_ALERT = "0"
  1021.  
  1022. # Send an email alert if anyone logs in successfully to root on the console
  1023. #
  1024. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1025. # this file about RESTRICT_SYSLOG before enabling this option:
  1026. LF_CONSOLE_EMAIL_ALERT = "0"
  1027.  
  1028. # This option will keep track of the number of "File does not exist" errors in
  1029. # HTACCESS_LOG. If the number of hits is more than LF_APACHE_404 in LF_INTERVAL
  1030. # seconds then the IP address will be blocked
  1031. #
  1032. # Care should be used with this option as it could generate many
  1033. # false-positives, especially Search Bots (use csf.rignore to ignore such bots)
  1034. # so only use this option if you know you are under this type of attack
  1035. #
  1036. # A sensible setting for this would be quite high, perhaps 200
  1037. #
  1038. # To disable set to "0"
  1039. LF_APACHE_404 = "0"
  1040.  
  1041. # If this option is set to 1 the blocks will be permanent
  1042. # If this option is > 1, the blocks will be temporary for the specified number
  1043. # of seconds
  1044. LF_APACHE_404_PERM = "3600"
  1045.  
  1046. # This option will keep track of the number of "client denied by server
  1047. # configuration" errors in HTACCESS_LOG. If the number of hits is more than
  1048. # LF_APACHE_403 in LF_INTERVAL seconds then the IP address will be blocked
  1049. #
  1050. # Care should be used with this option as it could generate many
  1051. # false-positives, especially Search Bots (use csf.rignore to ignore such bots)
  1052. # so only use this option if you know you are under this type of attack
  1053. #
  1054. # To disable set to "0"
  1055. LF_APACHE_403 = "0"
  1056.  
  1057. # If this option is set to 1 the blocks will be permanent
  1058. # If this option is > 1, the blocks will be temporary for the specified number
  1059. # of seconds
  1060. LF_APACHE_403_PERM = "3600"
  1061.  
  1062. # Send an email alert if anyone accesses WHM/cPanel via an account listed in
  1063. # LF_CPANEL_ALERT_USERS. An IP address will be reported again 1 hour after the
  1064. # last tracked access (or if lfd is restarted)
  1065. LF_CPANEL_ALERT = "1"
  1066.  
  1067. # If a LF_CPANEL_ALERT event is triggered, then if the following contains the
  1068. # path to a script, it will run the script and passed the ip and username and
  1069. # the DNS IP lookup result as 3 arguments
  1070. #
  1071. # The action script must have the execute bit and interpreter (shebang) set
  1072. LF_CPANEL_ALERT_ACTION = ""
  1073.  
  1074. # This is a comma separated list of accounts to send alerts for. To send an
  1075. # alert for all accounts set this to "all"
  1076. LF_CPANEL_ALERT_USERS = "root"
  1077.  
  1078. # This settings re-enables the cPanel Bandwith chains after iptables is
  1079. # configured. If bandmin is not functioning, or you don't use the bandmin stats
  1080. # you can disable this option
  1081. LF_CPANEL_BANDMIN = "1"
  1082.  
  1083. # Enable scanning of the exim mainlog for repeated emails sent from scripts.
  1084. # To use this feature the exim log_selector option must at least be set to:
  1085. #
  1086. # log_selector = +arguments +subject +received_recipients
  1087. #
  1088. # If you already use extended exim logging, then you need to either include
  1089. # +arguments +received_recipients or use +all
  1090. #
  1091. # This setting will then send an alert email if more than LF_SCRIPT_LIMIT lines
  1092. # appear with the same cwd= path in them within an hour. This can be useful in
  1093. # identifying spamming scripts on a server, especially PHP scripts running
  1094. # under the nobody account. The email that is sent includes the exim log lines
  1095. # and also attempts to find scripts that send email in the path that may be the
  1096. # culprit
  1097. LF_SCRIPT_ALERT = "0"
  1098.  
  1099. # The limit afterwhich the email alert for email scripts is sent. Care should
  1100. # be taken with this value if you allow clients to use web scripts to maintain
  1101. # pseudo-mailing lists which have large recipients
  1102. LF_SCRIPT_LIMIT = "100"
  1103.  
  1104. # If an LF_SCRIPT_ALERT event is triggered, then if the following can contain
  1105. # the path to a script, it will be run in a child process and passed the
  1106. # following information as parameters which also appears in the email alert:
  1107. # Path to the directory containing the script that is sending the email
  1108. # Count of emails sent
  1109. # Sample of the first 10 emails
  1110. # List of possible email scripts within Path
  1111. #
  1112. # The action script must have the execute bit and interpreter (shebang) set
  1113. LF_SCRIPT_ACTION = ""
  1114.  
  1115. # If this option is enabled, the directory identified by LF_SCRIPT_ALERT will
  1116. # be chmod 0 and chattr +i to prevent it being accessed. Set the option to 1
  1117. # to enable.
  1118. #
  1119. # WARNING: This option could cause serious system problems if the identified
  1120. # directory is within the OS directory hierarchy. For this reason we do not
  1121. # recommend enabling it unless absolutely necessary.
  1122. LF_SCRIPT_PERM = "0"
  1123.  
  1124. # Checks the length of the exim queue and sends an alert email if the value of
  1125. # settings is exceeded. If the ConfigServer MailScanner configuration is used
  1126. # then both the pending and delivery queues will be checked.
  1127. #
  1128. # Note: If there are problems sending out email, this alert may not be received
  1129. # To disable set to "0"
  1130. LF_QUEUE_ALERT = "2000"
  1131.  
  1132. # The interval between mail queue checks in seconds. This should not be set too
  1133. # low on servers that often have long queues as the exim binary can use
  1134. # significant resources when checking its queue length
  1135. LF_QUEUE_INTERVAL = "300"
  1136.  
  1137. # System Exploit Checking. This option is designed to perform a series of tests
  1138. # to send an alert in case a possible server compromise is detected
  1139. #
  1140. # To enable this feature set the following to the checking interval in seconds
  1141. # (a value of 300 would seem sensible).
  1142. #
  1143. # To disable set to "0"
  1144. LF_EXPLOIT = "300"
  1145.  
  1146. # This comma separated list allows you to ignore tests LF_EXPLOIT performs
  1147. #
  1148. # For the SUPERUSER check, you can list usernames in csf.suignore to have them
  1149. # ignored for that test
  1150. #
  1151. # Valid tests are:
  1152. # SUPERUSER,SSHDSPAM
  1153. #
  1154. # If you want to ignore a test add it to this as a comma separated list, e.g.
  1155. # "SUPERUSER,SSHDSPAM"
  1156. LF_EXPLOIT_IGNORE = ""
  1157.  
  1158. # Set the time interval to track login and other LF_ failures within (seconds),
  1159. # i.e. LF_TRIGGER failures within the last LF_INTERVAL seconds
  1160. LF_INTERVAL = "3600"
  1161.  
  1162. # This is how long the lfd process sleeps (in seconds) before processing the
  1163. # log file entries and checking whether other events need to be triggered
  1164. LF_PARSE = "5"
  1165.  
  1166. # This is the interval that is used to flush reports of usernames, files and
  1167. # pids so that persistent problems continue to be reported, in seconds.
  1168. # A value of 3600 seems sensible
  1169. LF_FLUSH = "3600"
  1170.  
  1171. # Under some circumstances iptables can fail to include a rule instruction,
  1172. # especially if more than one request is made concurrently. In this event, a
  1173. # permanent block entry may exist in csf.deny, but not in iptables.
  1174. #
  1175. # This option instructs csf to deny an already blocked IP address the number
  1176. # of times set. The downside, is that there will be multiple entries for an IP
  1177. # address in csf.deny and possibly multiple rules for the same IP address in
  1178. # iptables. This needs to be taken into consideration when unblocking such IP
  1179. # addresses.
  1180. #
  1181. # Set to "0" to disable this feature. Do not set this too high for the reasons
  1182. # detailed above (e.g. "5" should be more than enough)
  1183. LF_REPEATBLOCK = "0"
  1184.  
  1185. # By default csf will create both an inbound and outbound blocks from/to an IP
  1186. # unless otherwise specified in csf.deny and GLOBAL_DENY. This is the most
  1187. # effective way to block IP traffic. This option instructs csf to only block
  1188. # inbound traffic from those IP's and so reduces the number of iptables rules,
  1189. # but at the expense of less effectiveness. For this reason we recommend
  1190. # leaving this option disabled
  1191. #
  1192. # Set to "0" to disable this feature - the default
  1193. LF_BLOCKINONLY = "0"
  1194.  
  1195. ###############################################################################
  1196. # SECTION:Directory Watching & Integrity
  1197. ###############################################################################
  1198. # Enable Directory Watching. This enables lfd to check /tmp and /dev/shm
  1199. # directories for suspicious files, i.e. script exploits. If a suspicious
  1200. # file is found an email alert is sent. One alert per file per LF_FLUSH
  1201. # interval is sent
  1202. #
  1203. # To enable this feature set the following to the checking interval in seconds.
  1204. # To disable set to "0"
  1205. LF_DIRWATCH = "300"
  1206.  
  1207. # To remove any suspicious files found during directory watching, enable the
  1208. # following. These files will be appended to a tarball in
  1209. # /var/lib/suspicious.tar
  1210. LF_DIRWATCH_DISABLE = "0"
  1211.  
  1212. # This option allows you to have lfd watch a particular file or directory for
  1213. # changes and should they change and email alert using watchalert.txt is sent
  1214. #
  1215. # To enable this feature set the following to the checking interval in seconds
  1216. # (a value of 60 would seem sensible) and add your entries to csf.dirwatch
  1217. #
  1218. # Set to disable set to "0"
  1219. LF_DIRWATCH_FILE = "0"
  1220.  
  1221. # System Integrity Checking. This enables lfd to compare md5sums of the
  1222. # servers OS binary application files from the time when lfd starts. If the
  1223. # md5sum of a monitored file changes an alert is sent. This option is intended
  1224. # as an IDS (Intrusion Detection System) and is the last line of detection for
  1225. # a possible root compromise.
  1226. #
  1227. # There will be constant false-positives as the servers OS is updated or
  1228. # monitored application binaries are updated. However, unexpected changes
  1229. # should be carefully inspected.
  1230. #
  1231. # Modified files will only be reported via email once.
  1232. #
  1233. # To enable this feature set the following to the checking interval in seconds
  1234. # (a value of 3600 would seem sensible). This option may increase server I/O
  1235. # load onto the server as it checks system binaries.
  1236. #
  1237. # To disable set to "0"
  1238. LF_INTEGRITY = "3600"
  1239.  
  1240. ###############################################################################
  1241. # SECTION:Distributed Attacks
  1242. ###############################################################################
  1243. # Distributed Account Attack. This option will keep track of login failures
  1244. # from distributed IP addresses to a specific application account. If the
  1245. # number of failures matches the trigger value above, ALL of the IP addresses
  1246. # involved in the attack will be blocked according to the temp/perm rules above
  1247. #
  1248. # Tracking applies to LF_SSHD, LF_FTPD, LF_SMTPAUTH, LF_POP3D, LF_IMAPD,
  1249. # LF_HTACCESS
  1250. #
  1251. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1252. # this file about RESTRICT_SYSLOG before enabling this option:
  1253. LF_DISTATTACK = "0"
  1254.  
  1255. # Set the following to the minimum number of unique IP addresses that trigger
  1256. # LF_DISTATTACK
  1257. LF_DISTATTACK_UNIQ = "2"
  1258.  
  1259. # Distributed FTP Logins. This option will keep track of successful FTP logins.
  1260. # If the number of successful logins to an individual account is at least
  1261. # LF_DISTFTP in LF_DIST_INTERVAL from at least LF_DISTFTP_UNIQ IP addresses,
  1262. # then all of the IP addresses will be blocked
  1263. #
  1264. # This option can help mitigate the common FTP account compromise attacks that
  1265. # use a distributed network of zombies to deface websites
  1266. #
  1267. # A sensible setting for this might be 5, depending on how many different
  1268. # IP addresses you expect to an individual FTP account within LF_DIST_INTERVAL
  1269. #
  1270. # To disable set to "0"
  1271. #
  1272. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1273. # this file about RESTRICT_SYSLOG before enabling this option:
  1274. LF_DISTFTP = "1"
  1275.  
  1276. # Set the following to the minimum number of unique IP addresses that trigger
  1277. # LF_DISTFTP. LF_DISTFTP_UNIQ must be <= LF_DISTFTP for this to work
  1278. LF_DISTFTP_UNIQ = "3"
  1279.  
  1280. # If this option is set to 1 the blocks will be permanent
  1281. # If this option is > 1, the blocks will be temporary for the specified number
  1282. # of seconds
  1283. LF_DISTFTP_PERM = "1"
  1284.  
  1285. # Send an email alert if LF_DISTFTP is triggered
  1286. LF_DISTFTP_ALERT = "1"
  1287.  
  1288. # Distributed SMTP Logins. This option will keep track of successful SMTP
  1289. # logins. If the number of successful logins to an individual account is at
  1290. # least LF_DISTSMTP in LF_DIST_INTERVAL from at least LF_DISTSMTP_UNIQ IP
  1291. # addresses, then all of the IP addresses will be blocked. These options only
  1292. # apply to the exim MTA
  1293. #
  1294. # This option can help mitigate the common SMTP account compromise attacks that
  1295. # use a distributed network of zombies to send spam
  1296. #
  1297. # A sensible setting for this might be 5, depending on how many different
  1298. # IP addresses you expect to an individual SMTP account within LF_DIST_INTERVAL
  1299. #
  1300. # To disable set to "0"
  1301. LF_DISTSMTP = "1"
  1302.  
  1303. # Set the following to the minimum number of unique IP addresses that trigger
  1304. # LF_DISTSMTP. LF_DISTSMTP_UNIQ must be <= LF_DISTSMTP for this to work
  1305. LF_DISTSMTP_UNIQ = "4"
  1306.  
  1307. # If this option is set to 1 the blocks will be permanent
  1308. # If this option is > 1, the blocks will be temporary for the specified number
  1309. # of seconds
  1310. LF_DISTSMTP_PERM = "1"
  1311.  
  1312. # Send an email alert if LF_DISTSMTP is triggered
  1313. LF_DISTSMTP_ALERT = "1"
  1314.  
  1315. # This is the interval during which a distributed FTP or SMTP attack is
  1316. # measured
  1317. LF_DIST_INTERVAL = "300"
  1318.  
  1319. # If LF_DISTFTP or LF_DISTSMTP is triggered, then if the following contains the
  1320. # path to a script, it will run the script and pass the following as arguments:
  1321. #
  1322. # LF_DISTFTP/LF_DISTSMTP
  1323. # account name
  1324. # log file text
  1325. #
  1326. # The action script must have the execute bit and interpreter (shebang) set
  1327. LF_DIST_ACTION = ""
  1328.  
  1329. ###############################################################################
  1330. # SECTION:Login Tracking
  1331. ###############################################################################
  1332. # Block POP3 logins if greater than LT_POP3D times per hour per account per IP
  1333. # address (0=disabled)
  1334. #
  1335. # This is a temporary block for the rest of the hour, afterwhich the IP is
  1336. # unblocked
  1337. #
  1338. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1339. # this file about RESTRICT_SYSLOG before enabling this option:
  1340. LT_POP3D = "0"
  1341.  
  1342. # Block IMAP logins if greater than LT_IMAPD times per hour per account per IP
  1343. # address (0=disabled) - not recommended for IMAP logins due to the ethos
  1344. # within which IMAP works. If you want to use this, setting it quite high is
  1345. # probably a good idea
  1346. #
  1347. # This is a temporary block for the rest of the hour, afterwhich the IP is
  1348. # unblocked
  1349. #
  1350. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1351. # this file about RESTRICT_SYSLOG before enabling this option:
  1352. LT_IMAPD = "0"
  1353.  
  1354. # Send an email alert if an account exceeds LT_POP3D/LT_IMAPD logins per hour
  1355. # per IP
  1356. LT_EMAIL_ALERT = "1"
  1357.  
  1358. # If LF_PERMBLOCK is enabled but you do not want this to apply to
  1359. # LT_POP3D/LT_IMAPD, then enable this option
  1360. LT_SKIPPERMBLOCK = "0"
  1361.  
  1362. ###############################################################################
  1363. # SECTION:Relay Tracking
  1364. ###############################################################################
  1365. # Relay Tracking. This allows you to track email that is relayed through the
  1366. # server. There are also options to send alerts and block external IP addresses
  1367. # if the number of emails relayed per hour exceeds configured limits. The
  1368. # blocks can be either permanent or temporary.
  1369. #
  1370. # The following information applies to each of the following types of relay
  1371. # check:
  1372. # RT_[relay type]_ALERT: 0 = disable, 1 = enable
  1373. # RT_[relay type]_LIMIT: the limit/hour afterwhich an email alert will be sent
  1374. # RT_[relay type]_BLOCK: 0 = no block;1 = perm block;nn=temp block for nn secs
  1375.  
  1376. # This option triggers for external email
  1377. RT_RELAY_ALERT = "1"
  1378. RT_RELAY_LIMIT = "100"
  1379. RT_RELAY_BLOCK = "0"
  1380.  
  1381. # This option triggers for email authenticated by SMTP AUTH
  1382. RT_AUTHRELAY_ALERT = "1"
  1383. RT_AUTHRELAY_LIMIT = "100"
  1384. RT_AUTHRELAY_BLOCK = "0"
  1385.  
  1386. # This option triggers for email authenticated by POP before SMTP
  1387. RT_POPRELAY_ALERT = "1"
  1388. RT_POPRELAY_LIMIT = "100"
  1389. RT_POPRELAY_BLOCK = "0"
  1390.  
  1391. # This option triggers for email sent via /usr/sbin/sendmail or /usr/sbin/exim
  1392. RT_LOCALRELAY_ALERT = "1"
  1393. RT_LOCALRELAY_LIMIT = "100"
  1394.  
  1395. # This option triggers for email sent via a local IP addresses
  1396. RT_LOCALHOSTRELAY_ALERT = "1"
  1397. RT_LOCALHOSTRELAY_LIMIT = "100"
  1398.  
  1399. # If an RT_* event is triggered, then if the following contains the path to
  1400. # a script, it will be run in a child process and passed the following:
  1401. # information as parameters which also appears in the email alert:
  1402. # IP Address
  1403. # Relay Type (RELAY/AUTHRELAY/POPRELAY/LOCALRELAY/LOCALHOSTRELAY)
  1404. # Block Message (Temporary/Permanent Block)
  1405. # Count of emails relayed
  1406. # Sample of the first 10 emails
  1407. #
  1408. # The action script must have the execute bit and interpreter (shebang) set
  1409. RT_ACTION = ""
  1410.  
  1411. ###############################################################################
  1412. # SECTION:Connection Tracking
  1413. ###############################################################################
  1414. # Connection Tracking. This option enables tracking of all connections from IP
  1415. # addresses to the server. If the total number of connections is greater than
  1416. # this value then the offending IP address is blocked. This can be used to help
  1417. # prevent some types of DOS attack.
  1418. #
  1419. # Care should be taken with this option. It's entirely possible that you will
  1420. # see false-positives. Some protocols can be connection hungry, e.g. FTP, IMAPD
  1421. # and HTTP so it could be quite easy to trigger, especially with a lot of
  1422. # closed connections in TIME_WAIT. However, for a server that is prone to DOS
  1423. # attacks this may be very useful. A reasonable setting for this option might
  1424. # be around 300.
  1425. #
  1426. # To disable this feature, set this to 0
  1427. CT_LIMIT = "100"
  1428.  
  1429. # Connection Tracking interval. Set this to the the number of seconds between
  1430. # connection tracking scans
  1431. CT_INTERVAL = "30"
  1432.  
  1433. # Send an email alert if an IP address is blocked due to connection tracking
  1434. CT_EMAIL_ALERT = "1"
  1435.  
  1436. # If you want to make IP blocks permanent then set this to 1, otherwise blocks
  1437. # will be temporary and will be cleared after CT_BLOCK_TIME seconds
  1438. CT_PERMANENT = "1"
  1439.  
  1440. # If you opt for temporary IP blocks for CT, then the following is the interval
  1441. # in seconds that the IP will remained blocked for (e.g. 1800 = 30 mins)
  1442. CT_BLOCK_TIME = "1800"
  1443.  
  1444. # If you don't want to count the TIME_WAIT state against the connection count
  1445. # then set the following to "1"
  1446. CT_SKIP_TIME_WAIT = "0"
  1447.  
  1448. # If you only want to count specific states (e.g. SYN_RECV) then add the states
  1449. # to the following as a comma separated list. E.g. "SYN_RECV,TIME_WAIT"
  1450. #
  1451. # Leave this option empty to count all states against CT_LIMIT
  1452. CT_STATES = ""
  1453.  
  1454. # If you only want to count specific ports (e.g. 80,443) then add the ports
  1455. # to the following as a comma separated list. E.g. "80,443"
  1456. #
  1457. # Leave this option empty to count all ports against CT_LIMIT
  1458. CT_PORTS = "80,443,23,21,22,4082,4083,4084,4085"
  1459.  
  1460. ###############################################################################
  1461. # SECTION:Process Tracking
  1462. ###############################################################################
  1463. # Process Tracking. This option enables tracking of user and nobody processes
  1464. # and examines them for suspicious executables or open network ports. Its
  1465. # purpose is to identify potential exploit processes that are running on the
  1466. # server, even if they are obfuscated to appear as system services. If a
  1467. # suspicious process is found an alert email is sent with relevant information.
  1468. # It is then the responsibility of the recipient to investigate the process
  1469. # further as the script takes no further action
  1470. #
  1471. # The following is the number of seconds a process has to be active before it
  1472. # is inspected. If you set this time too low, then you will likely trigger
  1473. # false-positives with CGI or PHP scripts.
  1474. # Set the value to 0 to disable this feature
  1475. PT_LIMIT = "60"
  1476.  
  1477. # How frequently processes are checked in seconds
  1478. PT_INTERVAL = "60"
  1479.  
  1480. # If you want process tracking to highlight php or perl scripts that are run
  1481. # through apache then disable the following,
  1482. # i.e. set it to 0
  1483. #
  1484. # While enabling this setting will reduce false-positives, having it set to 0
  1485. # does provide better checking for exploits running on the server
  1486. PT_SKIP_HTTP = "0"
  1487.  
  1488. # If you want to track all linux accounts on a cPanel server, not just users
  1489. # that are part of cPanel, then enable this option. This is recommended to
  1490. # improve security from compromised accounts
  1491. #
  1492. # Set to 0 to disable the feature, 1 to enable it
  1493. PT_ALL_USERS = "0"
  1494.  
  1495. # lfd will report processes, even if they're listed in csf.pignore, if they're
  1496. # tagged as (deleted) by Linux. This information is provided in Linux under
  1497. # /proc/PID/exe. A (deleted) process is one that is running a binary that has
  1498. # the inode for the file removed from the file system directory. This usually
  1499. # happens when the binary has been replaced due to an upgrade for it by the OS
  1500. # vendor or another third party (e.g. cPanel). You need to investigate whether
  1501. # this is indeed the case to be sure that the original binary has not been
  1502. # replaced by a rootkit or is running an exploit.
  1503. #
  1504. # Note: If a deleted executable process is detected and reported then lfd will
  1505. # not report children of the parent (or the parent itself if a child triggered
  1506. # the report) if the parent is also a deleted executable process
  1507. #
  1508. # To stop lfd reporting such process you need to restart the daemon to which it
  1509. # belongs and therefore run the process using the replacement binary (presuming
  1510. # one exists). This will normally mean running the associated startup script in
  1511. # /etc/init.d/
  1512. #
  1513. # If you do want lfd to report deleted binary processes, set to 1
  1514. PT_DELETED = "0"
  1515.  
  1516. # If a PT_DELETED event is triggered, then if the following contains the path to
  1517. # a script, it will be run in a child process and passed the executable, pid,
  1518. # account for the process, and parent pid
  1519. #
  1520. # The action script must have the execute bit and interpreter (shebang) set. An
  1521. # example is provided in /usr/local/csf/bin/pt_deleted_action.pl
  1522. #
  1523. # WARNING: Make sure you read and understand the potential security
  1524. # implications of such processes in PT_DELETED above before simply restarting
  1525. # such processes with a script
  1526. PT_DELETED_ACTION = ""
  1527.  
  1528. # User Process Tracking. This option enables the tracking of the number of
  1529. # process any given account is running at one time. If the number of processes
  1530. # exceeds the value of the following setting an email alert is sent with
  1531. # details of those processes. If you specify a user in csf.pignore it will be
  1532. # ignored
  1533. #
  1534. # Set to 0 to disable this feature
  1535. PT_USERPROC = "10"
  1536.  
  1537. # This User Process Tracking option sends an alert if any cPanel user process
  1538. # exceeds the memory usage set (MB). To ignore specific processes or users use
  1539. # csf.pignore
  1540. #
  1541. # Set to 0 to disable this feature
  1542. PT_USERMEM = "200"
  1543.  
  1544. # This User Process Tracking option sends an alert if any cPanel user process
  1545. # exceeds the time usage set (seconds). To ignore specific processes or users
  1546. # use csf.pignore
  1547. #
  1548. # Set to 0 to disable this feature
  1549. PT_USERTIME = "1800"
  1550.  
  1551. # If this option is set then processes detected by PT_USERMEM, PT_USERTIME or
  1552. # PT_USERPROC are killed
  1553. #
  1554. # Warning: We don't recommend enabling this option unless absolutely necessary
  1555. # as it can cause unexpected problems when processes are suddenly terminated.
  1556. # It can also lead to system processes being terminated which could cause
  1557. # stability issues. It is much better to leave this option disabled and to
  1558. # investigate each case as it is reported when the triggers above are breached
  1559. #
  1560. # Note: Processes that are running deleted excecutables (see PT_DELETED) will
  1561. # not be killed by lfd
  1562. PT_USERKILL = "0"
  1563.  
  1564. # If you want to disable email alerts if PT_USERKILL is triggered, then set
  1565. # this option to 0
  1566. PT_USERKILL_ALERT = "1"
  1567.  
  1568. # If a PT_* event is triggered, then if the following contains the path to
  1569. # a script, it will be run in a child process and passed the PID(s) of the
  1570. # process(es) in a comma separated list.
  1571. #
  1572. # The action script must have the execute bit and interpreter (shebang) set
  1573. PT_USER_ACTION = ""
  1574.  
  1575. # Check the PT_LOAD_AVG minute Load Average (can be set to 1 5 or 15 and
  1576. # defaults to 5 if set otherwise) on the server every PT_LOAD seconds. If the
  1577. # load average is greater than or equal to PT_LOAD_LEVEL then an email alert is
  1578. # sent. lfd then does not report subsequent high load until PT_LOAD_SKIP
  1579. # seconds has passed to prevent email floods.
  1580. #
  1581. # Set PT_LOAD to "0" to disable this feature
  1582. PT_LOAD = "30"
  1583. PT_LOAD_AVG = "5"
  1584. PT_LOAD_LEVEL = "6"
  1585. PT_LOAD_SKIP = "3600"
  1586.  
  1587. # This is the Apache Server Status URL used in the email alert. Requires the
  1588. # Apache mod_status module to be installed and configured correctly
  1589. PT_APACHESTATUS = "http://127.0.0.1/whm-server-status"
  1590.  
  1591. # If a PT_LOAD event is triggered, then if the following contains the path to
  1592. # a script, it will be run in a child process. For example, the script could
  1593. # contain commands to terminate and restart httpd, php, exim, etc incase of
  1594. # looping processes. The action script must have the execute bit an
  1595. # interpreter (shebang) set
  1596. PT_LOAD_ACTION = ""
  1597.  
  1598. # Fork Bomb Protection. This option checks the number of processes with the
  1599. # same session id and if greater than the value set, the whole session tree is
  1600. # terminated and an alert sent
  1601. #
  1602. # You can see an example of common session id processes on most Linux systems
  1603. # using: "ps axf -O sid"
  1604. #
  1605. # On cPanel servers, PT_ALL_USERS should be enabled to use this option
  1606. # effectively
  1607. #
  1608. # This option will check root owned processes. Session id 0 and 1 will always
  1609. # be ignored as they represent kernel and init processes. csf.pignore will be
  1610. # honoured, but bear in mind that a session tree can contain a variety of users
  1611. # and executables
  1612. #
  1613. # Care needs to be taken to ensure that this option only detects runaway fork
  1614. # bombs, so should be set higher than any session tree is likely to get (e.g.
  1615. # httpd could have 100s of legitimate children on very busy systems). A
  1616. # sensible starting point on most servers might be 250
  1617. PT_FORKBOMB = "0"
  1618.  
  1619. ###############################################################################
  1620. # SECTION:Port Scan Tracking
  1621. ###############################################################################
  1622. # Port Scan Tracking. This feature tracks port blocks logged by iptables to
  1623. # syslog. If an IP address generates a port block that is logged more than
  1624. # PS_LIMIT within PS_INTERVAL seconds, the IP address will be blocked.
  1625. #
  1626. # This feature could, for example, be useful for blocking hackers attempting
  1627. # to access the standard SSH port if you have moved it to a port other than 22
  1628. # and have removed 22 from the TCP_IN list so that connection attempts to the
  1629. # old port are being logged
  1630. #
  1631. # This feature blocks all iptables blocks from the iptables logs, including
  1632. # repeated attempts to one port or SYN flood blocks, etc
  1633. #
  1634. # Note: This feature will only track iptables blocks from the log file set in
  1635. # IPTABLES_LOG below and if you have DROP_LOGGING enabled. However, it will
  1636. # cause redundant blocking with DROP_IP_LOGGING enabled
  1637. #
  1638. # Warning: It's possible that an elaborate DDOS (i.e. from multiple IP's)
  1639. # could very quickly fill the iptables rule chains and cause a DOS in itself.
  1640. # The DENY_IP_LIMIT should help to mitigate such problems with permanent blocks
  1641. # and the DENY_TEMP_IP_LIMIT with temporary blocks
  1642. #
  1643. # Set PS_INTERVAL to "0" to disable this feature. A value of between 60 and 300
  1644. # would be sensible to enable this feature
  1645. #
  1646. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1647. # this file about RESTRICT_SYSLOG before enabling this option:
  1648. PS_INTERVAL = "0"
  1649. PS_LIMIT = "10"
  1650.  
  1651. # You can specify the ports and/or port ranges that should be tracked by the
  1652. # Port Scan Tracking feature. The following setting is a comma separated list
  1653. # of those ports and uses the same format as TCP_IN. The default setting of
  1654. # 0:65535,ICMP,INVALID,OPEN covers all ports
  1655. #
  1656. # Special values are:
  1657. # ICMP - include ICMP blocks (see ICMP_*)
  1658. # INVALID - include INVALID blocks (see PACKET_FILTER)
  1659. # OPEN - include TCP_IN and UDP_IN open port blocks - *[proto]_IN Blocked*
  1660. PS_PORTS = "0:65535,ICMP"
  1661.  
  1662. # To specify how many different ports qualifies as a Port Scan you can increase
  1663. # the following from the default value of 1. The risk in doing so will mean
  1664. # that persistent attempts to attack a specific closed port will not be
  1665. # detected and blocked
  1666. PS_DIVERSITY = "1"
  1667.  
  1668. # You can select whether IP blocks for Port Scan Tracking should be temporary
  1669. # or permanent. Set PS_PERMANENT to "0" for temporary and "1" for permanent
  1670. # blocking. If set to "0" PS_BLOCK_TIME is the amount of time in seconds to
  1671. # temporarily block the IP address for
  1672. PS_PERMANENT = "0"
  1673. PS_BLOCK_TIME = "3600"
  1674.  
  1675. # Set the following to "1" to enable Port Scan Tracking email alerts, set to
  1676. # "0" to disable them
  1677. PS_EMAIL_ALERT = "1"
  1678.  
  1679. ###############################################################################
  1680. # SECTION:User ID Tracking
  1681. ###############################################################################
  1682. # User ID Tracking. This feature tracks UID blocks logged by iptables to
  1683. # syslog. If a UID generates a port block that is logged more than UID_LIMIT
  1684. # times within UID_INTERVAL seconds, an alert will be sent
  1685. #
  1686. # Note: This feature will only track iptables blocks from the log file set in
  1687. # IPTABLES_LOG and if DROP_OUT_LOGGING and DROP_UID_LOGGING are enabled.
  1688. #
  1689. # To ignore specific UIDs list them in csf.uidignore and then restart lfd
  1690. #
  1691. # Set UID_INTERVAL to "0" to disable this feature. A value of between 60 and 300
  1692. # would be sensible to enable this feature
  1693. #
  1694. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1695. # this file about RESTRICT_SYSLOG before enabling this option:
  1696. UID_INTERVAL = "0"
  1697. UID_LIMIT = "10"
  1698.  
  1699. # You can specify the ports and/or port ranges that should be tracked by the
  1700. # User ID Tracking feature. The following setting is a comma separated list
  1701. # of those ports and uses the same format as TCP_OUT. The default setting of
  1702. # 0:65535,ICMP covers all ports
  1703. UID_PORTS = "0:65535,ICMP"
  1704.  
  1705. ###############################################################################
  1706. # SECTION:Account Tracking
  1707. ###############################################################################
  1708. # Account Tracking. The following options enable the tracking of modifications
  1709. # to the accounts on a server. If any of the enabled options are triggered by
  1710. # a modifications to an account, an alert email is sent. Only the modification
  1711. # is reported. The cause of the modification will have to be investigated
  1712. # manually
  1713. #
  1714. # You can set AT_ALERT to the following:
  1715. # 0 = disable this feature
  1716. # 1 = enable this feature for all accounts
  1717. # 2 = enable this feature only for superuser accounts (UID = 0, e.g. root, etc)
  1718. # 3 = enable this feature only for the root account
  1719. AT_ALERT = "2"
  1720.  
  1721. # This options is the interval between checks in seconds
  1722. AT_INTERVAL = "60"
  1723.  
  1724. # Send alert if a new account is created
  1725. AT_NEW = "1"
  1726.  
  1727. # Send alert if an existing account is deleted
  1728. AT_OLD = "1"
  1729.  
  1730. # Send alert if an account password has changed
  1731. AT_PASSWD = "1"
  1732.  
  1733. # Send alert if an account uid has changed
  1734. AT_UID = "1"
  1735.  
  1736. # Send alert if an account gid has changed
  1737. AT_GID = "1"
  1738.  
  1739. # Send alert if an account login directory has changed
  1740. AT_DIR = "1"
  1741.  
  1742. # Send alert if an account login shell has changed
  1743. AT_SHELL = "1"
  1744.  
  1745. ###############################################################################
  1746. # SECTION:Integrated User Interface
  1747. ###############################################################################
  1748. # Integrated User Interface. This feature provides a HTML UI to csf and lfd,
  1749. # without requiring a control panel or web server. The UI runs as a sub process
  1750. # to the lfd daemon
  1751. #
  1752. # As it runs under the root account and successful login provides root access
  1753. # to the server, great care should be taken when configuring and using this
  1754. # feature. There are additional restrictions to enhance secure access to the UI
  1755. #
  1756. # See readme.txt for more information about using this feature BEFORE enabling
  1757. # it for security and access reasons
  1758. #
  1759. # 1 to enable, 0 to disable
  1760. UI = "0"
  1761.  
  1762. # Set this to the port that want to bind this service to. You should configure
  1763. # this port to be >1023 and different from any other port already being used
  1764. #
  1765. # Do NOT enable access to this port in TCP_IN, instead only allow trusted IP's
  1766. # to the port using Advanced Allow Filters (see readme.txt)
  1767. UI_PORT = "6666"
  1768.  
  1769. # This should be a secure, hard to guess username
  1770. #
  1771. # This must be changed from the default
  1772. UI_USER = "username"
  1773.  
  1774. # This should be a secure, hard to guess password. That is, at least 8
  1775. # characters long with a mixture of upper and lowercase characters plus
  1776. # numbers and non-alphanumeric characters
  1777. #
  1778. # This must be changed from the default
  1779. UI_PASS = "password"
  1780.  
  1781. # This is the login session timeout. If there is no activity for a logged in
  1782. # session within this number of seconds, the session will timeout and a new
  1783. # login will be required
  1784. #
  1785. # For security reasons, you should always keep this option low (i.e 60-300)
  1786. UI_TIMEOUT = "300"
  1787.  
  1788. # This is the maximum concurrent connections allowed to the server. The default
  1789. # value should be sufficient
  1790. UI_CHILDREN = "5"
  1791.  
  1792. # The number of login retries allowed within a 24 hour period. A successful
  1793. # login from the IP address will clear the failures
  1794. #
  1795. # For security reasons, you should always keep this option low (i.e 0-10)
  1796. UI_RETRY = "5"
  1797.  
  1798. # If enabled, this option will add the connecting IP address to the file
  1799. # /etc/csf/ui/ui.ban after UI_RETRY login failures. The IP address will not be
  1800. # able to login to the UI while it is listed in this file. The UI_BAN setting
  1801. # does not refer to any of the csf/lfd allow or ignore files, e.g. csf.allow,
  1802. # csf.ignore, etc.
  1803. #
  1804. # For security reasons, you should always enable this option
  1805. UI_BAN = "1"
  1806.  
  1807. # If enabled, only IPs (or CIDR's) listed in the file /etc/csf/ui/ui.allow will
  1808. # be allowed to login to the UI. The UI_ALLOW setting does not refer to any of
  1809. # the csf/lfd allow or ignore files, e.g. csf.allow, csf.ignore, etc.
  1810. #
  1811. # For security reasons, you should always enable this option and use ui.allow
  1812. UI_ALLOW = "1"
  1813.  
  1814. # If enabled, this option will trigger an iptables block through csf after
  1815. # UI_RETRY login failures
  1816. #
  1817. # 0 = no block;1 = perm block;nn=temp block for nn secs
  1818. UI_BLOCK = "1"
  1819.  
  1820. # This controls what email alerts are sent with regards to logins to the UI. It
  1821. # uses the uialert.txt template
  1822. #
  1823. # 4 = login success + login failure/ban/block + login attempts
  1824. # 3 = login success + login failure/ban/block
  1825. # 2 = login failure/ban/block
  1826. # 1 = login ban/block
  1827. # 0 = disabled
  1828. UI_ALERT = "4"
  1829.  
  1830. # This is the SSL cipher list that the Integrated UI will negotiate from
  1831. UI_CIPHER = "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:!kEDH"
  1832.  
  1833. # This is the SSL protocol version used. See IO::Socket::SSL if you wish to
  1834. # change this and to understand the implications of changing it
  1835. UI_SSL_VERSION = "SSLv23:!SSLv3:!SSLv2"
  1836.  
  1837. # If cxs is installed then enabling this option will provide a dropdown box to
  1838. # switch between applications
  1839. UI_CXS = "0"
  1840.  
  1841. # There is a modified installation of ConfigServer Explorer (cse) provided with
  1842. # the csf distribution. If this option is enabled it will provide a dropdown
  1843. # box to switch between applications
  1844. UI_CSE = "0"
  1845.  
  1846. ###############################################################################
  1847. # SECTION:Messenger service
  1848. ###############################################################################
  1849. # Messenger service. This feature allows the display of a message to a blocked
  1850. # connecting IP address to inform the user that they are blocked in the
  1851. # firewall. This can help when users get themselves blocked, e.g. due to
  1852. # multiple login failures. The service is provided by two daemons running on
  1853. # ports providing either an HTML or TEXT message.
  1854. #
  1855. # This feature does not work on servers that do not have the iptables module
  1856. # ipt_REDIRECT loaded. Typically, this will be with MONOLITHIC kernels. VPS
  1857. # server admins should check with their VPS host provider that the iptables
  1858. # module is included.
  1859. #
  1860. # For further information on features and limitations refer to the csf
  1861. # readme.txt
  1862. #
  1863. # Note: Run /etc/csf/csftest.pl to check whether this option will function on
  1864. # this server
  1865. #
  1866. # 1 to enable, 0 to disable
  1867. MESSENGER = "0"
  1868.  
  1869. # Provide this service to temporary IP address blocks
  1870. MESSENGER_TEMP = "1"
  1871.  
  1872. # Provide this service to permanent IP address blocks
  1873. MESSENGER_PERM = "1"
  1874.  
  1875. # User account to run the service servers under. We recommend creating a
  1876. # specific non-priv, non-shell account for this purpose
  1877. MESSENGER_USER = "csf"
  1878.  
  1879. # This is the maximum concurrent connections allowed to each service server
  1880. MESSENGER_CHILDREN = "10"
  1881.  
  1882. # Set this to the port that will receive the HTML message. You should configure
  1883. # this port to be >1023 and different from the TEXT port. Do NOT enable access
  1884. # to this port in TCP_IN
  1885. MESSENGER_HTML = "8888"
  1886.  
  1887. # This comma separated list are the HTML ports that will be redirected for the
  1888. # blocked IP address. If you are using per application blocking (LF_TRIGGER)
  1889. # then only the relevant block port will be redirected to the messenger port
  1890. MESSENGER_HTML_IN = "80,2082,2095"
  1891.  
  1892. # Set this to the port that will receive the TEXT message. You should configure
  1893. # this port to be >1023 and different from the HTML port. Do NOT enable access
  1894. # to this port in TCP_IN
  1895. MESSENGER_TEXT = "8889"
  1896.  
  1897. # This comma separated list are the TEXT ports that will be redirected for the
  1898. # blocked IP address. If you are using per application blocking (LF_TRIGGER)
  1899. # then only the relevant block port will be redirected to the messenger port
  1900. MESSENGER_TEXT_IN = "21"
  1901.  
  1902. # These settings limit the rate at which connections can be made to the
  1903. # messenger service servers. Its intention is to provide protection from
  1904. # attacks or excessive connections to the servers. If the rate is exceeded then
  1905. # iptables will revert for the duration to the normal blocking activity
  1906. #
  1907. # See the iptables man page for the correct --limit rate syntax
  1908. MESSENGER_RATE = "30/m"
  1909. MESSENGER_BURST = "5"
  1910.  
  1911. ###############################################################################
  1912. # SECTION:lfd Clustering
  1913. ###############################################################################
  1914. # lfd Clustering. This allows the configuration of an lfd cluster environment
  1915. # where a group of servers can share blocks and configuration option changes.
  1916. # Included are CLI and UI options to send requests to the cluster.
  1917. #
  1918. # See the readme.txt file for more information and details on setup and
  1919. # security risks.
  1920. #
  1921. # Comma separated list of cluster member IP addresses to send requests to
  1922. CLUSTER_SENDTO = ""
  1923.  
  1924. # Comma separated list of cluster member IP addresses to receive requests from
  1925. CLUSTER_RECVFROM = ""
  1926.  
  1927. # IP address of the master node in the cluster allowed to send CLUSTER_CONFIG
  1928. # changes
  1929. CLUSTER_MASTER = ""
  1930.  
  1931. # If this is a NAT server, set this to the public IP address of this server
  1932. CLUSTER_NAT = ""
  1933.  
  1934. # If a cluster member should send requests on an IP other than the default IP,
  1935. # set it here
  1936. CLUSTER_LOCALADDR = ""
  1937.  
  1938. # Cluster communication port (must be the same on all member servers). There
  1939. # is no need to open this port in the firewall as csf will automatically add
  1940. # in and out bound rules to allow communication between cluster members
  1941. CLUSTER_PORT = "7777"
  1942.  
  1943. # This is a secret key used to encrypt cluster communications using the
  1944. # Blowfish algorithm. It should be between 8 and 56 characters long,
  1945. # preferably > 20 random characters
  1946. # 56 chars: 01234567890123456789012345678901234567890123456789012345
  1947. CLUSTER_KEY = ""
  1948.  
  1949. # Automatically send lfd blocks to all members of CLUSTER_SENDTO. Those
  1950. # servers must have this servers IP address listed in their CLUSTER_RECVFROM
  1951. #
  1952. # Set to 0 to disable this feature
  1953. CLUSTER_BLOCK = "1"
  1954.  
  1955. # This option allows the enabling and disabling of the Cluster configuration
  1956. # changing options --cconfig, --cconfigr, --cfile, --ccfile sent from the
  1957. # CLUSTER_MASTER server
  1958. #
  1959. # Set this option to 1 to allow Cluster configurations to be received
  1960. CLUSTER_CONFIG = "0"
  1961.  
  1962. # Maximum number of child processes to listen on. High blocking rates or large
  1963. # clusters may need to increase this
  1964. CLUSTER_CHILDREN = "10"
  1965.  
  1966. ###############################################################################
  1967. # SECTION:Port Knocking
  1968. ###############################################################################
  1969. # Port Knocking. This feature allows port knocking to be enabled on multiple
  1970. # ports with a variable number of knocked ports and a timeout. There must be a
  1971. # minimum of 3 ports to knock for an entry to be valid
  1972. #
  1973. # See the following for information regarding Port Knocking:
  1974. # http://www.portknocking.org/
  1975. #
  1976. # This feature does not work on servers that do not have the iptables module
  1977. # ipt_recent loaded. Typically, this will be with MONOLITHIC kernels. VPS
  1978. # server admins should check with their VPS host provider that the iptables
  1979. # module is included
  1980. #
  1981. # For further information and syntax refer to the Port Knocking section of the
  1982. # csf readme.txt
  1983. #
  1984. # Note: Run /etc/csf/csftest.pl to check whether this option will function on
  1985. # this server
  1986. #
  1987. # openport;protocol;timeout;kport1;kport2;kport3[...;kportN],...
  1988. # e.g.: 22;TCP;20;100;200;300;400
  1989. PORTKNOCKING = ""
  1990.  
  1991. # Enable PORTKNOCKING logging by iptables
  1992. PORTKNOCKING_LOG = "1"
  1993.  
  1994. # Send an email alert if the PORTKNOCKING port is opened. PORTKNOCKING_LOG must
  1995. # also be enabled to use this option
  1996. #
  1997. # SECURITY NOTE: This option is affected by the RESTRICT_SYSLOG option. Read
  1998. # this file about RESTRICT_SYSLOG before enabling this option:
  1999. PORTKNOCKING_ALERT = "0"
  2000.  
  2001. ###############################################################################
  2002. # SECTION:Log Scanner
  2003. ###############################################################################
  2004. # Log Scanner. This feature will send out an email summary of the log lines of
  2005. # each log listed in /etc/csf/csf.logfiles. All lines will be reported unless
  2006. # they match a regular expression in /etc/csf/csf.logignore
  2007. #
  2008. # File globbing is supported for logs listed in /etc/csf/csf.logfiles. However,
  2009. # be aware that the more files lfd has to track, the greater the performance
  2010. # hit. Note: File globs are only evaluated when lfd is started
  2011. #
  2012. # Note: lfd builds the report continuously from lines logged after lfd has
  2013. # started, so any lines logged when lfd is not running will not be reported
  2014. # (e.g. during reboot). If lfd is restarted, then the report will include any
  2015. # lines logged during the previous lfd logging period that weren't reported
  2016. #
  2017. # 1 to enable, 0 to disable
  2018. LOGSCANNER = "0"
  2019.  
  2020. # This is the interval each report will be sent based on the logalert.txt
  2021. # template
  2022. #
  2023. # The interval can be set to:
  2024. # "hourly" - sent on the hour
  2025. # "daily" - sent at midnight (00:00)
  2026. # "manual" - sent whenever "csf --logrun" is run. This allows for scheduling
  2027. # via cron job
  2028. LOGSCANNER_INTERVAL = "hourly"
  2029.  
  2030. # Report Style
  2031. # 1 = Separate chronological log lines per log file
  2032. # 2 = Simply chronological log of all lines
  2033. LOGSCANNER_STYLE = "1"
  2034.  
  2035. # Send the report email even if no log lines reported
  2036. # 1 to enable, 0 to disable
  2037. LOGSCANNER_EMPTY = "1"
  2038.  
  2039. # Maximum number of lines in the report before it is truncated. This is to
  2040. # prevent log lines flooding resulting in an excessively large report. This
  2041. # might need to be increased if you choose a daily report
  2042. LOGSCANNER_LINES = "5000"
  2043.  
  2044. ###############################################################################
  2045. # SECTION:Statistics Settings
  2046. ###############################################################################
  2047. # Statistics
  2048. #
  2049. # Some of the Statistics output requires the gd graphics library and the
  2050. # GD::Graph perl module with all dependent modules to be installed for the UI
  2051. # for them to be displayed
  2052. #
  2053. # This option enabled statistical data gathering
  2054. ST_ENABLE = "1"
  2055.  
  2056. # This option determines how many iptables log lines to store for reports
  2057. ST_IPTABLES = "100"
  2058.  
  2059. # This option indicates whether rDNS and CC lookups are performed at the time
  2060. # the log line is recorded (this is not performed when viewing the reports)
  2061. #
  2062. # Warning: If DROP_IP_LOGGING is enabled and there are frequent iptables hits,
  2063. # then enabling this setting could cause serious performance problems
  2064. ST_LOOKUP = "0"
  2065.  
  2066. # This option will gather basic system statstics. Through the UI it displays
  2067. # various graphs for disk, cpu, memory, network, etc usage over 4 intervals:
  2068. # . Hourly (per minute)
  2069. # . 24 hours (per minute)
  2070. # . 7 days (per minute averaged over an hour)
  2071. # . 30 days (per minute averaged over an hour) - user definable
  2072. # The data is stored in /var/lib/csf/stats/system and the option requires the
  2073. # perl GD::Graph module
  2074. #
  2075. # Note: Disk graphs do not show on Virtuozzo/OpenVZ servers as the kernel on
  2076. # those systems do not store the required information in /proc/diskstats
  2077. # On new installations or when enabling this option it will take time for these
  2078. # graphs to be populated
  2079. ST_SYSTEM = "1"
  2080.  
  2081. # Set the maximum days to collect statistics for. The default is 30 days, the
  2082. # more data that is collected the longer it will take for each of the graphs to
  2083. # be generated
  2084. ST_SYSTEM_MAXDAYS = "30"
  2085.  
  2086. # If ST_SYSTEM is enabled, then these options can collect MySQL statistical
  2087. # data. To use this option the server must have the perl modules DBI and
  2088. # DBD::mysql installed.
  2089. #
  2090. # Set this option to "0" to disable MySQL data collection
  2091. ST_MYSQL = "0"
  2092.  
  2093. # The following options are for authentication for MySQL data collection. If
  2094. # the password is left blank and the user set to "root" then the procedure will
  2095. # look for authentication data in /root/.my.cnf. Otherwise, you will need to
  2096. # provide a MySQL username and password to collect the data. Any MySQL user
  2097. # account can be used
  2098. ST_MYSQL_USER = "root"
  2099. ST_MYSQL_PASS = ""
  2100. ST_MYSQL_HOST = "localhost"
  2101.  
  2102. # If ST_SYSTEM is enabled, then this option can collect Apache statistical data
  2103. # The value for PT_APACHESTATUS must be correctly set
  2104. ST_APACHE = "0"
  2105.  
  2106. # The following options measure disk write performance using dd (location set
  2107. # via the DD setting). It creates a 64MB file called /var/lib/dd_write_test and
  2108. # the statistics will plot the MB/s response time of the disk. As this is an IO
  2109. # intensive operation, it may not be prudent to run this test too often, so by
  2110. # default it is only run every 5 minutes and the result duplicated for each
  2111. # intervening minute for the statistics
  2112. #
  2113. # This is not necessrily a good measure of disk performance, primarily because
  2114. # the measurements are for relatively small amounts of data over a small amount
  2115. # of time. To properly test disk performance there are a variety of tools
  2116. # available that should be run for extended periods of time to obtain an
  2117. # accurate measurement. This metric is provided to give an idea of how the disk
  2118. # is performing over time
  2119. #
  2120. # Note: There is a 15 second timeout performing the check
  2121. #
  2122. # Set to 0 to disable, 1 to enable
  2123. ST_DISKW = "0"
  2124.  
  2125. # The number of minutes that elapse between tests. Default is 5, minimum is 1.
  2126. ST_DISKW_FREQ = "5"
  2127.  
  2128. # This is the command line passed to dd. If you are familiar with dd, or wish
  2129. # to move the output file (of) to a different disk, then you can alter this
  2130. # command. Take great care when making any changes to this command as it is
  2131. # very easy to overwrite a disk using dd if you make a mistake
  2132. ST_DISKW_DD = "if=/dev/zero of=/var/lib/csf/dd_test bs=1MB count=64 conv=fdatasync"
  2133.  
  2134. ###############################################################################
  2135. # SECTION:OS Specific Settings
  2136. ###############################################################################
  2137. # Binary locations
  2138. IPTABLES = "/sbin/iptables"
  2139. IPTABLES_SAVE = "/sbin/iptables-save"
  2140. IPTABLES_RESTORE = "/sbin/iptables-restore"
  2141. IP6TABLES = "/sbin/ip6tables"
  2142. IP6TABLES_SAVE = "/sbin/ip6tables-save"
  2143. IP6TABLES_RESTORE = "/sbin/ip6tables-restore"
  2144. MODPROBE = "/sbin/modprobe"
  2145. IFCONFIG = "/sbin/ifconfig"
  2146. SENDMAIL = "/usr/sbin/sendmail"
  2147. PS = "/bin/ps"
  2148. VMSTAT = "/usr/bin/vmstat"
  2149. LS = "/bin/ls"
  2150. MD5SUM = "/usr/bin/md5sum"
  2151. TAR = "/bin/tar"
  2152. CHATTR = "/usr/bin/chattr"
  2153. UNZIP = "/usr/bin/unzip"
  2154. GUNZIP = "/bin/gunzip"
  2155. DD = "/bin/dd"
  2156. TAIL = "/usr/bin/tail"
  2157. GREP = "/bin/grep"
  2158. IPSET = "/usr/sbin/ipset"
  2159.  
  2160. # Log file locations
  2161. #
  2162. # File globbing is allowed for the following logs. However, be aware that the
  2163. # more files lfd has to track, the greater the performance hit
  2164. #
  2165. # Note: File globs are only evaluated when lfd is started
  2166. #
  2167. HTACCESS_LOG = "/usr/local/apache/logs/error_log"
  2168. MODSEC_LOG = "/usr/local/apache/logs/error_log"
  2169. SSHD_LOG = "/var/log/secure"
  2170. SU_LOG = "/var/log/secure"
  2171. FTPD_LOG = "/var/log/messages"
  2172. SMTPAUTH_LOG = "/var/log/exim_mainlog"
  2173. SMTPRELAY_LOG = "/var/log/exim_mainlog"
  2174. POP3D_LOG = "/var/log/maillog"
  2175. IMAPD_LOG = "/var/log/maillog"
  2176. CPANEL_LOG = "/usr/local/cpanel/logs/login_log"
  2177. CPANEL_ACCESSLOG = "/usr/local/cpanel/logs/access_log"
  2178. SCRIPT_LOG = "/var/log/exim_mainlog"
  2179. IPTABLES_LOG = "/var/log/messages"
  2180. SUHOSIN_LOG = "/var/log/messages"
  2181. BIND_LOG = "/var/log/messages"
  2182. SYSLOG_LOG = "/var/log/messages"
  2183. WEBMIN_LOG = "/var/log/secure"
  2184.  
  2185. CUSTOM1_LOG = "/var/log/customlog"
  2186. CUSTOM2_LOG = "/var/log/customlog"
  2187. CUSTOM3_LOG = "/var/log/customlog"
  2188. CUSTOM4_LOG = "/var/log/customlog"
  2189. CUSTOM5_LOG = "/var/log/customlog"
  2190. CUSTOM6_LOG = "/var/log/customlog"
  2191. CUSTOM7_LOG = "/var/log/customlog"
  2192. CUSTOM8_LOG = "/var/log/customlog"
  2193. CUSTOM9_LOG = "/var/log/customlog"
  2194.  
  2195. # The following are comma separated lists used if LF_SELECT is enabled,
  2196. # otherwise they are not used. They are derived from the application returned
  2197. # from a regex match in /usr/local/csf/bin/regex.pm
  2198. #
  2199. # All ports default to tcp blocks. To specify udp or tcp use the format:
  2200. # port;protocol,port;protocol,... For example, "53;udp,53;tcp"
  2201. PORTS_pop3d = "110,995"
  2202. PORTS_imapd = "143,993"
  2203. PORTS_htpasswd = "80,443"
  2204. PORTS_mod_security = "80,443"
  2205. PORTS_mod_qos = "80,443"
  2206. PORTS_symlink = "80,443"
  2207. PORTS_suhosin = "80,443"
  2208. PORTS_cxs = "80,443"
  2209. PORTS_bind = "53;udp,53;tcp"
  2210. PORTS_ftpd = "20,21"
  2211. PORTS_webmin = "10000"
  2212. PORTS_cpanel = "2077,2078,2082,2083,2086,2087,2095,2096"
  2213. # This list is extended, if present, by the ports defined by
  2214. # /etc/chkservd/exim-*
  2215. PORTS_smtpauth = "25,465,587"
  2216. PORTS_eximsyntax = "25,465,587"
  2217. # This list is replaced, if present, by "Port" definitions in
  2218. # /etc/ssh/sshd_config
  2219. PORTS_sshd = "22"
  2220.  
  2221. # If you find ever increasing numbers of zombie lfd processes you may need to
  2222. # revert to the old child reaper code by enabling this option
  2223. OLD_REAPER = "0"
  2224.  
  2225. # For internal use only. You should not enable this option as it could cause
  2226. # instability in csf and lfd
  2227. DEBUG = "0"
  2228. ###############################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement