Fail2ban restarts every day

fail2ban

In my server I can see that the fail2ban restarts every day. While checking the internet I can see that the logrotate causes this. I have disabled the logrotate of fail2ban by removing the fail2ban files from logrotate.d . Also checked all cron jobs and even checked /etc/cron.daily . But the issue still persist. Do anyone have any idea?

Best Answer

Are you really sure you fixed the Problem with logrotate?

Taken from 1.Answer:

In /etc/logrotate.d/fail2ban the line:

/usr/bin/fail2ban-client reload 1>/dev/null || true

Should be changed to:

/usr/bin/fail2ban-client set logtarget /var/log/fail2ban.log 1>/dev/null || true

In the case of fail2ban reload does more than just reload the config.