Limit download over x filesize



  • Is there a way to limit a download over lets say 20MB to throttle at 16KB? I am trying to limit files over 20MB to thortle at lets say 16KB a second. I am trying to figure it out but cant figure out how to do that.


  • Rebel Alliance Developer Netgate

    On pfSense 2.1 limiters have a "burst" parameter where you set a total amount of data to allow before the limit kicks in.

    It may not be perfect but it's probably as close as you'd get. Set the limiter for a burst of 20MB and then an actual limit of 16Kbit/s and it should sort of do what you want.



  • Got it, i just heard that 2.1 has a lot of bugs so i dont know if i should use it for a live solution.



  • Okay so i am trying to limit my internet to 128Kbit down and up. So do i create a new limiter for this?

    Basically i go to a site download a file thats 50MB, after 20MB of it downloading at full 128Kbit speed it should slow down to 64Kbit.

    Im confused how to set this up exactly i installed 2.1



  • And i want it to distinguish http downloads only.


  • Rebel Alliance Developer Netgate

    You'd use one limiter for upload, one for download. Always in pairs.

    To distinguish HTTP, just add the limiters to a rule that passes traffic out on port 80. Make sure it's above your default allow out rule for general internet traffic.



  • Yeah that i understand but i dont want to limit traffic on all of port 80 or all http. Just downloads for example if i download an .exe,zip,mkv,mov,avi

    When i start a download on my browser basically. Is there a way to distinguish and choke that after 20mb?


  • Rebel Alliance Developer Netgate

    not without running the traffic through a proxy (e.g. squid+squidguard, dansguardian) though I'm not sure any of those support limiting over X size, that would be what you'd need to use to distinguish by extension



  • Such a "smart" shaper could be done with squid and delay pools.