Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Limit torrent download speed by setting fix # of connections?

    Traffic Shaping
    3
    9
    6.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JohnnyBeGood
      last edited by

      Hi all,

      I've created this video tutorial on how to Limit Download & Upload bandwidth per IP and worked great for http downloads from file sharing sites until this particular user started using torrents then it does not work and user can download way over what limit was set under Firewall > Traffic Shaper > Limiter
      I'm trying to set connections limit under Firewall > Rules > LAN but I'm not sure what to enter and where.
      ![advance options.JPG](/public/imported_attachments/1/advance options.JPG)
      ![advance options.JPG_thumb](/public/imported_attachments/1/advance options.JPG_thumb)

      I like to fill my tub up with water, then turn the shower on and act like I'm in a submarine that's been hit!

      1 Reply Last reply Reply Quote 0
      • D
        dhatz
        last edited by

        Using firewall rules to limit the maximum # of connections won't work in your scenario, because pfSense currently puts any IPs that exceed those limits (defined with pf's max-src-* directives) into the "virusprot" pf table (using pf's overload feature), thus completely blocking all traffic from them.

        I have submitted a related feature request at redmine some time ago:
        http://redmine.pfsense.org/issues/1935

        1 Reply Last reply Reply Quote 0
        • J
          JohnnyBeGood
          last edited by

          @dhatz:

          Using firewall rules to limit the maximum # of connections won't work in your scenario, because pfSense currently puts any IPs that exceed those limits (defined with pf's max-src-* directives) into the "virusprot" pf table (using pf's overload feature), thus completely blocking all traffic from them.

          I have submitted a related feature request at redmine some time ago:
          http://redmine.pfsense.org/issues/1935

          Thanks for the explanation! Looks like the wait is the only option.

          I like to fill my tub up with water, then turn the shower on and act like I'm in a submarine that's been hit!

          1 Reply Last reply Reply Quote 0
          • marcellocM
            marcelloc
            last edited by

            You can workaround this by installing cron package and reduce virusprot table cleanup time.

            The -t 3600 arg means one hour.

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • J
              JohnnyBeGood
              last edited by

              I don't even know where to limit those number of connections?

              I like to fill my tub up with water, then turn the shower on and act like I'm in a submarine that's been hit!

              1 Reply Last reply Reply Quote 0
              • marcellocM
                marcelloc
                last edited by

                Edit the firewall rule you want to set connection limit.

                Treinamentos de Elite: http://sys-squad.com

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • D
                  dhatz
                  last edited by

                  I've also experimented with using ipfw's limit src-addr directive to achieve the same result (limit # of connections of a single IP) by hacking captiveportal.inc

                  Note: ipfw is FreeBSD's standard  packet filter, which is also available in pfsense in addition to pf, but it's only used for CP L2 filtering.

                  1 Reply Last reply Reply Quote 0
                  • marcellocM
                    marcelloc
                    last edited by

                    @dhatz:

                    Note: ipfw is FreeBSD's standard  packet filter, which is also available in pfsense in addition to pf, but it's only used for CP L2 filtering.

                    I think floating rules are ipfw too.

                    Treinamentos de Elite: http://sys-squad.com

                    Help a community developer! ;D

                    1 Reply Last reply Reply Quote 0
                    • J
                      JohnnyBeGood
                      last edited by

                      @marcelloc:

                      Edit the firewall rule you want to set connection limit.

                      setting # in Maximum state entries per host would limit numberr of connections?

                      I like to fill my tub up with water, then turn the shower on and act like I'm in a submarine that's been hit!

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.