Advertisement
rootplg3544

pake pada rtrwnet

Dec 28th, 2018
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. kalo' saya sih gak maw pusing ekstensinya apa, settingannya saya seperti ini:
  2. * browsing full bandwidth
  3. * download file ekstensi apa saja, yang lebih dari 1M, akan terlimit jadi 256kbps
  4. * kalo di < 1M, akan mendapat bandwidth full
  5. * nonton video sudah dilimit jadi 128 kbps
  6.  
  7. ini saya pake pada rtrwnet, menggunakan RB750G
  8.  
  9.  
  10.  
  11. /ip firewall layer7-protocol
  12. add comment="" name=http-video regexp=\
  13. "http/(0\\.9|1\\.0|1\\.1)[\\x09-\\x0d ][1-5][0-9][0-9][\\x09-\\x0d -~]*(content-type: video)"
  14.  
  15. /ip firewall mangle
  16. add action=mark-connection chain=forward comment="batasi download" connection-bytes=1024000-4294967295 disabled=no \
  17. in-interface=eth1-internet new-connection-mark=download_con passthrough=yes
  18. add action=mark-packet chain=forward comment="" connection-mark=download_con disabled=no in-interface=eth1-internet \
  19. new-packet-mark=download_pkt passthrough=yes
  20. add action=mark-packet chain=prerouting comment="limit video streaming" disabled=no layer7-protocol=http-video \
  21. new-packet-mark=http-video-up passthrough=yes protocol=tcp
  22. add action=mark-packet chain=prerouting comment="limit audio streaming" disabled=no layer7-protocol=http-audio \
  23. new-packet-mark=http-audio-up passthrough=yes protocol=tcp
  24.  
  25. /queue type
  26. add kind=pcq name=batasidownload pcq-classifier=dst-address pcq-limit=50 pcq-rate=256000 pcq-total-limit=2000
  27.  
  28. /queue simple
  29. add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment="" direction=both disabled=no dst-address=0.0.0.0/0 \
  30. interface=all limit-at=0/8k max-limit=128k/128k name="HTTP Video Traffict" packet-marks=http-video-up parent=none \
  31. priority=8 queue=default-small/default-small total-queue=default-small
  32. add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment="" direction=both disabled=no dst-address=0.0.0.0/0 \
  33. interface=all limit-at=0/0 max-limit=128k/128k name="Queue HTTP Video" packet-marks=http-video-up parent=\
  34. "HTTP Video Traffict" priority=8 queue=default-small/default-small target-addresses=0.0.0.0/0 total-queue=\
  35. default-small
  36.  
  37. /queue tree
  38. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=256k name=batasidownloadfreebrowsing \
  39. packet-mark=download_pkt parent=global-out priority=8 queue=batasidownload
  40.  
  41.  
  42.  
  43. Hallo para master gimana sich caranya membatasi file extention di hotspot saya dah coba dengan menggunakan cara di tutorial ngga berhasil hasil....
  44.  
  45.  
  46. mohon bantuannya....
  47.  
  48.  
  49. gimana caranya biar downloadnya saja file tertentu saja di batasi kalau browsing di bypass............
  50. newbie coba membantu... Click here to enlarge
  51. setuju ma om zdienos pke connbyte
  52.  
  53. asumsi 192.168.0.0/24 ip client
  54. 192.168.0.1 -> Lokal
  55.  
  56. Code:
  57. /ip firewall mangle
  58. add chain=postrouting out-interface=Lokal dst-address=192.168.0.0/24 protocol=tcp src-port=80 \
  59. action=mark-connection new-connection-mark=http_conn passthrough=yes
  60.  
  61. /ip firewall mangle
  62. add chain=postrouting out-interface=Lokal dst-address=192.168.0.0/24 connection-mark=http_conn \
  63. connection-bytes=0-131072 action=mark-packet new-packet-mark=browsing passthrough=no
  64. add chain=postrouting out-interface=Lokal dst-address=192.168.0.0/24 connection-mark=http_conn \
  65. connection-bytes=131073-4294967295 action=mark-packet new-packet-mark=download passthrough=no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement