Community discussions

MikroTik App
 
hameed
newbie
Topic Author
Posts: 33
Joined: Thu Dec 20, 2012 7:20 am

I Want to Block all websites and allow few websites on IP

Sat Jan 11, 2014 1:49 pm

Hi all,

Currently i am using Mikrotik RB 450G, i want to block all websites except 1 or 2 websites for particular ip ex : 192.168.1.15, please help me to configure.

Thanks in Advance.....
 
User avatar
zap71
Frequent Visitor
Frequent Visitor
Posts: 83
Joined: Fri Sep 27, 2013 11:10 am
Location: Berlin, Germany
Contact:

Re: I Want to Block all websites and allow few websites on I

Sat Jan 11, 2014 3:18 pm

Hi,

in case your 2 websites have static IPs you might even skip Layer7 checks.

The rules should be pretty simple like that:
/ip firewall address-list
add address=ip1 comment="address of 1st allowed webservice" list=web-ok
add address=ip2 comment="address of 2nd allowed webservice" list=web-ok
/ip firewall filter
add chain=forward protocol=tcp dst-port=80 in-interface=intranet-if out-interface=isp-if dst-addresslist=!web-ok action=drop
I did not test this rules but I hope you get a rough idea how to do it.

Zap.
 
hameed
newbie
Topic Author
Posts: 33
Joined: Thu Dec 20, 2012 7:20 am

Re: I Want to Block all websites and allow few websites on I

Sun Jan 12, 2014 7:00 am

I tried but this is not help full...

Please someone ge me a good solutions..

Where are mikrotik experts?
 
User avatar
zap71
Frequent Visitor
Frequent Visitor
Posts: 83
Joined: Fri Sep 27, 2013 11:10 am
Location: Berlin, Germany
Contact:

Re: I Want to Block all websites and allow few websites on I

Sun Jan 12, 2014 9:21 am

I assume we need more information.
What is your configuration, what did not work with my example?

Zap.
 
hameed
newbie
Topic Author
Posts: 33
Joined: Thu Dec 20, 2012 7:20 am

Re: I Want to Block all websites and allow few websites on I

Sun Jan 12, 2014 11:24 am

what confiduration you want, i am newbie, please help me..
 
User avatar
zap71
Frequent Visitor
Frequent Visitor
Posts: 83
Joined: Fri Sep 27, 2013 11:10 am
Location: Berlin, Germany
Contact:

Re: I Want to Block all websites and allow few websites on I

Sun Jan 12, 2014 12:31 pm

Hmm ok.

I assume you might not have changed the interface names of your router.

To get those names have a look at the output of
/interface ethernet export
There you get something like this:
set [ find default-name=ether2 ] comment=ether2 [b]name=intranet-if[/b]
set [ find default-name=ether1 ] comment=ether1 [b]name=isp-if[/b]
You probably have one interface where your uplink (ISP or modem) is connected and another, where your clients are on, right?

Zap.

Who is online

Users browsing this forum: No registered users and 14 guests