我正在按照这个指南添加一个被禁IP的黑名单: https : //www.mauromascia.com/en/blog/fail2ban-set-permanent-ban-per-ip/ 我注意到的第一件事是我的iptables-multiport.conf中的默认部分是指f2ban- <name>: actionstart = <iptables> -N f2b-<name> <iptables> -A f2b-<name> -j <returntype> <iptables> -I <chain> -p <protocol> -m multiport –dports <port> -j f2b-<name> 而指南引用<fail2ban-name>。 这可能是重要的。 在任何情况下,我创build了黑名单文件,并通过添加行来改变上面的内容: actionstart = <iptables> -N f2b-<name> <iptables> -A f2b-<name> -j <returntype> <iptables> -I <chain> -p <protocol> -m multiport –dports <port> -j f2b-<name> cat /etc/fail2ban/ip.blacklist | while […]
我已经为Tomcat 8.5安装和configuration了使用shorewall的fail2ban,但是我有一些麻烦提出了一个工作的failregexexpression式,我想fail2ban寻找 到目前为止,我试图匹配/pipe理/ html身份validation模块,401 HTTP响应与尝试 failregex = <HOST>.*(GET|POST|HEAD).*manager/html.* 但是,当我尝试login不正确的凭据,我没有看到fail2ban计数其总计失败计数器 127.0.0.1 – – [06 / Jul / 2017:22:09:35 +0200]“GET / manager / html HTTP / 1.1”401 2473 127.0.0.1 – – [06 / Jul / 2017:22:09:38 +0200]“GET / manager / html HTTP / 1.1”401 2473 127.0.0.1 – – [06 / Jul / 2017:22:09:43 +0200]“GET / manager / […]
我有一个Domino Web服务器,每天晚上在/ var / log / httpd-domino /文件夹中创build一个名为“accessMMDDYYYY.log”的access.log。 这是一个标准的访问日志(如Apache的)。 如果我在我的jail.local文件中设置了“logpath = /var/log/httpd-domino/*.log”这一行很好,但在午夜之后,当日志名称更改(MMDDYYYY假定新的当前date)时,fail2ban仍然指向旧的日志名称,即使该文件不再存在,如“fail2ban-client status [JailName]”所报告的。 我唯一能做的就是从cmd行发送一个“fail2ban-client reload”命令。 所以,问题是:我怎么能告诉fail2ban定期刷新和重新扫描日志目录而不重新加载? 或者,我错过了什么?
日志文件/var/log/openvpnas.log中的一行示例 2017-07-22 01:13:51+0200 [-] OVPN 4 OUT: "Fri Jul 21 23:13:51 2017 62.140.147.120:5414 SENT CONTROL [jeff]: 'AUTH_FAILED' (status=1)" 我想要使用fail2ban,当AUTH_FAILED在该行中时,ip-adres 62.140.147.120被阻塞,就像在示例行中那样。 我花了几个小时试图做到这一点。 在Google上search。 用正则expression式进行实验。 仍然无法使其工作。 到目前为止,openvpn.conf中最为合乎逻辑的一行似乎是: failregex = ^ … OVPN 4 OUT: \".* .* .* ..:..:.. …. <HOST>:.* SENT CONTROL .*: \'AUTH_FAILED\' $ 但是命令: fail2ban-regex /var/log/openvpnas.log /etc/fail2ban/filter.d/openvpn.conf 一直说:0匹配 任何人都可以帮我吗? 什么是“failregex”的参数,我必须inputopenvpn.conf?
我以一种逃避典型的fail2ban设置的方式对我的SMTP服务器进行powershell攻击: 攻击来自同一子网中的多个IP 单个IP攻击的时间间隔超过一个小时,显然是为了避免被fail2ban阻塞,fail2ban通常使用findtime和bantime时间短于一个小时 这是日志: 2017-09-05 01:11:19 LOGIN authenticator failed for (User) [91.200.12.165]:57519 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=soft) 2017-09-05 01:11:36 LOGIN authenticator failed for (User) [91.200.12.164]:51973 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=sandy) 2017-09-05 01:15:22 LOGIN authenticator failed for (User) [91.200.12.121]:51545 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=brown) 2017-09-05 01:28:57 LOGIN authenticator failed for (User) [91.200.12.105]:64938 I=[192.168.1.224]:25: […]
Fail2ban正在工作,但我去pentest我的服务器,无论出于什么原因,Apache2的监狱不工作。 我用iptables -S检查IPTables,并且有9个条目用于-A input -p tcp -m multiport –dports 22 -j f2b-default即使我在jails.conf中指定了http和https端口 我试过再次进入jails.conf,改变http,https 80,443,同样的事情发生。 我不知道为什么fail2ban是在每个types的监狱端口22添加iptables条目,但我没有做任何事情似乎解决这个问题。 如果这对于任何想要帮助我的人都是重要的,我将会在debian 9上。 编辑:configuration文件 [INCLUDES] before = paths-debian.conf [DEFAULT] ignoreip = 127.0.0.1/8 ignorecommand = bantime = 600 findtime = 600 maxretry = 5 backend = auto usedns = warn logencoding = auto #enabled = true filter = %(__name__)s destemail = root@localhost […]
我疯了我的活服务器fail2ban不是启动监狱了。 当我启动fail2ban时,一切看起来都很好: fail2ban-client -x start: 2017-11-14 15:51:32,403 fail2ban.server : INFO Starting Fail2ban v0.8.6 2017-11-14 15:51:32,403 fail2ban.server : INFO Starting in daemon mode 当我看着监狱的状态: fail2ban-client status Status |- Number of jail: 0 `- Jail list: 日志/var/log/fail2ban.log中显示的几行是: 2017-11-14 15:51:32,443 fail2ban.server : INFO Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.6 2017-11-14 15:51:32,444 fail2ban.jail : INFO Creating new […]
我configuration了Fail2ban禁止所有的ip试图通过SSHlogin到我的服务器,它工作得很好。 现在我想保护“ http://example.com/phpmyadmin/ ”和http://example.com/phppgadmin/ “从stream氓也。 我试图configurationFail2ban禁止所有那些将尝试蛮力MySQL和Postgresql密码(从phpmyadmin和默认的MySQL调用,相同的posgresql)。 为了达到这个目的,我使用了这个configuration的[apache-auth]filter: [apache-auth] enabled = true port = http,https logpath = /var/log/apache*/*error.log 不幸的是,它根本不工作。 即使密码错误,我也可以尝试尽可能多的尝试。
我正在运行Ubuntu 16.04,我已经默认安装了Fail2ban。 每当我在一个新的networking上使用它时,最有可能因为我在很短的时间内访问了多个子域而被封锁。 有没有办法减less它是多么严格? 编辑 状态 root@localhost:~# fail2ban-client status Status |- Number of jail: 2 `- Jail list: nginx-proxy, sshd root@localhost:~# fail2ban-client status nginx-proxy Status for the jail: nginx-proxy |- Filter | |- Currently failed: 1 | |- Total failed: 2 | `- File list: /var/log/nginx/access.log `- Actions |- Currently banned: 1 |- Total banned: […]
这是我想要做的:如果你用sshlogin并且失败了3次,那么你必须等待30秒才能重试。 4次= 60秒 5次= 300秒 … 10次=禁止 我GOOGLE了我的愿望,我没有发现任何有用的东西。 也许有人可以帮我一点点。 我会很感激!