fail2ban

fail2ban regular to find 403 request in nginx

社会主义新天地 提交于 2019-12-10 11:54:38
问题 I want to find the 403 requests and ban them,here is my log format 112.253.6.182 - - [08/Sep/2014:17:42:56 -0400] "GET / HTTP/1.1" 403 579 "baidu" "Mozilla/4.0" 50.117.86.72 106.37.177.251 - - [08/Sep/2014:17:42:56 -0400] "GET /index.php HTTP/1.1" 404 576 "baidu" "Mozilla/4.0" 204.44.65.173 190.254.173.14 - - [08/Sep/2014:17:42:56 -0400] "GET /index.php HTTP/1.1" 404 576 "baidu" "Mozilla/4.0" 204.44.65.173 41.222.196.37 - - [08/Sep/2014:17:42:56 -0400] "GET / HTTP/1.1" 403 579 "baidu"

How to implement fail2ban with Traefik

柔情痞子 提交于 2019-12-06 00:50:16
问题 I'm interested in setting up fail2ban with my Traefik deployment. I found a gist that has some snippets in it, but I'm not clear on how to use them. Can anyone fill in the blanks please? Or, is there a better way to implement fail2ban style security with Traefik? 回答1: I was able to accomplish this starting with the gist you posted. This is under the assumptions you have Traefik already working, want to block IPs that have HTTP Basic Auth failures, and ban them with iptables. There's a couple

Howto ban IP with Fail2Ban manually by command line?

半世苍凉 提交于 2019-12-03 05:40:03
问题 How do I ban an attacker IP with Fail2Ban manually by command line? 回答1: You ban him manually by adding his IP to the firewall. If you are using UFW, then you write something like this in your command line: ufw insert 1 deny from <ip> to any But you do not want to do that manually - the purpose of Fail2Ban is to ban someone automatically. Use this tutorial to configure Fail2Ban to automatically update your UFW rules. The importan part is to add banaction = ufw-SOMETHING to your jail.conf ,

Howto ban IP with Fail2Ban manually by command line?

孤人 提交于 2019-12-02 19:00:54
How do I ban an attacker IP with Fail2Ban manually by command line? alesc You ban him manually by adding his IP to the firewall. If you are using UFW, then you write something like this in your command line: ufw insert 1 deny from <ip> to any But you do not want to do that manually - the purpose of Fail2Ban is to ban someone automatically. Use this tutorial to configure Fail2Ban to automatically update your UFW rules. The importan part is to add banaction = ufw-SOMETHING to your jail.conf , and then create ufw-SOMETHING.conf in the /etc/fail2ban/action.d/ folder with the following content:

Confluence 6 使用 Fail2Ban 来限制登录尝试

偶尔善良 提交于 2019-12-01 23:00:50
什么是 Fail2Ban? 我们需要在我们网站中防止密码的暴利破解。 Fail2Ban 是一个 Python 的应用来查看日志文件,使用的是 正则表达式 ,同时还可以与Shorewall (或者 iptables)直接工作来来启用临时黑名单。当一定的密码破解规则被使用后,就可以使用上面的方法了。我们可以用这个来限制给定的 URL 来访问 Confluence 的登录界面的次数。 安装要求 需要 Python 2.4 或者更新的版本。 需要指定下面的特定文档,这意味着你的 Apache 实例需要登录你的 Confluence 才能访问一个已知的日志文件(logfile)。你需要 按照下面的要求正确调整配置 。 如何设置 本列表是安装的核心部分: 针对 RHEL 我们有 RPM 是可以按照的,请进入 下载页面 ,同时你还可以下载源代码收手动进行安装。 配置文件在 /etc/fail2ban 在原始状态下,默认的配置文件在 .conf 文件( fail2ban.conf 和 jail.conf)。请不要对这个进行修改,如果你进行修改的话,将会导致升级的时候困难。 在 .local 文件中对配置进行修改,这个将会与 .conf 文件中的配置进行合并。这个文件只会对你需要的修改部分进行修改,能够让你的维护更加容易和简单。 过滤器(Filters)在 filter.d 中进行定义 —

debian 128MB内存VPS 配置

元气小坏坏 提交于 2019-11-27 16:32:36
冗长的前奏 花了15刀淘了一个128MB内存的VPS,算是人生中第一次海淘。 鉴于内存太小系统装 Debian 6 64-bit 琢磨着装个lnmp、wordpress。 呵呵,发现使用 lowendscript 精简系统、lnmp、wordpress全搞定。 参照 128MB小内存VPS安装LNMP php 配置php-cgi 子线程数目 # vim /etc/default/php-cgi PHP_FCGI_CHILDREN = 3 # cat /etc/init.d/php-cgi ##这里面可以看到php各种配置的加载 # vim /etc/php5//etc/php5/cgi/php.ini ####将expose_php = On改为expose_php = Off 关闭版本号 # service php-cgi force-reload ##重新加载 mysql 设置编码 # mysql mysql> show variables like '%character%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ |