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

    $100 - Specification of mask as dotted quad in Traffic Limiter in pfSense 2.1

    Scheduled Pinned Locked Moved Expired/Withdrawn Bounties
    2 Posts 1 Posters 3.7k Views
    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
      jcyr
      last edited by

      Currently Traffic Shaper: Limiter uses hardcoded mask of 0xffffffff. This allows only per host shaping when dest or source address shaping is selected. Create field allowing specification of an actual mask as dotted quad value such that limiter queues can be used for group of hosts.

      ie. I have four kids, each with multiple devices. I want to allow 5mbps per kid. Each can use up to that limit across his/her devices.

      kid1 ip addresses: 192.168.2.16, 192.168.2.17
      kid2 ip addresses: 192.168.2.32. 192.168.2.33, 192.168.2.34
      kid3 ip addresses: 192.168.2.48
      …

      If this was implemented, specifying a mask of 255.255.255.240 would do the trick.

      Presently I achieve this by modifying /etc/inc/sharper.inc as follows:

      $mask = $this->GetMask();
                      if (!empty($mask)) {
                              /* XXX TODO extend this to support more complicated masks */
                              switch ($mask) {
                              case 'srcaddress':
                                      $pfq_rule .= " mask src-ip 0xfffffff0 ";
                                      break;
                              case 'dstaddress':
                                      $pfq_rule .= " mask dst-ip 0xfffffff0 ";
                                      break;
                              default:
                                      break;
                              }
                      }

      It would be far more elegant and flexible if this were implemented in the GUI.

      IPV6 Test: http://ipv6-test.com

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

        This offer is withdrawn

        IPV6 Test: http://ipv6-test.com

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