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

fail2ban ssh login waiting time after failure

· 52CE 我爱测

This is what I want to do: If you login with ssh and fail 3 times then you have to wait for 30sec to try again.. 4 times = 60sec 5 times = 300sec ... 10 times = banned I googled my wish and I didn't find anything useful. Maybe so…

问题原文

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

This is what I want to do: If you login with ssh and fail 3 times then you have to wait for 30sec to try again..

4 times = 60sec

5 times = 300sec

...

10 times = banned

I googled my wish and I didn't find anything useful. Maybe someone could help me out here a little bit.

I would be very grateful!

已采纳解答

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

A quick search show that exponential increasing of the ban time was introduced in fail2ban 0.11: https://github.com/fail2ban/fail2ban/pull/1460/commits/6f7c9b7d0f5c637672ed215e726e5d6ace29b664

https://github.com/fail2ban/fail2ban/blob/0.11/config/jail.conf

#
# MISCELLANEOUS OPTIONS
#

# "bantime.increment" allows to use database for searching of previously banned ip's 
# to increase a default ban time using special formula, 
# default it is banTime * 1, 2, 4, 8, 16, 32...

#bantime.increment = true

and a number of other bantime.* related options.

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

资料来源与适用范围

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

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

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