Closed jakubgs closed 1 year ago
I made two small changes thinking it might help:
The second one was just to figure out what's happening.
We can see the attack in the Cloudflare dashboard:
Specifically here:
Seems to be mostly IP 91.241.49.14
.
I have added the 91.241.49.14
IP to the sshguard4
IPSet:
admin@node-01.do-ams3.todo.office:~ % sudo ipset add sshguard4 91.241.49.14
admin@node-01.do-ams3.todo.office:~ % sudo ipset list sshguard4 | grep 91.241.49.14
91.241.49.14
There is a clear spike:
Seems like the main source is UK and Turkey. Weird:
Looks like we can't block by IP on the CloudFlare firewall because they move it to a separate service:
Which of course has its own separate pricing.
But I can block it probably using WAF:
Zone-level Web Application Firewall (WAF) detects and mitigates malicious requests across all traffic under this zone.
Which does a JS challenge, which we already use for some sites:
Enabled it for https://notes.status.im/:
Lets see what that does:
At least now the process starts normally:
admin@node-01.do-ams3.todo.office:/docker/hackmd % tail -n1 /var/log/docker/hackmd-app/docker.log
2023-05-30T22:28:01.638057+00:00 docker/hackmd-app[1220993]: 2023-05-30T22:28:01.635Z info: #011HTTP Server listening at 0.0.0.0:3001
We can see the effect on the fresh new Nginx metrics for todo.office
:
There is no option for upgrading Phantom.JS separately as it has been discontinued:
And CodiMD - open source HackMD - that we use is almost never updated. It is what it is.
Seems fine so far:
I'm going to leave the DDOS protection using a JS challenge enabled for now, at least until people complain it's annoying: https://github.com/status-im/infra-office/blob/c3fb333df6cfabed9b88f35ed3e3a5f69d171b7b/firewall.tf#L1-L7
It appears someone is attacking our HackMD instance:
The container is restarting due to the following error: