我试图configurationfail2ban禁止不良的WordPresslogin尝试,但我没有太大的成功。 我正在使用WP fail2ban 3.0.0 ,正确地logging/var/log/secure上的错误login尝试,据我所知(如果有人感兴趣,我提供下面我的插件configuration): Apr 19 18:21:42 droplet wordpress(website.com)[17157]: Authentication failure for admin from my.ip.add.ress 该filter似乎也被正确configuration。 事实上,如果我运行fail2ban-client status wordpress我可以看到我的IP被禁止: Status for the jail: wordpress |- Filter | |- Currently failed: 2 | |- Total failed: 15 | `- File list: /var/log/secure `- Actions |- Currently banned: 1 |- Total banned: 1 `- Banned IP […]
每隔一段时间我的服务器closures,当我检查我的nginx日志时,我通常会看到类似这样的内容: 78.37.54.31 – – [20/Apr/2016:20:58:51 +0300] "\x00\x00\x00TZ\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x04\x010I\x00\x00\x00\x00\xFC\x01\xA8\xC0\x00!\x00\xFDk\x00\x00\x00\x00\x00\x00\x00\x00" 400 166 "-" "-" 89.169.219.212 – – [21/Apr/2016:11:37:22 +0300] "\x00\x00\x00 c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 400 166 "-" "-" 我使用DigitalOcean文章推荐的默认推荐configuration安装了fail2ban,但是它并没有阻止这些扫描程序偶尔会超载我的服务器。 安装naxsi不是我现在的select。 任何人都可以帮助我为fail2ban形成正确的正则expression式规则? “apache-badbots”和“apache-wootwoot”监狱(可以很容易地search)没有为我工作。
我得到了一吨失败的访问失败吨: 185.103.252.174 – – [28/Apr/2016:15:09:16 -0400] "POST /xmlrpc.php HTTP/1.1" 499 0 "-" "Googlebot/2.1 (+http://www.google.com/bot.html)" 173.246.56.51 – – [28/Apr/2016:15:09:17 -0400] "POST /xmlrpc.php HTTP/1.1" 499 0 "-" "Googlebot/2.1 (+http://www.google.com/bot.html)" 185.103.252.173 – – [28/Apr/2016:15:09:17 -0400] "POST /xmlrpc.php HTTP/1.1" 499 0 "-" "Googlebot/2.1 (+http://www.google.com/bot.html)" 23.226.36.2 – – [28/Apr/2016:15:09:17 -0400] "POST /xmlrpc.php HTTP/1.1" 499 0 "-" "Googlebot/2.1 (+http://www.google.com/bot.html)" 23.226.36.2 – […]
我有一个情况,来自摩尔多瓦的一些知识产权每天都会发现我的基本身份validation凭借某种types的蛮力攻击。 但是我有一个规则fail2ban应该避免这种情况。 当我尝试使用VPN时,它会起作用。 三次尝试后触发fail2ban的请求示例。 我的要求 2016/07/14 15:10:54 [error] 13937#0: *55700 user "engineer" was not found in "/usr/local/nginx/.htpasswd", client: 146.185.31.214, server: localhost, request: "GET / HTTP/1.1", host: "www.mysite.pt" 问题是,来自黑客IP的请求不会触发fail2ban,我不知道为什么。 唯一的区别是referrer:你可以看到。 2016/07/14 01:54:31 [error] 13913#0: *42558 user "engineer" was not found in "/usr/local/nginx/.htpasswd", client: 194.28.112.51, server: localhost, request: "GET / HTTP/1.1", host: "www.mysite.pt", referrer: "http://www.mysite.pt/ /etc/fail2ban/filter.d/nginx-http-auth.conf [Definition] […]
我已经创build了一个监狱和行动,试图捕捉“DDoS攻击”,但是,每当我重新启动Fail2Ban,日志文件显示这个监狱的错误。 监狱和filter看起来相当直接,并在几个博客转载,但我用于比较的一个在这里 。 这是监狱: [http-get-dos] enabled = true filter = http-get-dos action = iptables[name=Http-Get-Dos, port="http,https"] logpath = %(apache_access_log)s maxretry = 300 findtime = 300 bantime = 300 这是filter: # Fail2Ban configuration file # [Definition] # Option: failregex # Note: This regex will match any GET entry in your logs # You should set up in […]
我在我的apache错误日志中有很多以下的错误信息: [Thu Dec 16 15:13:24 2010] [error] [client 168.144.92.191] File does not exist: /var/www/mydomain/fud [Thu Dec 16 15:13:24 2010] [error] [client 168.144.92.191] File does not exist: /var/www/mydomain/flag, referer: http://lexington.craigslist.org/fud/2076870022.html [Thu Dec 16 15:14:28 2010] [error] [client 168.144.92.191] File does not exist: /var/www/mydomain/flag, referer: http://lexington.craigslist.org/fud/2115799176.html [Thu Dec 16 15:17:51 2010] [error] [client 168.144.92.191] File does not […]
是否有一个应用程序通过nginx日志并阻止提出常见webapp漏洞请求的IP? 我有一个只提供静态内容的nginx web服务器。 我经常得到GET /db/websql/main.php或GET /db/phpMyAdmin2/main.php请求。 这些是有人扫描漏洞的明显迹象。 是否有一个应用程序可以通过nginx日志,认识到这些尝试利用常见的漏洞,并阻止有问题的IP? 我的想法是,即使我不容易受到这些攻击,相同的IP也可能在我的networking上的同一个盒子或其他盒子上进行其他types的攻击:SMTP,SSH,其他带有Web应用程序的Web服务器。 在cookiesjar子里用手抓住它们看起来是一个很好的方法。 Fail2ban为SSH和HTTPauthentication尝试做类似的事情。 也许它可以与configuration一起使用,其中包括用于漏洞的众所周知的地址列表。 有没有这样的configuration可用?
我想将“.googlebot.com”添加到fail2ban的ignore iplist中,因为ignoreip说明提到DNS主机是一个可接受的input。 这是一个适当的格式? # "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not # ban a host which matches an address in this list. Several addresses can be # defined using space separator.
如果我跑 fail2ban-regex '31.22.105.115 – – [11/Apr/2014:18:09:54 +0100] "GET /admin/config.php HTTP/1.0" 301 573 "-" "-"' '^<HOST> – – (?:\[[^]]*\] )+\"(GET|POST)/(?i)(PMA|phptest|phpmyadmin|myadmin|mysql|mysqladmin|sqladmin|mypma|admin|xampp|mysqldb|mydb|db|pmadb|phpmyadmin1|phpmyadmin2|cgi-bin)' 然后我得到Success, the total number of match is 1 。 然而,如果我有一个access.log包含 . . 109.68.191.26 – – [11/Apr/2014:12:47:50 +0100] "GET / HTTP/1.0" 301 541 "-" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)" 31.22.105.115 – – [11/Apr/2014:18:09:54 +0100] "GET /admin/config.php HTTP/1.0" 301 573 "-" […]
我在Ubuntu 13.10服务器上有以下的fail2banconfiguration片段: #jail.conf [apache-getphp] enabled = true port = http,https filter = apache-getphp action = iptables-multiport[name=apache-getphp, port="http,https", protocol=tcp] mail-whois[name=apache-getphp, dest=root] logpath = /srv/apache/log/access.log maxretry = 1 #filter.d/apache-getphp.conf [Definition] failregex = ^<HOST> – – (?:\[[^]]*\] )+\"(GET|POST) /(?i)(PMA|phptest|phpmyadmin|myadmin|mysql|mysqladmin|sqladmin|mypma|admin|xampp|mysqldb|mydb|db|pmadb|phpmyadmin1|phpmyadmin2|cgi-bin) ignoreregex = 我知道正则expression式是好的,因为如果我在我的access.log上运行testing命令: fail2ban-regex /srv/apache/log/access.log /etc/fail2ban/filter.d/apache-getphp.conf 我得到了一个SUCCESS结果与多个点击,并在我的日志中看到像条目 187.192.89.147 – – [13/Apr/2014:11:36:03 +0100] "GET /phpTest/zologize/axa.php HTTP/1.1" 301 585 "-" "-" […]