shadowsocks / shadowsocks-nodejs

https://github.com/shadowsocks/shadowsocks
Other
1.25k stars 724 forks source link

How to limit one port only accept one connection? #119

Open travelbob2005 opened 9 years ago

travelbob2005 commented 9 years ago

How to limit one port only accept one shadowsocks connection?

WalkerWalker commented 7 years ago

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

itsOmidKarami commented 6 years ago

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

chenshaoju commented 6 years ago

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