大网数据广告活动
服务器运维问答

How does findtime setting in nginx fail2ban work?

· 52CE 我爱测

One can set findtime in nginx fail2ban jail. This is the amount of time during which a recurring pattern is counted (called maxretry ). My question is, which of the following is true: A - If findtime of 60 seconds is set, fail2ba…

问题原文

原帖链接 · Hassan Baig · CC BY-SA 3.0

One can set findtime in nginx fail2ban jail. This is the amount of time during which a recurring pattern is counted (called maxretry).

My question is, which of the following is true:

A - If findtime of 60 seconds is set, fail2ban will take action after the 60 seconds are over.

B - If findtime of 60 seconds is set, fail2ban will take action even if the 60 seconds aren't over yet, but the 'maxretry` has been reached.


I ask for this distinction because I have a jail where I have set:

findtime = 300
maxretry = 5

Does this mean action will only take place once the 300 seconds are up? If so, I'm going to reduce findtime to 5 (or something similar).

已采纳解答

原帖链接 · NotoriousPyro · CC BY-SA 3.0

It measures how many occurences of what you are telling fail2ban to monitor for, and compares it to maxretry.

If the occurences are higher than maxretry and if they happened all in the same period of findtime, and they are the same event, so same triggering event and same IP, then it will ban.

300 is the sampling time, 5 is the max samples. There must be 5 samples within 300 seconds to ban.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-04-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。