How to prevent DoS and DDoS attacks