【问题标题】:How to block udp ports range in linux RHEL7如何在 Linux RHEL7 中阻止 udp 端口​​范围
【发布时间】:2016-08-29 07:13:53
【问题描述】:

需要测试使用 UDP 端口范围从 5000 到 60,000 英寸的应用程序。我想测试端口的边界值条件。所以我想阻止 UDP 端口范围从 5000 到 59999。

【问题讨论】:

    标签: linux udp port


    【解决方案1】:

    使用 iptables:

    iptables -A INPUT -p udp --dport 5000:59999 -j DROP
    

    或者,更好,

    iptables -A INPUT -p udp --dport 5000:59999 -j REJECT --reject-with icmp-port-unreachable
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-14
      • 1970-01-01
      • 1970-01-01
      • 2015-04-18
      • 1970-01-01
      相关资源
      最近更新 更多