AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-347682

Trent's questions

Martin Hope
Trent
Asked: 2016-04-11 02:20:28 +0800 CST

Fail2Ban 登录过滤器在 Debian Web 服务器上不起作用

  • 0

因此,我无法将 Fail2Ban 用作 Web 应用程序登录的自定义过滤器。首先,其他过滤器确实有效,例如 NGINX Auth。但是,我的电子邮件已经停止工作,不知道为什么。

这些是 /var/log/auth.log 中失败的登录尝试

Apr  1 11:28:15 user pancake[17973]: Attempt to login as random failed. 127.0.0.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17)

Apr  1 11:28:39 user pancake[17974]: Attempt to login as admin failed. 127.0.0.1 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17)

我的监狱(/etc/fail2ban/jail.local):

[pancake]

enabled  = true

port     = http,https

filter   = pancake

logpath  = /var/log/auth.log

maxretry = 4

我的过滤器(/etc/fail2ban/filter.d/pancak.conf)

[INCLUDES]

# Read common prefixes. If any customizations available -- read them from

# common.local

before = common.conf

[Definition]

_daemon = pancake

failregex = Attempt to login as .* failed. <HOST>$

ignoreregex =

现在,当我通过运行进行测试时:

sudo fail2ban-regex /var/log/auth.log /etc/fail2ban/filter.d/pancake.conf

我得到:

Running tests

=============

Use   failregex file : /etc/fail2ban/filter.d/pancake.conf

Use         log file : /var/log/auth.log

Results

=======

Failregex: 0 total

Ignoreregex: 0 total

Date template hits:

|- [# of hits] date format

|  [2708] MONTH Day Hour:Minute:Second

`-

Lines: 2708 lines, 0 ignored, 0 matched, 2708 missed

我也尝试过使用:

failregex = ^%(__prefix_line)sAttempt to login as .* failed. <HOST>$

任何帮助都会很棒。

谢谢特伦特

linux debian security fail2ban ids
  • 1 个回答
  • 704 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve