This manual is old, please see here for a better way to get the same result.
CBQ is a powerful tool, which lets you limit the networking bandwidth on specific TCP/UDP ports.
CBQ website: http://sourceforge.net/projects/cbqinit/
CBQ webinterface written in PHP: http://sourceforge.net/projects/webcbq
- Download cbq (cbq.init-v0.7.3), "chmod +x" it and save in "/sbin/cbq.init"
- Download the webinterface and configure webcqb in the file html/config.php
- Add an Apache configuration (virtual host) for the new website.
- Install "iproute2" (is part of every Linux distribution and will most likely already be installed)
- Make sure "sudo" is installed (should be part of your Linux distribution)
- Edit /etc/sudoers with "visudo", follow the steps of INSTALL.txt from webcbq
Edit /sbin/cbq.init (configuration section):
- Check the command locations (I had to change the "tc"-path to "/usr/sbin/tc", everything else was fine)
- Set the CBQ_PATH var to where your cbq folder of webcbq is ../html/cbq/
My "cbq"-folder in the webcbq directory contains only one file:
As you see, this script limits the bandwidth going from my local machine (22.214.171.124) to my remote server (126.96.36.199). It is useful because I only have an adsl connection - doing an upload without bandwidth limitation would close my connection for other traffic. With the limitation, I can minimize the upload and work on the internet at the same time.
Start cbq with: /sbin/cbq.init start
and stop with /sbin/cbq.init stop
. You can ignore the find-command warning: "find: warning: you have specified the -maxdepth option after a non-option argument...".