I am currently having problems with my server. Its beeing Ddosed. I have and vps with Centos 64bit. The attack I want to block is udp flood. I was trying to do something like this: iptables -I INPUT -p udp --dport 123 -m limit --limit 40/s -j DROP but instead of blocking certain hosts it blocks the whole port and on attack its unreachable. I need you to help to limit packets per host.
I would recommend you to go for a firewall like csf or apf this will protect
from ddos. This is good compared to traditional ip tables.
Hope this solves your issue ;)
Thank your for your answer. However I tried to install them both, however, no success. Couldnt configure them properly. I think that I am on openvz might be the problem. Besides I have been trying to use recent module in iptables with hitcount, but it throw the following error: iptables: Unknown error 18446744073709551615 .
Originally Posted by davidanand
Please help me somehow limit packets per connection.
what your distro and kernel version ?
you cannot (from the nature of UDP) avoid a udp ddos to overflow your link, making your server unreachable, with firewall rules on your server.
if you can, you should block/limit specific traffic except for authorized addresses whose traffic should be priorized at the highest level (with the biggest bandwidth) possible, which would be your ISP.
To get more information about how DOS/DDOS work, look up the wiki pages.