Hi Banfa,
Indeed, DoS attack prevention would be much efficient if handled by firewalls and routers. However this does not devoid my attempt to do it server-side. One reason is : Are we sure if we deploy a custom server application and host it at some hosting provider, that this latter has mechanism in place to prevent DoS ?
I do'nt think so.
In term of solution, no it should not be so hard. To discern the legitemate one from the other 9, I can send a puzzle and expect the right solution in the incoming packet before accepting the connection at the application layer.
At the transport layer I can think of measuring the rate of incoming connection requests per incoming address : a DoS attack is most likely to come from one or handful places. Thus a local cache recording thing will do the job. Concerning the distributed attack, I am not concerned with since it is very rare case : for example the US gouvernment did it to shutdown Al Jazeera site on the occasion of a certain publication of a sensible matter.
I asked the question, because, from the one side I am trying to finalize a high-performant NIO framework in C++ and from the other side wondering if there other people who already analyzed/found DoS prevention code in open source appliaction servers like BlazeDS, etc..
Good day.