I have this one Mikrotik router (RB951G-2HnD) that serves as a main router with port forwarding for HTTP/HTTPS and Plex to a server behind NAT. Now since there isn't much upload bandwidth (15Mbps), I'd love to limit the bandwith for HTTP/HTTPS on the WAN interface so that there's some bandwidth left for Plex. I've been looking in /queue but haven't seen anything that limits by port number.


This is described here

First you need to mark your packets. And to mark you can use port number

/ip firewall mangle
add action=mark-packet chain=forward dst-port=80 new-packet-mark=http passthrough=no protocol=tcp
add action=mark-packet chain=forward dst-port=443 new-packet-mark=https passthrough=no protocol=tcp

And then you can do traffic shaping on those marked packets

Below is also a very good and simple example


  • I added a queue and apply it to the WAN interface: /queue simple add name="wan-https-limit" target=pppoe-out1 max-limit=10M/10M – Manuth Chek Nov 17 '16 at 12:57

You need to create a mangle rule in /ip firewall that will match outgoing packets to ports 80 and 443 and mark them (action=mark-packet).

Then you can create a queue and use the packet mark you defined on the mangle rule to match and limit those packets.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.