Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Problem: We are hosting an application on remote server. We need to test it with a limited network bandwidth (for users with bad Internet access).

Question: Can I limit my internet bandwidth? For instance: 128 KB per second.

share|improve this question
up vote 38 down vote accepted

You can throttle the network bandwidth on the interface using the command called tc Man page available at http://linux.die.net/man/8/tc

For a simple script, try wondershaper.

share|improve this answer
Link to atmail.com prompt for username/password authorisation for me... :( – Ash Jun 15 '14 at 1:25
You can get to the atmail content here: web.archive.org/web/20130719031908/http://atmail.com/kb/2009/… – Tom Saleeba May 7 '15 at 6:55
better late than never if your gonna use a busybox router a better method is the tc command, you can check out mark's post here mark.koli.ch/… the openvz wiki has more examples openvz.org/Traffic_shaping_with_tc – wiak Jul 31 '15 at 4:08
looks like it is also possible to limit bandwidth with iptables (you can edit the answer if needed): serverfault.com/questions/52027/… – baptx Apr 27 at 21:29

As noted in previous answer, wondershaper does the job easily. I include the information from above link by Jwalanta Shrestha

apt-get install wondershaper

wondershaper - An easy tool to limit bandwidth of a particular interface.

$ sudo wondershaper {interface} {down} {up}

the {down} and {up} are bandwidth in kpbs

So for example if you want to limit the bandwidth of interface eth1 to 256kbps uplink and 128kbps downlink,

$ sudo wondershaper eth1 256 128

To clear the limit,

$ sudo wondershaper clear eth1 
share|improve this answer
Ideally, you should have just edited the original answer instead of adding a new one. This is the standard policy. Anyways, +1 for your answer, for it does add information to the answers. – shivams Jun 11 '15 at 16:22
This is very useful if you are tethering mobile data and have a fair-use limit (and you have to buy new bundles after, the case for Lycamobile). On video streaming websites like YouTube, the whole video is directly loaded if you have enough bandwidth. If you limit the bandwidth, the video will automatically switch to a low resolution and download what you are watching only, which saves data if you don't want to watch everything. – baptx Apr 27 at 21:10

Limiting network resources based on some criterias is the subject of QoS. There are several different ways to control user traffic on Linux systems.

There is a good How-to about advanced routing techniques and traffic control on Linux by Bert Hubert.

share|improve this answer
Were you referring to a particular section in it? – rogerdpack Apr 23 '15 at 16:21
If you don't wanna change system settings, just install squid3 proxy then set your "limited" aplication through proxy. For cli app's you can set torsocks or proxychains, and for heavy GUI app's you can also install Fiddler mono, so yes... there a are some ways to control everything :) – erm3nda Dec 22 '15 at 16:27

If you already have an Apache setup somewhere, you can use mod_bw, which also works on proxied connections (i.e. Apache just forwards everything to the proper server, but slows the responses down.)

share|improve this answer

Dummynet does what you want and more, you can even control the latency, random packet loss and lots more.

share|improve this answer

If your application is exposed via http/https then you can use firefox-throttle else use NIST which is a network emulation package.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.