Articles of fail2ban

Fail2Ban不拒绝禁止的IP?

我有一个新的Ubuntu服务器设置与OpenSSH访问(在自定义端口)和Fail2Ban安装。 Fail2Ban似乎正确地禁止IP并将它们添加到iptables中,但是一旦禁止,我仍然可以通过有效的帐户获得SSH访问权限(在本例中是禁止的IP,131.111.96.100)。 IPtables如下,有什么想法? Chain INPUT (policy ACCEPT) target prot opt source destination f2b-selinux-ssh tcp — 0.0.0.0/0 0.0.0.0/0 multiport dports 22 f2b-sshd-ddos tcp — 0.0.0.0/0 0.0.0.0/0 multiport dports 22 f2b-sshd tcp — 0.0.0.0/0 0.0.0.0/0 multiport dports 22 Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain […]

fail2ban不按预期工作

经过几次故意不成功的login尝试失败,2ban已经禁止我从我的服务器,但我仍然可以login后。 # iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination fail2ban-ssh tcp — anywhere anywhere multiport dports ssh Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain fail2ban-ssh (1 references) target prot opt source destination DROP all — dslb-xx-xx-xx-xx.pools.arcor-ip.net anywhere RETURN all […]

fail2ban是必要的吗?

我禁用了rootlogin,禁用了密码authentication选项,并且阻止了我运行的linux虚拟服务器的除了22和80以外的所有端口。 访问服务器的唯一方法是使用一个4096位的RSA密钥。 是否有必要运行fail2ban? 除了保持日志更清洁一些,额外的安全是值得的开销吗?

Fail2Bantesting

运行以下testing脚本查看Fail2ban是否正在工作: fail2ban-regex /var/log/apache*/*access.log /etc/fail2ban/filter.d/apache-auth.conf 我得到这个回应: Running tests ============= Use ignoreregex line : /etc/fail2ban/filter.d/apache-badbots No section headers in /var/log/apache2/other_vhosts_access.log 它没有运行我的日志的testing扫描。 我已经用类似的语法testing了我的SSH fail2ban设置,并且testing正常。 不知道我在做什么错。

Fail2ban检测永久禁止的IP地址

我有一个虚拟机与自定义防火墙脚本和Fail2ban。 我已经确定了一些永久入侵企图的IP范围,所以我直接在我的防火墙脚本中封锁了它们。 这是一个简单的概述: #!/bin/sh ### BEGIN INIT INFO # Provides: Custom firewall # Required-Start: $remote_fs $syslog $network # Required-Stop: $remote_fs $syslog $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short Description: Firewall init script # Description: Custom firewall ### END INIT INFO ## Lock everything # Clear current tables iptables […]

为什么在我的iptables条目中是否有DNS主机名? (的fail2ban)

我最近安装了fail2ban,它已经开始阻止不好的ssh尝试。 我还设立了一个额外的filter来永久禁止屡犯者 。 现在我注意到,在我的iptables中有一些条目是DNS主机名而不是原始IP地址,这显然是一个可怕的想法。 我在use_dns = no添加了use_dns = no ,并在/ etc / ssh / sshd_config中添加了UseDNS no 。 我已经重新启动了这两个服务,但这些iptables条目仍显示为主机名而不是IP地址。 还有什么可能导致DNS名称? 禁用的ips的永久列表被存储为原始IP,所以翻译似乎是在幕后发生的,因为它们是在启动时由fail2ban添加的。

fail2ban apache-noscript不工作

我的debian服务器最近受到攻击,我一直在研究日志,看看我能做些什么来加固它。 我一直在运行fail2ban一段时间,但我注意到,apache-noscript监狱似乎并没有工作。 fail2ban软件包最近已经更新,这个特定的监狱的内容已经改变,但我不知道它曾经工作过。 这是现在的监狱: # Fail2Ban configuration file # # Author: Cyril Jaquier # # $Revision: 728 $ # [INCLUDES] # Read common prefixes. If any customizations available — read them from # common.local before = apache-common.conf [Definition] # Option: failregex # Notes.: regex to match the password failure messages in the logfile. The # […]

为Samba使用fail2ban

我正在寻找一种方法来使用fail2ban来控制/阻止Ubuntu 12.04.3 LTS上的sambalogin。 我已经build立了一个jail.local 。 桑巴部分目前看起来像这样: [samba] enabled = true port = 135,139,445,137,138 protocol = tcp,udp 我错过了这两个选项: filter = logpath = 我知道samba日志位于/var/log/samba ,但是每个主机名都有自己的文件,所以我必须将其设置为logpath和filter? 或者这甚至有可能? 非常感谢你

Fail2ban MTA = Jail Config中的Postfix设置给出错误

在/etc/fail2ban/jail.local ,当我将MTA设置为Postfix时,Fail2Ban显示错误,无法启动。 [DEFAULT] ignoreip = 127.0.0.1/8 bantime = 1800 maxretry = 4 destemail = [email protected] mta = postfix action = %(action_mwl)s 错误: WARNING 'findtime' not defined in 'ssh'. Using default value ERROR /etc/fail2ban/action.d/postfix-whois-lines.conf and /etc/fail2ban/action.d/postfix-whois-lines.local do not exist ERROR Error in action definition postfix-whois-lines[name=ssh, dest="[email protected]", logpath=/var/log/auth.log, chain="INPUT"] ERROR Errors in jail 'ssh'. Skipping… ['set', 'loglevel', […]

fail2ban和ssh不起作用

我只用端口2122和pubkeyconfiguration了ssh。 我担保,但我想要更多的禁止拉姆斯尝试bruteforce auth。 我的fail2ban的configuration jail.local [INCLUDES] before = paths-slackware.conf [DEFAULT] ignoreip = 127.0.0.1/8 ignorecommand = bantime = 10800 findtime = 600 maxretry = 3 backend = auto usedns = warn logencoding = auto enabled = true filter = %(__name__)s destemail = root@localhost sender = root@localhost mta = mail protocol = tcp chain = INPUT port […]