+370 52 10 0453 sales@monovm.com

Here we will discuss how to block or allow specific types of URLs by using MikroTik.


Mar, 19

Block URL on MikroTik

If you are managing a network and you would like to filter specific web site URL's (such as Facebook or twitter), with MikroTik VPS it is possible to set-up the configurations by following the steps below:

  • At first, add the website name to the list and then make the action to accept or drop the URL. To perform this, open firewall from IP> firewall and then click on “layer7 protocols”.
  • Click on plus icon. In opened small window, type a name for the URL and in Regexp box type the URL expression like ^.+(yourdomain).*$.
  • After adding the sites to the list, you should grant the URLs to have access or not. To do this, return to the first tab “filter rules” and click on “+” icon.
  • Select chain method “forward” and let source address and destination address empty as we want to do this rule for all users connected to the network. Select 6(TCP) from “protocol” drop down list and enter 80 and 443 into port field. Note that you should separate port numbers with a comma(,).
  • Go to advanced tab and select the name of the URL that defined in step 2 from “layer7 protocol” field.
  • Go to the action tab and select action type from “action” field. Select “accept” to allow access to the URL and select “Drop” to deny the access to the URL.

Oliver K

I’m Oliver k. I have MS degree in Computer Engineering. For nearly 5 years that I have been working on web programing and also in last 2 years I have worked on windows and Linux VPS. This is my honor to share my experiences with a new community.