Page 1 of 1

Mark Routing YouTube Packet

Posted: Sun Sep 16, 2018 11:29 am
by network99
hello all

i have a problem to mark routing on www.youtube.com

my rule :
/ip firewall layer7-protocol
add name=YouTube regexp="^.+(youtube).*$"

/ip firewall mangle
add action=mark-routing chain=prerouting layer7-protocol=YouTube \
    new-routing-mark=vpn passthrough=no
    
/ip route
add distance=1 gateway=192.168.11.1 routing-mark=vpn  

Re: Mark Routing YouTube Packet

Posted: Mon Sep 17, 2018 2:08 pm
by network99
please help me

Re: Mark Routing YouTube Packet

Posted: Tue Sep 18, 2018 4:05 pm
by plisken
Hello, see here the layer7 protocols:

https://www.wirelessinfo.be/mikrotik-layer7-codes/

Re: Mark Routing YouTube Packet

Posted: Tue Sep 18, 2018 8:10 pm
by Sob
It won't be much help for routing purposes. Connections have to be routed from very first packet and there's nothing identifiable in SYN packets.

Basically there are two options:

a) Find networks used by Google and route them as whole, but it will include more than just Youtube.
b) Do some trick with address list, where you can add addresses found by L7. Then mark routing based on this list. It won't work for first connection, only subsequent ones.