Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Limit Download Layer 7 Mikrotik
- FOR LIMIT EXTENTION DOWNLOAD
- FOR LAYER7
- ==========================================================
- /ip firewall layer7-protocol
- add name="YOUTUBE DOWNLOAD" regexp="http/(0\\.9|1\\.0|1\\.1)[\\x09-\\x0d ][1-5\
- ][0-9][0-9][\\x09-\\x0d -~]*(content-type: video)"
- add name=EXE regexp="\\.(exe)"
- add name=RAR regexp="\\.(rar)"
- add name=ZIP regexp="\\.(zip)"
- add name=7z regexp="\\.(7z)"
- add name=WMV regexp="\\.(wmv)"
- add name=MPG regexp="\\.(mpg)"
- add name=MPEG regexp="\\.(mpeg)"
- add name=AVI regexp="\\.(avi)"
- add name=FLV regexp="\\.(flv)"
- add name=WAV regexp="\\.(wav)"
- add name=MP3 regexp="\\.(mp3)"
- add name=MP4 regexp="\\.(mp4)"
- add name=ISO regexp="\\.(iso)"
- add name=3GP regexp="\\.(3gp)"
- add name=MOV regexp="\\.(mov)"
- add name=MKV regexp="\\.(mkv)"
- add name="YOUTUBE STREAMING" regexp=youtube
- add name=PORN regexp=porn
- add name=TUBE regexp=tube
- add name=VIDEO regexp=video
- add name=MOVIE regexp=movie
- FOR MANGLE
- =================================================
- /ip firewall mangle
- add action=mark-connection chain=forward comment="LIMIT EXTENTION" disabled=\
- no layer7-protocol="YOUTUBE DOWNLOAD" new-connection-mark=\
- "YOUTUBE DOWNLOAD" passthrough=yes
- add action=mark-packet chain=forward connection-mark="YOUTUBE DOWNLOAD" \
- disabled=no new-packet-mark="YOUTUBE DOWNLOAD" \
- passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=\
- "YOUTUBE STREAMING" new-connection-mark="YOUTUBE STREAMING" passthrough=\
- yes
- add action=mark-packet chain=forward connection-mark="YOUTUBE STREAMING" \
- disabled=no new-packet-mark="YOUTUBE STREAMING" \
- passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=TUBE \
- new-connection-mark=PORN1 passthrough=yes
- add action=mark-packet chain=forward connection-mark=PORN1 disabled=no \
- new-packet-mark=PORN1 passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=PORN \
- new-connection-mark=PORN2 passthrough=yes
- add action=mark-packet chain=forward connection-mark=PORN2 disabled=no \
- new-packet-mark=PORN2 passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=VIDEO \
- new-connection-mark=PORN3 passthrough=yes
- add action=mark-packet chain=forward connection-mark=PORN3 disabled=no \
- new-packet-mark=PORN3 passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=MOVIE \
- new-connection-mark=PORN4 passthrough=yes
- add action=mark-packet chain=forward connection-mark=PORN4 disabled=no \
- new-packet-mark=PORN4 passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=MKV \
- new-connection-mark=MKV passthrough=yes
- add action=mark-packet chain=forward connection-mark=MKV disabled=no \
- new-packet-mark=MKV passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=MP3 \
- new-connection-mark=MP3 passthrough=yes
- add action=mark-packet chain=forward connection-mark=MP3 disabled=no \
- new-packet-mark=MP3 passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=MP4 \
- new-connection-mark=MP4 passthrough=yes
- add action=mark-packet chain=forward connection-mark=MP4 disabled=no \
- new-packet-mark=MP4 passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=ZIP \
- new-connection-mark=ZIP passthrough=yes
- add action=mark-packet chain=forward connection-mark=ZIP disabled=no \
- new-packet-mark=ZIP passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=EXE \
- new-connection-mark=EXE passthrough=yes
- add action=mark-packet chain=forward connection-mark=EXE disabled=no \
- new-packet-mark=EXE passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=FLV \
- new-connection-mark=FLV passthrough=yes
- add action=mark-packet chain=forward connection-mark=FLV disabled=no \
- new-packet-mark=FLV passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=ISO \
- new-connection-mark=ISO passthrough=yes
- add action=mark-packet chain=forward connection-mark=ISO disabled=no \
- new-packet-mark=ISO passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=MOV \
- new-connection-mark=MOV passthrough=yes
- add action=mark-packet chain=forward connection-mark=MOV disabled=no \
- new-packet-mark=MOV passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=MPEG \
- new-connection-mark=MPEG passthrough=yes
- add action=mark-packet chain=forward connection-mark=MPEG disabled=no \
- new-packet-mark=MPEG passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=MPG \
- new-connection-mark=MPG passthrough=yes
- add action=mark-packet chain=forward connection-mark=MPG disabled=no \
- new-packet-mark=MPG passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=WAV \
- new-connection-mark=WAV passthrough=yes
- add action=mark-packet chain=forward connection-mark=WAV disabled=no \
- new-packet-mark=WAV passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=RAR \
- new-connection-mark=RAR passthrough=yes
- add action=mark-packet chain=forward connection-mark=RAR disabled=no \
- new-packet-mark=RAR passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=WMV \
- new-connection-mark=WMV passthrough=yes
- add action=mark-packet chain=forward connection-mark=WMV disabled=no \
- new-packet-mark=WMV passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=3GP \
- new-connection-mark=3GP passthrough=yes
- add action=mark-packet chain=forward connection-mark=3GP disabled=no \
- new-packet-mark=3GP passthrough=no
- add action=mark-connection chain=forward disabled=no layer7-protocol=7z \
- new-connection-mark=7z passthrough=yes
- add action=mark-packet chain=forward connection-mark=7z disabled=no \
- new-packet-mark=7z passthrough=no
- FOR QUEUE TYPE
- ====================================================
- /queue type
- add kind=pcq name=DOWN pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=\
- 5s pcq-classifier=dst-address,dst-port pcq-dst-address-mask=32 \
- pcq-dst-address6-mask=128 pcq-limit=50 pcq-rate=0 pcq-src-address-mask=32 \
- pcq-src-address6-mask=128 pcq-total-limit=3000
- FOR QUEUE TREE
- =====================================================
- /queue tree
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=2800k name="4.ALL DOWN" packet-mark="" parent=global-out \
- priority=3
- /queue tree
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=1500k name="D.LIMIT EXTENTION" packet-mark="" parent=\
- "4.ALL DOWN" priority=4
- /queue tree
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=YOUTUBE packet-mark="" parent="D.LIMIT EXTENTION" \
- priority=4
- /queue tree
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=PORN packet-mark="" parent="D.LIMIT EXTENTION" priority=\
- 4
- /queue tree
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name="YOUTUBE STREAMING" packet-mark="YOUTUBE STREAMING" \
- parent=YOUTUBE priority=4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=MKV packet-mark=MKV parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=MP3 packet-mark=MP3 parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=MP4 packet-mark=MP4 parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=ZIP packet-mark=ZIP parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=EXE packet-mark=EXE parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=ISO packet-mark=ISO parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=AVI packet-mark=AVI parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=MOV packet-mark=MOV parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=MPEG packet-mark=MPEG parent="D.LIMIT EXTENTION" \
- priority=4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=MPG packet-mark=MPG parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=RAR packet-mark=RAR parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=WAV packet-mark=WAV parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=WMV packet-mark=WMV parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=3GP packet-mark=3GP parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=7z packet-mark=7z parent="D.LIMIT EXTENTION" priority=4 \
- queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name="YOUTUBE DOWNLOAD" packet-mark="YOUTUBE DOWNLOAD" \
- parent=YOUTUBE priority=4 queue=DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=PORN1 packet-mark=PORN1 parent=PORN priority=4 queue=\
- DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=PORN2 packet-mark=PORN2 parent=PORN priority=4 queue=\
- DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=PORN3 packet-mark=PORN3 parent=PORN priority=4 queue=\
- DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=PORN4 packet-mark=PORN4 parent=PORN priority=4 queue=\
- DOWN
- add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
- max-limit=0 name=FLV packet-mark=FLV parent="D.LIMIT EXTENTION" priority=\
- 4 queue=DOWN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement