Per ip bandwidth if file size is more than 3Mo

  • Hello everybody,

    i'm new with this forum and with pfsense, my english is bad so please be kind.

    I always use squid with ubuntu to control bandwidth for user download speed.

    i give full bandwith for file size less than 3Mo but limit the download speed to 32k/s if file size is more than this.

    here is the code i use with squid:

    acl ALL src all
    acl myFriends src

    delay_pools 2

    delay_class 1 1
    delay_parameters 1 -1/-1
    delay_access 1 allow myFriends

    delay_class 2 2
    delay_parameters 2 -1/-1           32000/1048576
    delay_access 2 allow ALL

    With pfsense i created two traffic shaper for in=32k and out=20k and i created a new rules for each user ip. it works perfectly but it always limit the speed at 32k for every file size.

    i want if it is possible to let max speed for browsing and file with size less than 3Mo but limit to 32k/s file size bigger than 3Mo.

    if someone can show me how to do this….

    thank you in advance.

  • If you're specifically looking for HTTP/FTP file sizes you can use an L7 pattern to determine the file size. Otherwise the queues normally let you configure a higher burst speed for a fixed duration and lower that connection's speed after that.

  • You should be able to do it with a HFSC scheduler

Log in to reply