M
M
maxkzt2017-10-16 22:02:20
Mikrotik
maxkzt, 2017-10-16 22:02:20

Layer7 mikrotik redirect to another page?

Welcome all.
There is such a situation mikrotik rb3011
Blocking social networks and video resources via Layer7 is configured
Blocking requests both via http and https config
piece

/ip firewall layer7-protocol
add comment="Video Network" name=Video regexp="^.+(youtube.com|www.youtube.com|m.youtube.com|ytimg.com|s.ytimg.com|ytimg .l.google.com|youtube.lyoutu.be).*\$"
add comment="Social Network" name=Social regexp="^.+(ok.ru|odnoklassniki|ok|vk|my.mail.ru |facebook).*\$"
/ip firewall filter
add action=drop chain=forward comment="Drop Video Services" disabled=yes layer7-protocol=Video
add action=drop chain=forward comment="Drop SocialNetwork" disabled=yes layer7-protocol=Social

Webproxy is not deployed.
What needs to be done so that requests that fall under the rules of layer7 (Video and Social) are
redirected to a page, for example, that access is denied, or to another host.
Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2017-10-17
@SuNbka

/ip firewall filter
add action= add _ to address list chain=forward comment="Drop Video Services" disabled=yes layer7-protocol=Video

Then write the rules for this sheet, if you want, block it, if you want, turn it around, only here it doesn’t matter where the user went if he got into the sheet with one road. (you can try to adjust the lifetime of the address in the list).

V
Viktor Belsky, 2017-10-16
@Belyj

Sorry for being off topic, but:

Manual:IP/Firewall/L7
Note: The L7 matcher is very resource intensive. Use this feature only for very specific traffic. I t is not recommended to use L7 matcher for generic traffic, such as for blocking webpages . This will almost never work correctly and your device will exhaust it's resources, trying to catch all the traffic. Use other features to block webpages by URL

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question