2

I have been experiencing DDoS attacks on my web server, with some IPs using more than 50 Mbit/s.

Now if I would like to limit the max bandwidth usage for each unique IP to, lets say, 1 Mbit/s, what would be the best approach?

user76231
  • 33
  • 2
  • 4
  • It will be very hard to limit inbound bandwidth without discussing it with your ISP. You should be able to control the outbound bandwidth fully though. – Slartibartfast Mar 29 '11 at 04:46

3 Answers3

1

Try to see documentation about iptables there should be some config about caping bandwith.

But on the other end you should try to configure iptables to ban bad IPs so it will clear the problem and also you will be able to report IPs and time of the attack to authorities.

Gopoi
  • 547
  • 5
  • 21
0

These links will help you to limit bandwidth consumption per domain in an apache server

http://help.directadmin.com/item.php?id=339

http://svn.apache.org/repos/asf/httpd/sandbox/mod_bw/mod_bw.txt

Suku
  • 2,036
  • 13
  • 15
0

You can do something better with iptables. http://www.zoominternet.net/~lazydog/iptables-tutorial.html#HASHLIMITMATCH

My suggestion would be to stop responding (for X time) to any source IP address that make more then X request in a X period of time. What you will need to set X to will depend on the DDOS attack. You want to block the attackers, but not normal traffic.

Porch
  • 680
  • 5
  • 12