Questions regarding CSF/LFD

jim.thornton

Verified User
Joined
Jan 1, 2008
Messages
334
I have CSF/LFD running on my CentOS box. I don't understand the warnings/issues with RESTRICT_SYSLOG in the config file. Could someone please tell me what is the purpose of this and what setting is being used. Right now I have it to 0 but in the CSF plugin in DA it suggests that I turn it on. However, when I'm reading the warning it is talking about diabling services.

I would really appreciate some clarification please.
 
I had not read that readme file. I did however ready the config file. I just read the readme file and I still am not understanding it. I'm a little weak when it comes to the terminology of these things.

Code:
To mitigate spoofing attempts we recommend the following, if you are willing to
accept the consequences of spoofed log lines:

1. We recommend setting RESTRICT_SYSLOG to "3" for use with option
RESTRICT_SYSLOG_GROUP to restrict access to the syslog/rsyslog unix socket(s)

2. Go through the options above ensuring that only those that you need are
enabled

3. Ensure that DENY_IP_LIMIT and DENY_TEMP_IP_LIMIT are set reasonably low (for
example, 200). This will limit attempts to block large numbers of IP addresses

4. Ensure that administrator/support IP addresses are listed in
/etc/csf/csf.allow and perhaps /etc/csf/csf.ignore. This will prevent malicious
blocking from denying you access to the server

5. To confirm successful logins to SSH, use the "last" utility from the root
shell, e.g.:

last -da

6. Regularly check the server and user data for exploits, old vulnerable
applications and out of date OS applications

7. Consider carefully any application that you use that centralises actions and
syslog/rsyslog logs and the implications of spoofed log lines

8. Consider the implications of this overall issue on applications and scripts
other than csf/lfd that use the affected log files

9. Do not enable syslog/rsyslog reception via UDP/TCP ports

10.  For CloudLinux clients utilizing CageFS this can be prevented by limiting
access to /dev/log inside CageFS. 
For that remove file: /etc/rsyslog.d/schroot.conf
Or remove this line from that file:
$AddUnixListenSocket /usr/share/cagefs-skeleton/dev/log

That will prevent end user's access to /dev/log, preventing them from spoofing.
However, this does also break cron job logging.
It first says "if you are willing to accept the consequences". Which I don't understand the implications of those consequences.

What are most people setting this at for CSF (here)?
 
I can't say for the most. I just can guess they leave it with defaults there. I've recently started to use this option:

1. We recommend setting RESTRICT_SYSLOG to "3" for use with option RESTRICT_SYSLOG_GROUP to restrict access to the syslog/rsyslog unix socket(s)
 
So what do you recommend for this step??

2. Go through the options above ensuring that only those that you need are
enabled
 
Back
Top