1

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?

2

Does ndpi-netfilter handle QUIC protocol used by Chrome to load youtube videos ? You can try to block UDP/443 in iptables output chain to force Chrome to use TCP/443 and see if it solve your issue.

1

I found that YouTube uses the QUIC protocol on Google Chrome browser.

I successfully solved my problem by inserting QUIC Drop rule to the iptables.

$ sudo iptables -I POSTROUTING -m ndpi --quic -j DROP

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.