Wednesday, November 2, 2011

How to Block Websites & Stop Downloading Using Proxy

This example will explain you “How to Block Web Sites” & “How to Stop Downloading”.
First, Configure Proxy.
 
/ip proxy 
set parent-proxy=0.0.0.0
set parent-proxy-port=0
set cache-administrator="webmaster"
set max-cache-size=none
set cache-on-disk=no
set max-client-connections=600
set max-server-connections=600
set max-fresh-time=3d
set always-from-cache=no
set cache-hit-dscp=4
set serialize-connections=no

Now, Make it Transparent
/ip firewall nat
a
dd chain=dstnat protocol=tcp dst-port=80 action=dst-nat to-addresses=
to-ports=8080

Make sure that your proxy is NOT a Open Proxy
/ip firewall filter
a
dd chain=input in-interface= src-address=0.0.0.0/0\
protocol=tcp dst-port=8080 action=drop

Now for Blocking Websites
/ip proxy access
a
dd dst-host=www.vansol27.com action=deny
It will block website http://www.vansol27.com, We can always block the same for different networks by giving src-address. It will block for particular source address.

We can also stop downloading files like.mp3, .exe, .dat, .avi,…etc.
/ip proxy access
a
dd path=*.exe action=deny
a
dd path=*.mp3 action=deny
a
dd path=*.zip action=deny
a
dd path=*.rar action=deny.

Try with this also
/ip proxy access
a
dd dst-host=:mail action=deny
This will block all the websites contain word “mail” in url.
Example: It will block www.hotmail.com, mail.yahoo.com, www.rediffmail.com
ENJOY BLOCKING…….

0 comments:

Post a Comment