【问题标题】:iptables - simulate packet loss for a specific ip addressiptables - 模拟特定 IP 地址的数据包丢失
【发布时间】:2015-03-18 21:53:23
【问题描述】:

我读过可以帮助模拟丢包的统计模块:

iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP

但是否可以不针对所有传入连接,而是针对特定 IP 地址执行此操作?

【问题讨论】:

    标签: networking iptables packet-loss


    【解决方案1】:

    您可以在规则中指定源IP地址:

    iptables -A INPUT -s <SOURCE_IP_ADDRESS> -m statistic --mode random --probability 0.1 -j DROP
    

    【讨论】:

      猜你喜欢
      • 2015-06-22
      • 2017-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-19
      • 2020-05-24
      • 2011-08-21
      • 2011-07-28
      相关资源
      最近更新 更多