fail2ban installation issue

To project server and ban IPs automatically who trying to harm us, I am trying to configure fail2ban but it’s not running as expected.

Can anyone confirm how to do it and what if the firewall is disabled and CFS is enabled ?

You dont need fail2ban with csf as it comes with a similar function.

LFD is not active in Cyberpanel. Without LFD, CSF doesn’t ban failed logins.

1 Like
LFD is not active in Cyberpanel. Without LFD, CSF doesn't ban failed logins.

Is it not? As the LFD service does appear to get installed when installing CSF via CyberPanel.
Although i’m not entirely sure if it’s configured correctly…

@Numeriku
Thank you …

After restarting CSF -

WARNING RESTRICT_SYSLOG is disabled. See SECURITY WARNING in /etc/csf/csf.conf.

Now how to make sure it is working. Any log ?

  1. Open the csf configuration file.

nano /etc/cfs/csf.conf

  1. search for “RESTRICT_SYSLOG”. It will be like
    RESTRICT_SYSLOG = “0”
  2. Change it to
    RESTRICT_SYSLOG = “3”
  3. Restart csf.

If you set up email for notifications for LFD, you should be getting emails when ips are banned if i remember correctly.

@Numeriku Thank you for saving my day :slight_smile:

@Numeriku , I found that iptables service is not running on server whereas CSF log showing blocking IPs.

I don’t think it’s normal. Please guide what to do?