Skip to content

Instantly share code, notes, and snippets.

@eksiscloud
Created May 23, 2020 09:58
Show Gist options
  • Save eksiscloud/4309df83616a81c0969d619b8924feea to your computer and use it in GitHub Desktop.
Save eksiscloud/4309df83616a81c0969d619b8924feea to your computer and use it in GitHub Desktop.
/etc/logrotate.d/fail2ban
/var/log/fail2ban.log {
# weekly
daily
# rotate 4
rotate 30
# compress
# delaycompress
missingok
postrotate
fail2ban-client flushlogs 1>/dev/null
endscript
# If fail2ban runs as non-root it still needs to have write access
# to logfiles.
# create 640 fail2ban adm
create 640 root adm
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment