Index / Questions / How do you limit network bandwidth per c

How do you limit network bandwidth per client IP address?

Answer

With iptables and tc, marking traffic and then shaping it per address. I reached for this after an alert about excessive bandwidth usage, where the standard incident response of isolating and shutting down the source turned out to be the wrong tool: the traffic was legitimate, it just needed a ceiling rather than an axe.

Sources