Linux

How to disable log on csf firewall

Here’s a complete and safe way to disable or reduce logging in CSF (ConfigServer Security & Firewall) — depending on whether you want to turn off all logs or just limit noisy ones.

1. Main config file location

All CSF logging options are controlled in:

/etc/csf/csf.conf

Open it for editing:

sudo nano /etc/csf/csf.conf

2. Common log settings to disable / reduce

Search for these parameters and change them:

OptionDefaultSet ToDescription
DROP_LOGGING"1""0"Disable logging of dropped packets
DROP_IP_LOGGING"1""0"Don’t log each dropped IP
LF_EMAIL_ALERT"1""0"Disable LFD email alerts
LF_PERMBLOCK_ALERT"1""0"Disable permanent ban alerts
LF_TEMP_EMAIL_ALERT"1""0"Disable temp ban email alerts
LF_SSH_EMAIL_ALERT"1""0"Disable SSH login alerts
LF_SU_EMAIL_ALERT"1""0"Disable alerts for su command
LF_CONSOLE_EMAIL_ALERT"1""0"Disable console login alerts
LF_WEBMIN_EMAIL_ALERT"1""0"Disable Webmin login alerts
PS_INTERVAL600Disable process tracking logs

 3. Apply your changes

After editing:

csf -r        # reload CSF
systemctl restart lfd

4. Optional: clear existing CSF logs

rm -f /var/log/lfd.log
rm -f /var/log/messages
systemctl restart rsyslog

5. Restart everything

csf -r
systemctl restart lfd

Thanks for visit my website