Advertisement
mysticvpn

csf.cf

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