fail2ban保存禁止ip的重启后

重新启动(fail2ban或整个服务器)后,可以保存并使用fail2ban中已禁止的IP?

截至2016年,这实际上是默认的。 不过,这大概是在2011或2012年左右。 所以你现在什么都没有做

禁用数据库在fail2ban.conf定义了两个variables:

 # Options: dbfile # Notes.: Set the file for the fail2ban persistent data to be stored. # A value of ":memory:" means database is only stored in memory # and data is lost when fail2ban is stopped. # A value of "None" disables the database. # Values: [ None :memory: FILE ] Default: /var/lib/fail2ban/fail2ban.sqlite3 dbfile = /var/lib/fail2ban/fail2ban.sqlite3 # Options: dbpurgeage # Notes.: Sets age at which bans should be purged from the database # Values: [ SECONDS ] Default: 86400 (24hours) dbpurgeage = 86400 

为避免持久性,现在这是默认值,编辑fail2ban.conf文件,然后使用以下命令更改dbfile = <path>

 dbfile = None 

我不太清楚None:memory:之间的区别:memory:无论哪种方式,这两者都可以防止IP在重启或重启时重新添加到防火墙。

不是我所知道的。 我的build议是要么禁止有点短的时间,要么是永久禁令。 我configuration我的服务器将永久禁用的IP列表转储到一个configuration文件有6个小时,并在关机; 然后在启动时自动加载该文件。

我有我的规则设置,所以perma-ban监狱是非常敏感的,例如,当login到webmail门户将触发它,例如2个不同的无效用户名。 如正确的用户名/密码错误的通常的监狱10后触发,只有短时间禁止。