Note: SSR Single Port Blocked, A Solution (Not Solved)

Published on

Original language: Chinese . AI translations: English , Japanese .


My “little airplane” proxy client stopped working. I tried V2Ray today. Same server, but V2Ray worked.
My guess is the port got blocked. I switched to another port, and it worked again.

While browsing Twitter, I found it’s not an isolated case. Others had the same issue.


Someone in the comments provided a solution:
Feel the Bern – China Edition
使用 Fail2ban 封殺主動探測 IP

I haven’t tried it yet. Leaving it here.


Those tutorials are for RedHat. I found another Fail2ban tutorial: Use Fail2ban to Secure Your Server
My first test server failed. The second one seemed to work (but I still couldn’t fix the first one later; I’m too noob).


Tried again and realized I missed filter = ssr.
Also need to create /var/log/ssr.log and set logpath = /var/log/ssr.log.

Summary: add these lines to /etc/fail2ban/jail.local:

[ssr]
enabled = true
filter = ssr
logpath = /var/log/ssr.log
port = 0:65535
maxretry = 1
bantime = 86400
findtime = 300

Other parts are similar to the Fail2ban tutorial.


Common commands:

Terminal window
fail2baj-client status
fail2baj-client status ssr
fail2baj-client reload

2019/11/21 update
The port got blocked again, switched to another port.
This fail2ban setup probably still isn’t right… (too little skill)


2019/11/27 update
ssr and v2ray are both unstable. Whether they work depends entirely on the “wall country’s mood”. Cultural confidence, cultural confidence.