3

In pf you can limit the bandwidth that is consumed (by for example ssh) using queues.

I am hosting a UDP Service (Discard Protocol) which can easily eat up all my traffic when a client transfers data.

Is there a way in pf to limit a connection or drop packets after a client connection consumed, lets say, 1GB of data?

1

This is not possible with pf alone—you’d have to couple it with something like pflow(4) and related to handle the traffic accounting. You might also be able to cook something up with some output from pfctl.

  • You are right. I set up a pf rule for discard protocol with a label discard to identify how much traffic was consumed with pfctl -sl. After a certian amount of traffic I block all incoming traffic on udp port 9. Thank you! – noqqe Mar 1 '15 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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