Scenario for .well-known requests of Synapse Matrix servers #1206
+92
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello crowdsecurity community,
not sure if this is worthwhile for Hub or if it is a good idea, but here goes.
The reason for this scenario is based on my decision to have a matrix test server about a year ago and throw it away after about a week.
Since then, I have been getting about 1.2-1.5k requests per day on
/.well-known/matrix/server
from servers running the matrix server, filling logfiles, tying up resources, even if it is just for a simple 404 with no way to turn it off.As it turns out you have to leave all rooms before deleting your server. There also seems to be no way to tell remote servers to back-off on 404 status codes and my attempts to add a
/.well-known/matrix/server
pointing to the official server or an unknwon server did not reduce the requests in any way. So I, and anyone who works or owns the domain after me, will have to live with it.One user posted some statistics detailing ~71k requests for the last two months and how to add it to the Cloudflare WAF to prevent further requests.
The scenario bans servers issuing those requests. I chose
trigger
because one requests is enough to identify those servers and there is no other reason to be on/.well-known/matrix/server
, while/.well-known/matrix/client
and/.well-known/matrix/support
are still ok, as clients and contact information could still be request details for other reasons. I am not sure about the"http:dos"
behaviour and theattack.T1498
classification as it is more like a DDOS, as it involves all servers that did learn to know you on server/channel join.Maybe this scenario is too specific or not really suited for the Hub. Just trying to learn and get into crowdsec.