How to prevent DOS attacks on my http server which written in node.js?

后端 未结 3 2119
醉酒成梦
醉酒成梦 2021-02-10 11:36

using node.js, the net module for building a tcp server which can hande http requests.

I would like to prevent dos attacks so what I have done is somthing like this:

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-10 12:24

    A DOS attack really shouldn't be handled by your HTTP server. Once a request has reached it the attacker has 'won' by taking up a connection (no matter how short). Even if they are short they can just slam it with thousands/sec and prevent anyone else from connecting. Also, they might not attempt to 'connect' via TCP and just flood the server with all sorts of requests.

    Block/detect DOS attacks at a lower level or via a firewall, which I'm sure many software and hardware versions support some basic types of DOS detection and prevention.

提交回复
热议问题