You are on page 1of 2

Qos Layer 7

/ip firewall layer7-protocol


add name=speedtest-servers regexp="^.*(get|GET).+speedtest.*\$"
add name=torrent-wwws regexp="^.*(get|GET).+(torrent|thepiratebay|isohunt|
entertane|demonoid|btjunkie|mininova|flixflux|vertor|h33t|zoozle|bitnova|bitsoup|
meganova|fulldls|btbot|fenopy|gpirate|commonbits).*\$"
add name=torrent-dns regexp="^.+(torrent|thepiratebay|isohunt|entertane|demonoid|
btjunkie|mininova|flixflux|vertor|h33t|zoozle|bitnova|bitsoup|meganova|fulldls|
btbot|fenopy|gpirate|commonbits).*\$"
add name=netflix regexp="^.*(get|GET).+(netflix).*\$"
add name=mp4 regexp="^.*(get|GET).+\\.mp4.*\$"
add name=swf regexp="^.*(get|GET).+\\.swf.*\$"
add name=flv regexp="^.*(get|GET).+\\.flv.*\$"
add name=video regexp="^.*(get|GET).+(\\.flv|\\.mp4|netflix|\\.swf).*\$"
add name=mp3 regexp="^.*(get|GET).+\\.mp3.*\$"
add name=youtube.com regexp="^.*(get|GET).+(youtube).*\$"
add name=googlevideo.com regexp="^.*(get|GET).+(googlevideo).*\$"
add name=windowsupdate.com regexp="^.*(get|GET).+(windowsupdate).*\$"
add name=freakshare.com regexp="^.*(get|GET).+(freakshare).*\$"
add name=4shared.com regexp="^.*(get|GET).+(4shared).*\$"
add name=xvideos.com regexp="^.*(get|GET).+(xvideos).*\$"

/ip firewall mangle


add action=mark-connection chain=forward comment=Youtube layer7-
protocol=youtube.com new-connection-mark=Youtube
add action=mark-connection chain=forward dst-address-type=!local layer7-
protocol=googlevideo.com new-connection-mark=Youtube
add action=mark-packet chain=forward connection-mark=Youtube new-packet-
mark=Youtube time=7h-20h,sun,mon,tue,wed,thu,fri,sat
add action=mark-connection chain=forward comment=Wupdate dst-address-type=!local
layer7-protocol=windowsupdate.com new-connection-mark=Wupdate
add action=mark-packet chain=forward connection-mark=Wupdate new-packet-
mark=Wupdate time=7m-20h,sun,mon,tue,wed,thu,fri,sat
add action=mark-connection chain=forward comment=Freakshare dst-address-type=!local
layer7-protocol=freakshare.com new-connection-mark=Freakshare
add action=mark-packet chain=forward connection-mark=Freakshare new-packet-
mark=Freakshare
add action=mark-connection chain=forward comment=4shared dst-address-type=!local
layer7-protocol=4shared.com new-connection-mark=4shared
add action=mark-packet chain=forward connection-mark=4shared new-packet-
mark=4shared
add action=mark-connection chain=forward comment=Xvideos layer7-
protocol=xvideos.com new-connection-mark=xvideos
add action=mark-packet chain=forward connection-mark=xvideos new-packet-
mark=xvideos

/queue type
add kind=sfq name=BAJADA
add kind=sfq name=SUBIDA

/queue tree
add name=Descargas parent=Local queue=default
add name=Upload parent=Wan queue=default
add max-limit=100k name=Youtube packet-mark=Youtube parent=Descargas queue=BAJADA
add max-limit=128k name=youtube packet-mark=Youtube parent=Upload queue=SUBIDA
add max-limit=1k name=Windowsupdate packet-mark=Wupdate parent=Descargas
queue=BAJADA
add max-limit=1k name=wupdate packet-mark=Wupdate parent=Upload priority=1
queue=SUBIDA
add max-limit=128k name=Freakshare packet-mark=Freakshare parent=Descargas
queue=BAJADA
add max-limit=32k name=freakshare packet-mark=Freakshare parent=Upload queue=SUBIDA
add max-limit=56k name=4shared packet-mark=4shared parent=Descargas queue=BAJADA
add max-limit=32k name=4Shared packet-mark=4shared parent=Upload queue=SUBIDA
add max-limit=50k name=Xvideos packet-mark=xvideos parent=Descargas queue=BAJADA

You might also like