Help with limiting usage of youtube videos bandwidth to save quota

hello,

i tried with these commands but it doesn't work

tc qdisc del dev br-lan root
tc qdisc add dev br-lan root handle 1: htb
tc class add dev br-lan root htb rate 15800kbit
tc class add dev br-lan parent 1: classid 1:a  htb rate 800kbit prio 0
tc class add dev br-lan parent 1: classid 1:b  htb rate 13000kbit prio 1
tc class add dev br-lan parent 1: classid 1:c  htb rate 2000kbit prio 2
tc qdisc add dev br-lan parent 1:a cake
tc qdisc add dev br-lan parent 1:b cake
tc qdisc add dev br-lan parent 1:c cake
tc filter add dev br-lan  protocol ip parent 1: prio 2 handle 3 fw flowid 1:c
iptables -t mangle -A POSTROUTING  -m set  --match-set videos src,dst  -j MARK --set
-mark 3

/etc/dnsmasq.conf

# Youtube
ipset=/googlevideo.com/*.googlevideo.com/videos

ipset

ipset create videos hash:ip

There might be some more sites you need to try to limit.

it works now thanks, i have another question how can i capture these site with tcpdump
or how to enable dns lookup with tcpdump ? i want to able to apply same thing for other site

Most sites' DNSes are know, you just have to Google them.
If you want to see what DNS calls are being made, you could set up your own DNS, inside or outside your LAN.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.