From 9fa64c2d26f31feaffcd273d38216af83af99d9d Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 21 May 2019 05:54:50 -0600 Subject: [PATCH] Update page '5. fail2ban.conf' --- 5.-fail2ban.conf.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 5.-fail2ban.conf.md diff --git a/5.-fail2ban.conf.md b/5.-fail2ban.conf.md new file mode 100644 index 0000000..8acdd1c --- /dev/null +++ b/5.-fail2ban.conf.md @@ -0,0 +1,31 @@ +# Customizations: *fail2ban.local* + +As with all F2B settings, you should always be working with the *.local* files so that updates do not overwrite your custom settings. This repo sets the following and these are the minimum options I suggest you review on any new set up. + +## loglevel + +This sets the verbosity of the log output from F2B. The default setting of *INFO* is appropriate for most installs but, you should specify it anyway so you have an easy place to change it if you need to do so. + +```ini +loglevel = INFO +``` + +## logtarget + +This controls the location of the F2B log file where it logs it's own actions. This is NOT the location of the log files it reads for banning! Again, the default is appropriate for most installs, but you should specify it in your custom configuration so you have an easy place to change it if needed. + +```ini +logtarget = /var/log/fail2ban.log +``` + +## dbpurgeage + +This controls how long F2B keeps a record of systems it has banned for whatever reason. By default, this is set to one day. I prefer having a one week record so I can set longer banning periods. You cannot enforce bans for longer than the record of the ban exists (this setting) otherwise, F2B has no idea how to unban automatically! You can set it to whatever you want, duration is expressed in *seconds*. In this case, I set it to one week (86,400 seconds = 1 day x 7 = 1 week = 604,800 seconds). + +```ini +dbpurgeage = 604800 +``` + +## Other settings + +There are many other options you can configure, but the defaults are pretty good in nearly all cases. That's why I only change these settings. Review the comments in the *fail2ban.conf* file for details on all settings. \ No newline at end of file