利用 iptables 命令限制单个端口的并发连接数

 iptables -I INPUT -p tcp --dport 11251:11300 -m connlimit --connlimit-above 10 -j REJECT

以上代码意思: 在INPUT链顶部插入一条规则,适合 tcp 协议,目标端口为 11251 到 11300 的所有端口, 匹配连接数量限制,限制上限为 10 个,超过的10个就拒绝连接

posted on 2015-10-23 16:37  震撼起飞  阅读(1763)  评论(0编辑  收藏  举报

导航