I'm kind of new to Linux (but learning) so bare with me if I say something stupid :P.

I'm currently running an Ubuntu fileserver which automates a whole bunch of downloading tasks. At present it is set to throttle downloads at certain times so I don't impact too much on casual browsing iPlayer etc during peak times. But this is not ideal.

I was wondering if it is possible to limit overall system bandwidth usage based on sniffing packets from other systems on the LAN that are going to/from specific URLS (e.g. iplayer)

If somebody could point me in the direction of the relevant tools, I'm happy to do the research myself. Just right now I wouldn't know where to start...

1 Answer 1


There are a couple of approaches that come to mind.

Method #1 - iptables

Yes it is possible through iptables to throttle traffic based on either the TCP port(s) it's making use of or the source IP addresses that it's originating from. I would need to know specifics in order to assist in crafting actual rules for your situation.

Method #2 - traffic shaping QoS

The other approach is to throttle specific applications using tools such as Wondershaper or Trickle.


To throttle the upload/download speed to 20Kbps.

$ trickle -d 20 wget -c http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

You can also set these independently in the above scenario. You can also make these settings the default like so.

$ trickled -d 50 -u 10

You can also use Wondershaper to control the bandwidth at the network level. For example say I want to throttle my eth1 device.

$ sudo wondershaper eth1 1024 256

This will give me a Download speed of 1024 Kbits and 256 Kbits Upload. Which are 128KB and 16KB.

When you want to release the caps.

$ sudo wondershaper clear eth1

These are pretty capable tools so this is just meant to show you the potential.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .