I have ndpi-netfilter
installed on Ubuntu and I need to shape the youtube traffic to 100kbps using tc module. I classify all youtube traffic to a one class through the iptables and apply tc class to shape the traffic.
It works fine when I use Firefox, but when I access youtube from Google Chrome, it doesn't work.
Bellow, are the rules and commands for ndpi-netfilter
and iptables
.
$ sudo tc qdisc add dev eth1 root handle 1: htb default 10
$ sudo tc class add dev eth1 parent 1: classid 1:1 htb rate 1Mbps
$ sudo tc class add dev eth1 parent 1:1 classid 1:10 htb rate 100kbps ceil 100kbps prio 10
$ sudo iptables -t mangle -A POSTROUTING -s 192.168.200.27 -m ndpi --youtube -j CLASSIFY --set-class 1:10
$ sudo iptables -t mangle -A POSTROUTING -d 192.168.200.27 -m ndpi --youtube -j CLASSIFY --set-class 1:10
Anyone knows to fix this?