Page 1 of 1

How to block all websites ?

Posted: Sat Oct 21, 2017 8:49 am
by nathakorn29
How to block all website except gmail and hotmail ?

thank you

Re: How to block all websites ?

Posted: Sat Oct 21, 2017 12:25 pm
by MLubbe
If you would like to block all websites the easiest way may be to block access to ports.

As an example I have assumed that your LAN IP is in the 192.168.1.0/24 range. To prevent locking yourself out from access http port of mikrotik and other local devices I have specified that it should only block those ports when coming from the LAN and going to a non (!) LAN address.

Hope this helps!
/ip firewall filter
add action=drop chain=forward src-address=192.168.1.0/24 dst-address=!192.168.1.0/24 dst-port=80,443,8080 protocol=tcp

Re: How to block all websites ?

Posted: Sat Oct 21, 2017 8:14 pm
by lbachero
It's complicated...
You could drop all IP's instead of Microsoft and Google blocks IP.
The problems is the devices will can to access YouTube, Bing, Google+, etc.

You can do something like this:
/ip firewall filter add chain=forward in-interface=$LAN dst-address=!allowed_blocks action=drop

I don't know if there is something like a layer 7 for this, but i can't see another option.

Re: How to block all websites ?

Posted: Sat Oct 21, 2017 8:59 pm
by MLubbe
Gmail will be a tricky one when using an address list as google and youtube as well as other smaller websites share IP segments with them.