Monday, March 30, 2015

Layer Seven Website Blocking Using Mikrotik


There are a span of ways that yous tin block websites on Mikrotik Routers. One of the easiest in addition to resources efficient ways to create this on a MT is past times using Layer vii inspection.



1. Open upward Winbox in addition to connect to your router.
1.1 On the left menu, direct IP->Firewall



2. On the Firewall Windows, click on the "Layer vii Protocols" tab



3. Click on the Add button
3.1 Under the "Name" field, type "Block"
3.2 Under the Regex field, set the text below. You tin add together to a greater extent than sites past times typing inward the Domain, in addition to separating them amongst the piping "|" symbol.
^.+(youtube.com|facebook.com).*$


4. Click on the "Filter Rules" tab inward the "Firewall" window.
4.1 On the "General" tab, brand certain that the "Forward" chain is selected.


5. On the "Advanced" tab, nether "Layer vii Protocol" direct the "Block" detail that nosotros created earlier.


6. On the "Action" tab, direct "reject" equally the action, in addition to thus click "OK" to finish.


An option agency to gear upward the blocking, is past times typing (or pasting) the next inward a lastly window:
/ip firewall layer7-protocol
add together name=Block regexp="^.+(youtube.com|facebook.com).*\$"
/ip firewall filter
add together action=reject chain=forward layer7-protocol=Block

Make certain yous examination everything before putting it inward production. Also banking concern complaint that in that place are ways to bypass this, if your users are clever or determined enough.