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 / 问题 / 603798
Accepted
Iraklis
Iraklis
Asked: 2014-06-10 02:16:38 +0800 CST2014-06-10 02:16:38 +0800 CST 2014-06-10 02:16:38 +0800 CST

iptables连接限制在debian上不起作用[重复]

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

我正在尝试设置一些基本的 DOS 保护。以下 iptables 规则适用于 CentOS 机器,但不适用于 debian (wheezy)。

#limit the parallel http requests to 50 per class C sized network    
iptables  -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 50 --connlimit-mask 24 -j REJECT --reject-with tcp-reset

我正在使用 GoldenEye DOS 工具(以及其他工具),并且在 CentOS 连接被成功拒绝,但是在 debian 盒子中没有任何反应(CPU 上升到 100%,apache 变得无响应)

知道可能会发生什么吗?规则已成功添加到 IPTABLES 规则列表

root@bedrock ~ # iptables -L | grep httpflags
REJECT     tcp  --  anywhere             anywhere             tcp dpt:httpflags: FIN,SYN,RST,ACK/SYN #conn src/24 > 50 reject-with tcp-reset

root@bedrock ~ # cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"

root@bedrock ~ # lsmod | grep ip
xt_multiport           12548  12
ipt_REJECT             12502  3
ipt_LOG                12605  8
iptable_mangle         12536  0
iptable_nat            12928  0
nf_nat                 18242  1 iptable_nat
nf_conntrack_ipv4      14078  16 nf_nat,iptable_nat
nf_defrag_ipv4         12483  1 nf_conntrack_ipv4
nf_conntrack           52720  5 nf_conntrack_ipv4,nf_nat,iptable_nat,xt_state,xt_connlimit
ip6table_filter        12540  0
ip6_tables             22175  1 ip6table_filter
iptable_filter         12536  1
ip_tables              22042  3 iptable_filter,iptable_nat,iptable_mangle
x_tables               19118  14 ip_tables,iptable_filter,ip6_tables,ip6table_filter,iptable_nat,iptable_mangle,xt_tcpudp,xt_state,xt_limit,ipt_LOG,ipt_REJECT,xt_multiport,xt_recent,xt_connlimit
ddos
  • 1 1 个回答
  • 850 Views

1 个回答

  • Voted
  1. Best Answer
    user9517
    2014-06-10T02:29:24+08:002014-06-10T02:29:24+08:00

    这几乎肯定是一个规则排序问题。当规则匹配时,iptables/netfilter 停止处理数据包。使用-A开关将规则添加到链的末尾,因此您可能有一个更早的规则导致处理停止。

    • 1

相关问题

  • 记录入站防火墙 ping,按 IP 组织

  • Apache mod_evasive 是否具有与 Lighttpd mod_evasive 相同的功能?[复制]

  • 如何强化 Windows Server 2008 中的 TCP/IP 堆栈?[复制]

  • 保护托管的 Windows 2008 服务器免受 DDOS 攻击

  • 识别 Windows 2008 服务器上的 DDOS 攻击 [重复]

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