How protect from DDOS attack?

view story

http://serverfault.com – I have many requests with refferer like alexa.com google.com and etc. to main and couple another pages of site. Line from access.log - - [11/Jan/2013:02:30:30 +0400] "GET /topic?criteria=%&x=0&y=0&pageNo=34 HTTP/1.1" 403 571 "http://www.alexa.com/" "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.1)" I use iptables to block ips by hand but I found script (D)DoS Deflate and added it to cron but It's gave any results. After that I add to nginx config next if ($http_referer ~* "ask\.com") { return 403; } .... It's working and I can open site now. But I think i (HowTos)