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
    • 最新
    • 标签
主页 / server / 问题 / 522081
Accepted
Ariyan
Ariyan
Asked: 2013-07-10 14:13:01 +0800 CST2013-07-10 14:13:01 +0800 CST 2013-07-10 14:13:01 +0800 CST

防御 Squid 服务器上的 DDoS 攻击 [重复]

  • 772
这个问题在这里已经有了答案:
我在 DDoS 下。我能做些什么? (5 个回答)
9 年前关闭。

我的 Squid(Ubuntu 13.04 上的 3.1.20)受到 DDoS 攻击(大约有 1000 个不同的 IP)。
我在上面使用基本身份验证,所有这些请求都得到了拒绝响应,但它们仍然增加了服务器的负载。
如何防御 Squid 上的 DDoS 攻击?

linux
  • 2 2 个回答
  • 3507 Views

2 个回答

  • Voted
  1. Best Answer
    pauska
    2013-07-10T14:30:15+08:002013-07-10T14:30:15+08:00

    使用带有 squid 过滤器的 fail2ban 怎么样?

    这里有一个配置示例:

       # Fail2Ban configuration file for squid
       #
       # Author: Jackie Craig Sparks
       #
       # $Revision: 728 $
       #
       [INCLUDES]
       # Read common prefixes. If any customizations available -- read them from
       # common.local
       before = common.conf
       [Definition]
       _daemon = squid
       # Option:  failregex
       # Notes.:  regex to match the password failures messages in the logfile. The
       #          host must be matched by a group named "host". The tag "<HOST>" can
       #          be used for standard IP/hostname matching and is only an alias for
       #          (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
       # Values:  TEXT
       #
       failregex =  \d{0,10}.*\d{0,3}\ .* \ \d <HOST> TCP_DENIED\/407 .*$
       # Option:  ignoreregex
       # Notes.:  regex to ignore. If this regex matches, the line is ignored.
       # Values:  TEXT
       #
       ignoreregex =
    
    • 4
  2. Evan Anderson
    2013-07-10T14:25:38+08:002013-07-10T14:25:38+08:00

    如果您能够将 Squid 配置为仅绑定到 localhost 并从 SSH 隧道(或通过 VPN,如果可以的话)访问它,您将把攻击面更改为对性能影响较小的东西。我会使用 iptables 来限制传入的 SSH 连接通过 SSH 访问它(实际上,这正是我使用自己的 Squid 缓存所做的)。

    • 2

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

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