Monday, January 5, 2015

filter website and download with mikrotik proxy

1- enable proxy service on mikrotik

/ip proxy
set enabled=yes                          

                 enabled: yes
                    port: 8080
       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

/ip proxy access
add 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?