Traffic control tool using cbq, tc and iproute for CentOS and Ubuntu. cbq don't support inbound traffic control, but qos-control.pl supported inbound traffic control using htb and ifb. You can control traffic easily and safely.
[In Japanese] Plese see more details
Support other distri like Fedora, Debian and so on. Wellcome Pull-Request.
$ git clone https://github.com/matsumoto-r/qos-control.git
$ cd qos-control
$ ./setup.sh
$ ./qos-control.pl -h
usage: ./qos-control.pl --method|-m METHOD --ip|-i SERVER_IP --direction|-d DIRECTION --traffic|-t BANDWIDTH [--eth|-e INTREFACE] [--protocol|-p PROTOCOL] [--src|-s SRC_IP]
-m, --method set method (view clear set)
-i, --ip set server ip
-d, --direction set direction (out in)
-t, --traffic set traffic bandwidth Mbps (1 2 4 8 16)
-e, --eth set interface (eth0 eth1 eth2 eth3)
-p, --protocol set protocol (https smtp ssh imaps imap all ftp http pop3 pop3s)
-s, --src set src ip
-c, --clsid set clsid only clear method
-h, --help display this help and exit
-v, --version display version and exit
$ ./qos-control.pl --method view --ip 172.16.71.46
nothing
$ sudo ./qos-control.pl -i 172.16.71.46 -m set -p http -d out -t 16
*** old [172.16.71.46] settings ***
--------------------------
nothing
--------------------------
Setting ... OK
*** current [172.16.71.46] settings ***
------------------------------
CLSID->6067 interface->eth0 direction->out bandwidth->16Mbps server_ip_port>172.16.71.46:80 src_ip->nothing
------------------------------
$ sudo ./qos-control.pl -i 172.16.71.46 -m view
CLSID->6067 interface->eth0 direction->out bandwidth->16Mbps server_ip_port>172.16.71.46:80 src_ip->nothing
$ sudo ./qos-control.pl -i 172.16.71.46 -m clear -c 6067
*** old [172.16.71.46] settings ***
--------------------------
CLSID->6067 interface->eth0 direction->out bandwidth->16Mbps server_ip_port>172.16.71.46:80 src_ip->nothing
--------------------------
Setting Clear ... OK
*** current [172.16.71.46] settings ***
--------------------------
nothing
--------------------------