1

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.

Manuth Chek
  • 402
  • 2
  • 6
  • 16

2 Answers2

3

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.

Cha0s
  • 2,462
  • 2
  • 16
  • 26
3

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

http://wiki.mikrotik.com/wiki/TransparentTrafficShaper

Dmitry Zayats
  • 1,378
  • 7
  • 7
  • 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