Page 1 of 1
Youtube Monitoring
Posted: Wed Jul 25, 2018 3:51 pm
by Leinadmontilla
Hi Mate,
Im planning to monitor the traffic of youtube using the code below but unfortunately, it's not working.
/ip firewall layer7-protocol
Add name = youtube1 regexp="^.+(youtube.com).\$"
/ip firewall mangle
Add action = mark-packet chain = forward layer7-protocol = youtube1 new-packet-mark = youtube-packet
/queue tree
Add name= "Youtube Monitoring" packet-mark = youtube-packet parent = global
Any idea why its not working or whats wrong on my code?
Re: Youtube Monitoring
Posted: Wed Jul 25, 2018 4:13 pm
by mkx
Layer7 protocol filters peek into passing packets. The problem with the method is that in modern times, almost all browsing is using SSL/TLS encryption, including youtube. As the contents of connection is encrypted, layer7-protocol can not easily see URL and hence the whole concept doesn't work.
Re: Youtube Monitoring
Posted: Wed Jul 25, 2018 10:56 pm
by sindy
Even more bad news related in
this topic.
Re: Youtube Monitoring
Posted: Thu Jul 26, 2018 5:54 am
by Leinadmontilla
Mkx,
So there's no way to monitor the traffic of youtube?
Re: Youtube Monitoring
Posted: Thu Jul 26, 2018 6:40 am
by vecernik87
Monitor as in "see what are people watching" - absolutely not.
Monitor as in "see how much data is going to/from youtube" - also not really:
At the moment, there is no way to reliably detect all youtube traffic by content of packet. You can block youtube by blocking youtube IP addresses (and instead of IP you can use hostname which will be automatically resolved by DNS to all currently available IP addresses). that will block clients from accessing youtube user interface, therefore users will be unable to play any video.
However, if you want just monitoring, not blocking, you must monitor both user interface and video delivery. Unfortunately, for video delivery youtube use "*.googlevideo.com" (for example
https://r5---sn-uxanug5-hxay.googlevideo.com) which can't be added to address lists because wildcards cant be resolved to IP (infinite amount of combinations in wildcard). You would have to speficy each domain/ip address which youtube use and thats not really possible. You will either not pick up all addresses or you will pick more than just youtube. Therefore it is unreliable - any results will not correspond with reality and there is no way to say how big the error is. It can be few percents, it can be hundreds or thousands of percents
Re: Youtube Monitoring
Posted: Wed Aug 01, 2018 2:33 pm
by Leinadmontilla
Since monitor the traffic of youtube is impossible, clip the bw for youtube is also impossible ryt?
Re: Youtube Monitoring
Posted: Wed Aug 01, 2018 2:40 pm
by sindy
Ryt. To do anything with the traffic (block, prioritize, restrict bw), you first need to identify it reliably, and that's where the problem is.
Re: Youtube Monitoring
Posted: Wed Aug 01, 2018 3:12 pm
by WirtelPL
What do you mean by "monitoring"? A bit about limiting the band for YT is here:
https://www.youtube.com/watch?v=LSjmmv3Lsdg, about monitoring network traffic here:
https://www.youtube.com/watch?v=1ykAtUYKSTc and here:
https://www.youtube.com/watch?v=JvQlanVV8qw.
Re: Youtube Monitoring
Posted: Thu Aug 02, 2018 12:10 am
by Leinadmontilla
Monitor and limit the bw for yt. I already seen that tuts but its not working for me. Did you tried that?
Re: Youtube Monitoring
Posted: Thu Aug 02, 2018 10:12 am
by WirtelPL
I already seen that tuts but its not working for me.
Do you have "fasttrack" enabled? You should turn it off.
Re: Youtube Monitoring
Posted: Thu Aug 02, 2018 5:16 pm
by Leinadmontilla
I already seen that tuts but its not working for me.
Do you have "fasttrack" enabled? You should turn it off.
Fasttrack was disabled. By the way, i already resolved my issue. I used dynamic address list but i will test it if this is stable. Thanks for your reply assistance.
Re: Youtube Monitoring
Posted: Thu Aug 02, 2018 5:31 pm
by sindy
Do you realize that a multitude of other google services are provided from the same servers (google cache) like youtube, so although your address-lists refer only to the domain names used by youtube, limiting traffic for the ip numbers on these lists may also limit google earth & maps (and google search of course but it should not be a big deal)?
Re: Youtube Monitoring
Posted: Fri Aug 03, 2018 10:37 am
by Leinadmontilla
Do you realize that a multitude of other google services are provided from the same servers (google cache) like youtube, so although your address-lists refer only to the domain names used by youtube, limiting traffic for the ip numbers on these lists may also limit google earth & maps (and google search of course but it should not be a big deal)?
My dynamic address list is under of content = youtube.com, google didnt affect on this script
Re: Youtube Monitoring
Posted: Fri Aug 03, 2018 11:33 am
by sindy
not only content=youtube.com but also content=googlevideo.com and the other domain names I suppose...? But in that case, the address list is not necessary in fact.