Page 1 of 1
blocking all websites except some special ones
Posted: Mon May 25, 2020 8:43 pm
by ghanoonimasood
hello everybody.
I will appreciate you if you help me.
I want to block all HTTP and HTTPs websites with my Mikrotik .
i mean i want all my clients be able to connect only to some special site (these special sites also contain HTTP and HTTPS websites) and they requests for other website be denied.
is anybody here to help me how can I do that?
because web proxy only works on HTTP websites and I also want to block all http & https websites except only some special ones(including HTTP and https ).
how can I do that?
thank you very much indeed
Re: blocking all websites except some special ones [SOLVED]
Posted: Tue May 26, 2020 3:13 am
by netpinamar
Hi, yo can add to address-list your Permited URL (without http:// or https://) an then block all http/https (except your "Permited URL")
/ip firewall address-list
add address=your-webpage list="Permited URL"
/ip firewall filter
add action=drop chain=forward disabled=no protocol=tcp src-address-list="!Permited URL" src-port=80,443
Can separate http (port 80) and https (port 443) traffic into different rules
Re: blocking all websites except some special ones
Posted: Tue May 26, 2020 9:31 am
by ghanoonimasood
bro ...
Thanks a lot. it worked ...
Re: blocking all websites except some special ones
Posted: Tue May 26, 2020 9:42 am
by Jotne
for example for only yahoo.com we have got a lot of IPs... how can i do it ?
Most of today's website not just have many IPs, but also lots of the code on the page comes from other sits, like commercial and other stuff. So only allow the IP for a specific web site, may not give the result you want.
Why do you like to do this?
Re: blocking all websites except some special ones
Posted: Fri Jun 05, 2020 8:13 pm
by Shqipalb
Maybe you need a dns filtering tool like pihole or try something with cisco umbrella dns filtering
Re: blocking all websites except some special ones
Posted: Mon Nov 09, 2020 6:26 am
by DanBoggan
Hi, yo can add to address-list your Permited URL (without http:// or https://) an then block all http/https (except your "Permited URL")
/ip firewall address-list
add address=your-webpage list="Permited URL"
/ip firewall filter
add action=drop chain=forward disabled=no protocol=tcp src-address-list="!Permited URL" src-port=80,443
Can separate http (port 80) and https (port 443) traffic into different rules
It worked perfectly fine for my
portable cleaner review site.