Community discussions

MikroTik App
 
ghanoonimasood
just joined
Topic Author
Posts: 6
Joined: Sun Apr 12, 2020 8:47 am

blocking all websites except some special ones

Mon May 25, 2020 8:43 pm

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
 
netpinamar
just joined
Posts: 7
Joined: Sat May 23, 2020 3:35 am

Re: blocking all websites except some special ones  [SOLVED]

Tue May 26, 2020 3:13 am

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
 
ghanoonimasood
just joined
Topic Author
Posts: 6
Joined: Sun Apr 12, 2020 8:47 am

Re: blocking all websites except some special ones

Tue May 26, 2020 9:31 am

bro ...
Thanks a lot. it worked ...
Last edited by ghanoonimasood on Tue May 26, 2020 10:38 am, edited 1 time in total.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3349
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: blocking all websites except some special ones

Tue May 26, 2020 9:42 am

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?
 
Shqipalb
just joined
Posts: 6
Joined: Wed May 06, 2020 11:50 pm

Re: blocking all websites except some special ones

Fri Jun 05, 2020 8:13 pm

Maybe you need a dns filtering tool like pihole or try something with cisco umbrella dns filtering
 
DanBoggan
just joined
Posts: 1
Joined: Fri Nov 06, 2020 7:45 am

Re: blocking all websites except some special ones

Mon Nov 09, 2020 6:26 am

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.
Last edited by DanBoggan on Fri Nov 13, 2020 6:11 pm, edited 1 time in total.