wshaper is a very easy to use bandwidth shaping tool. It allows to limit bandwith on a desired networking interface.
Download page:
http://lartc.org/wondershaper/
To use wshaper, download the most recent version (e.g. 1.1a), untar and edit the file
wshaper. The following is an example configuration to limit bandwidth going through port 22 (ssh):
DOWNLINK=800
UPLINK=220
DEV=eth0
# low priority source netmasks
NOPRIOHOSTSRC=80
# low priority destination netmasks
NOPRIOHOSTDST=255.255.0.0
# low priority source ports
NOPRIOPORTSRC=22
# low priority destination ports
NOPRIOPORTDST=22
# Now remove the following two lines :-)
#echo Please read the documentation in 'README' first :-)
#exit
First you set your speed limit for the interface (DEV). Then some information on which port to limit and what netmask. In the end, comment the 2 lines where it says: "Now remove the following two lines" in order for the program to work.
This has been tested on openSUSE 11.1 but wshaper should be included in debian sitributions as well.
Further information:
-
http://www.ruwenzori.net/code/wondershaper/wondershaper.jml