Community discussions

MikroTik App
 
nathakorn29
just joined
Topic Author
Posts: 1
Joined: Sat Oct 21, 2017 8:04 am

How to block all websites ?

Sat Oct 21, 2017 8:49 am

How to block all website except gmail and hotmail ?

thank you
 
MLubbe
newbie
Posts: 32
Joined: Fri Mar 18, 2016 7:40 pm

Re: How to block all websites ?

Sat Oct 21, 2017 12:25 pm

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
 
User avatar
lbachero
newbie
Posts: 38
Joined: Wed Oct 08, 2014 4:39 pm
Location: Dublin
Contact:

Re: How to block all websites ?

Sat Oct 21, 2017 8:14 pm

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.
 
MLubbe
newbie
Posts: 32
Joined: Fri Mar 18, 2016 7:40 pm

Re: How to block all websites ?

Sat Oct 21, 2017 8:59 pm

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.

Who is online

Users browsing this forum: vpendragon and 112 guests