Ubuntu Linux throttle/limit your maximum upload speed (e.g. for DSL)
7
Mar0
Mar0
Here is how you limit upload speed on a Ubuntu PC or server (you need iptables2 for the tc command):
sudo tc qdisc replace dev eth0 root tbf rate 400kbit latency 50ms burst 1540
Change eth0 to your external interface (the one with the public IP address), and 400kbit to your upload speed limit.
Note that this is in kilobits and not kilobytes, so multiply Kbps by 8 to get kbps (50Kbps * 8 = 400kbps). This also works if this Ubuntu PC is working as a home router (whole home network external upload will be limited).
You need to rerun this command after rebooting, or add it to an init script.
I am not 100% what latency and burst are, but it seems they can be the same for all upload limits under a few mbps. These parameters are described here.