需要测试使用 UDP 端口范围从 5000 到 60,000 英寸的应用程序。我想测试端口的边界值条件。所以我想阻止从 5000 到 59999 的 UDP 端口。
最佳答案
使用 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
关于linux - 如何在 linux RHEL7 中阻止 udp 端口范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39200461/