Advertisement
Guest User

Untitled

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