How to mangle a continuous uploading traffic to https server

Hello

One of my machines on the LAN has a continuous uploading https traffic to an Amazon S3 server.

How can I mangle that traffic on ALL the following conditions :

  • Outgoing TCP traffic
  • Port of the destination server is 443
  • Average traffic is between 150k and 300k per second to be calculated within a 2 minutes interval

Thanks

I think it can not be done exactly as you are specifying. I don’t know how you would average a speed per second over 2 minutes.

Without the 2 minute requirement you could mark the connections meeting your other criteria like this:

/ip firewall mangle add chain=postrouting protocol=tcp dst-port=443 out-interface=ether1 connection-rate=150k-300k action=mark-connection new-connection-mark=AmazonS3Upl
oad

A trick that could potentially get you close to the 2 minute average thing could be adding the destination to an address list with a timeout… Depending on the order of the rules and a few other thing you could probably start applying a rule match only after the connection is 2 minutes old with the same behavior…

Can you provide more detail on what behavior your trying to accomplish?

Also, what do you mean by “mangle a continuous uploading traffic” in what way do you want to “mangle” it?