Monday, January 5, 2015

filter website and download with mikrotik proxy


1- enable proxy service on mikrotik

/ip proxy
set enabled=yes                          
print


                 enabled: yes
             src-address: 0.0.0.0
                    port: 8080
            parent-proxy: 0.0.0.0
       parent-proxy-port: 0
     cache-administrator: webmaster
          max-cache-size: none
           cache-on-disk: no
  max-client-connections: 600
  max-server-connections: 600
          max-fresh-time: 3d
   serialize-connections: no
       always-from-cache: no
          cache-hit-dscp: 4
             cache-drive: primary-master




2- configure it to be a transparent proxy

/ip firewall nat
add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080

***  filter website www.yahoo.com

/ip proxy access
add dst-host=www.yahoo.com action=deny

*** filter user from download mp3, mp4, exe zip and rar

/ip proxy access
add path=*.mp4 action=deny
add path=*.zip action=deny 
add path=*.exe action=deny 
add path=*.mp3 action=deny
add path=*.rar action=deny


*** filter website that its domain has word sex

/ip proxy access
add dst-host=:sex action=deny



1 comment:

  1. Hi Dera,

    Am becoming a big fan, this is exactly what I needed-thanks so much!!

    Any idea on how to block torrents?

    ReplyDelete