Protecting against DoS and DDoS attacks