DDoS attack on ExpressJS


In the last days I am receiving DDoS attacks on my VPS, I have an API with ExpressJS, I have added the ddos module that blocks when it receives requests from the same IP but I keep receiving requests from different IPs and I do not know how to stop it.

The requests are like the following

0|SERVIDOR  | ::ffff: - - [27/Sep/2018:18:41:16 +0000] "GET http://www.jueaivip.cn HTTP/1.1" 403 -
0|SERVIDOR  | ::ffff: - - [27/Sep/2018:18:41:16 +0000] "GET http://www.szgt17.com/ HTTP/1.1" 403 -

These URLs do not even exist on my server.

Valid requests are like this:

0|SERVIDOR  | ::ffff: - - [27/Sep/2018:18:41:16 +0000] "GET /api/get/343304344 HTTP/1.1" 500 -
asked by Sergio Catalan 27.09.2018 в 20:59

1 answer


There is a very useful "tool" or "service" for your case: CloudFlare

You can create a totally free account for your API , in this way you also protect the original IP address of your server, since CloudFlare works as proxy intermediary. p>     

answered by 13.12.2018 в 08:48