Reading state information... Done
fail2ban is already the newest version (1.0.2-2).
python3-virtualenv is already the newest version (20.17.1+ds-1).
git is already the newest version (1:2.39.5-0+deb12u2).
curl is already the newest version (7.88.1-10+deb12u8).
netstat-nat is already the newest version (1.4.10-3+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
检查 fail2ban 状态...
fail2ban 服务未运行,开始配置...
====开始配置 fail2ban====
2. 写入新配置...
新配置将包含:
禁止时长: 86400秒(24小时)
检测时间窗口: 1800秒(30分钟)
最大重试次数: 3次
启用 SSH 防护
配置文件写入成功
测试配置文件...
2025-02-06 16:50:19,471 fail2ban.configreader [12631]: WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto'
OK: configuration test is successful
配置文件测试通过
重启 fail2ban 服务...
检查服务状态...
====fail2ban 配置完成====
检查日志清理配置...
配置日志清理...
/dev/fd/63: line 460: crontab: command not found
/dev/fd/63: line 461: crontab: command not found
好东西,感谢
好东西 先支持下
Reading state information... Done
fail2ban is already the newest version (1.0.2-2).
python3-virtualenv is already the newest version (20.17.1+ds-1).
git is already the newest version (1:2.39.5-0+deb12u2).
curl is already the newest version (7.88.1-10+deb12u8).
netstat-nat is already the newest version (1.4.10-3+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
检查 fail2ban 状态...
fail2ban 服务未运行,开始配置...
====开始配置 fail2ban====
2. 写入新配置...
新配置将包含:
配置文件写入成功
2025-02-06 16:50:19,471 fail2ban.configreader [12631]: WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto'
OK: configuration test is successful
配置文件测试通过
====fail2ban 配置完成====
检查日志清理配置...
配置日志清理...
/dev/fd/63: line 460: crontab: command not found
/dev/fd/63: line 461: crontab: command not found
报错了 定时任务 没有 可以适配安装下
正好需要,感谢大佬分享
可以集成下abuseipdb自动上报
大佬您好,请问我没安装任何防火墙比如iptables和ufw,这个脚本Fail2ban也能成功封禁ip吗?
@无声鱼啊请告诉我所谓理想与悖论 #26 不安装也可以
@kejilion #23 你这个还真少见, 我那么多机子还真没碰到没有定时任务的
收藏一下
收藏了