How to block all website except yahoo or something else...

I want to block all acces internet on my office except yahoo or google on my mikrotik router? I mean all client PC only open sites such as yahoo or google. Thanks regards.. :slight_smile:

if you don’t use Proxy, make a few rules in the firewall. like this :

/ip firewall filter add chain=forward dst-port=80 dst-address=66.94.234.0/24 protocol=tcp action=accept
/ip firewall filter add chain=forward dst-port=80 dst-address=216.109.112.0/24 protocol=tcp action=accept
/ip firewall filter add chain=forward dst-port=80 protocol=tcp action=drop

first ones allow yahoo IP’s, last one drops the rest of the web traffic.
If you do use Proxy, you can use access list to control which sites are available:
http://www.mikrotik.com/testdocs/ros/2.9/ip/webproxy_content.php#7.53.3

I did, but why all sites are blocked included yahoo and google?
I just want allow yahoo, yahoo messenger etc. banking sites but how to find soure address if I create it with filter rules(used IP) or any other optional? thanks regards.. :slight_smile:

Use nslookup :

nslookup www.google.com

Name:    www.l.google.com
Addresses:  209.85.135.99, 209.85.135.103, 209.85.135.104, 209.85.135.147
Aliases:  www.google.com

And allow them all.

thanks its work for me a lot … but 1 more thing what to do with some websites which have dynamic Ip address and the ips are not on the same subnet. like one website www.fedex.com. if i want to allow this website then what i have to do for it ??