shadowsocks-nodejs icon indicating copy to clipboard operation
shadowsocks-nodejs copied to clipboard

How to limit one port only accept one connection?

Open travelbob2005 opened this issue 10 years ago • 3 comments

How to limit one port only accept one shadowsocks connection?

travelbob2005 avatar Jul 15 '15 01:07 travelbob2005

I have the exact same need. In the wiki I have found this

  1. Limit connections
iptables -A INPUT -p tcp --syn --dport ${SHADOWSOCKS_PORT} -m connlimit --connlimit-above >32 -j REJECT --reject-with tcp-reset

But it doesn't work for me. I have change the ${SHADOWSOCKS_PORT} to one of my port 8334 and change 32 to 1 because I want to limit this port with only one connection.

iptables -A INPUT -p tcp --syn --dport 8334 -m connlimit --connlimit-above 1 -j REJECT --reject-with tcp-reset

but it doesn't work for me

WalkerWalker avatar Mar 18 '17 09:03 WalkerWalker

did anyone find any working solution for this problem? i have the same problem and i couldn't find any solution for that!

itsOmidKarami avatar Jun 15 '18 15:06 itsOmidKarami

this project was discarded. Please use other versions of shadowsocks: https://github.com/shadowsocks/

chenshaoju avatar Jun 15 '18 15:06 chenshaoju