网上查了用iptables这样搞
/sbin/iptables -I INPUT -p tcp --syn --dport xxxx -m connlimit --connlimit-above 1 --connlimit-mask 0 -j DROP
但是测试还是两个终端可以连(300g流量不够用)

nginx好像有这种能力,有用iptables实现过得mjj吗