Too many random automatic requests are executed, even if I host the nodejs server, they try to use cgi and phpmyadmin / wordpress configs. You can simply use the basic redis-throttle [https://npmjs.org/package/redis-throttle] methods for your NodeJS and ssh fail2ban server to protect yourself from simple DoS attacks.
Automated queries cannot be harmful unless NodeJS or libraries have known flaws, so you should always enter and verify security on the entire server. You do not have to worry if you code well. (Do not clear errors to users, disinfect input, etc.)
You can register your 401 and 404 per week and filter the most common ones through your LB. Hunting for IP addresses and sources will not help you if you are not a Hollywood producer or are struggling with terrorists, since the yoır problem is not so important, and, most importantly, these requests are mainly related to botnets.
source share