Community discussions

MikroTik App
 
Leinadmontilla
just joined
Topic Author
Posts: 12
Joined: Sat Jul 21, 2018 8:39 am

Youtube Monitoring

Wed Jul 25, 2018 3:51 pm

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?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13045
Joined: Thu Mar 03, 2016 10:23 pm

Re: Youtube Monitoring

Wed Jul 25, 2018 4:13 pm

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.
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11224
Joined: Mon Dec 04, 2017 9:19 pm

Re: Youtube Monitoring

Wed Jul 25, 2018 10:56 pm

Even more bad news related in this topic.
 
Leinadmontilla
just joined
Topic Author
Posts: 12
Joined: Sat Jul 21, 2018 8:39 am

Re: Youtube Monitoring

Thu Jul 26, 2018 5:54 am

Mkx,

So there's no way to monitor the traffic of youtube?
 
User avatar
vecernik87
Forum Veteran
Forum Veteran
Posts: 891
Joined: Fri Nov 10, 2017 8:19 am

Re: Youtube Monitoring

Thu Jul 26, 2018 6:40 am

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
 
Leinadmontilla
just joined
Topic Author
Posts: 12
Joined: Sat Jul 21, 2018 8:39 am

Re: Youtube Monitoring

Wed Aug 01, 2018 2:33 pm

Since monitor the traffic of youtube is impossible, clip the bw for youtube is also impossible ryt?
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11224
Joined: Mon Dec 04, 2017 9:19 pm

Re: Youtube Monitoring

Wed Aug 01, 2018 2:40 pm

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.
 
User avatar
WirtelPL
newbie
Posts: 34
Joined: Sat Nov 11, 2017 11:22 am
Location: Poland

Re: Youtube Monitoring

Wed Aug 01, 2018 3:12 pm

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.
 
Leinadmontilla
just joined
Topic Author
Posts: 12
Joined: Sat Jul 21, 2018 8:39 am

Re: Youtube Monitoring

Thu Aug 02, 2018 12:10 am

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.
Monitor and limit the bw for yt. I already seen that tuts but its not working for me. Did you tried that?
 
User avatar
WirtelPL
newbie
Posts: 34
Joined: Sat Nov 11, 2017 11:22 am
Location: Poland

Re: Youtube Monitoring

Thu Aug 02, 2018 10:12 am

I already seen that tuts but its not working for me.
Do you have "fasttrack" enabled? You should turn it off.
 
Leinadmontilla
just joined
Topic Author
Posts: 12
Joined: Sat Jul 21, 2018 8:39 am

Re: Youtube Monitoring

Thu Aug 02, 2018 5:16 pm

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.
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11224
Joined: Mon Dec 04, 2017 9:19 pm

Re: Youtube Monitoring

Thu Aug 02, 2018 5:31 pm

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)?
 
Leinadmontilla
just joined
Topic Author
Posts: 12
Joined: Sat Jul 21, 2018 8:39 am

Re: Youtube Monitoring

Fri Aug 03, 2018 10:37 am

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 😊
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11224
Joined: Mon Dec 04, 2017 9:19 pm

Re: Youtube Monitoring

Fri Aug 03, 2018 11:33 am

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.

Who is online

Users browsing this forum: No registered users and 45 guests