How to Limit Bandwidth Website using Mikrotik – 7 Easy Steps

limit Bandwidth Website Using Mikrotik

Limit Bandwidth Website Using Mikrotik is the way that network administrator uses to save the internet usage from user surf any useless website.

In the previous article, we already show you How to Block Website in MikroTik Using Layer 7 Protocols.

So in this article, we’ll show you how to Limit Bandwidth Website Using Mikrotik Layer 7 Protocols.

We have many ways to login in to configure Mikrotik.  In this content, I’ll show to how to log in by using telnet command. Before you can use telnet (telnet is a network protocol that allows a user on one computer to log into another computer that is part of the same network.) in windows.

You must turn on telnet client feature first. This is how to enable telnet in Microsoft Windows.

Limit Bandwidth Website Using Mikrotik

  1. Open a command prompt in any version of Microsoft Windows and type telnet your Mikrotik IP Address and Hit Enter. Or you can use the putty program to use telnet. Example Using Windows Command Prompt: telnet Enter and then Mikrotik will ask for login username and password. Note: When you type the password (*) will not show. You just make sure you type the password is correct.
  2. When you login successful you’ll see this command [admin@VMMikrotik] > So you just copy 5 scripts below and paste it. The Script will create firewall rule and limit bandwidth website for you automatic. limit bandwidth is upload 64kbps and download 64bkps
  3. /ip firewall layer7-protocol add name=” Block Any Website” regexp=” ^(.*)(youtube)(.*)\$”
  4. /ip firewall filter add chain=forward action=add-dst-to-address-list address-list=youtube-address-list layer7-protocol=”Limit Bandwidth Website”
  5. /ip firewall mangle add chain=prerouting action=mark-connection new-connection-mark=”youtube-connection” passthrough=yes dst-address-list=”youtube-address-list”
  6. /ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=”youtube-packet” passthrough=no connection-mark=”youtube-connection”
  7. /queue simple add name=”” target=Eth2-LAN packet-marks=”youtube-packet” max-limit=64k/64k

Note: max-limit=64k/64k . it’s mean we limit bandwidth with upload=64kbps/download=64kbps. And you can make change any bandwidth limit by your own. Just Change in max-limit=anybandwidthupload/anybandwidthdownload

Note: regexp=”^(.*)(youtube)(.*)$” this regular expression is limit bandwidth only youtube website. if need to limit bandwidth more website you just add |(facebook)

Example: regexp=”^(.*)(youtube)|(facebook)|(yahoo)|(cnn)(.*)\$”

Sharing to friend!