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

    Per User Bandwidth through Radius.

    Scheduled Pinned Locked Moved Captive Portal
    61 Posts 14 Posters 49.8k 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.
    • S
      sullrich
      last edited by

      How did you fix the ipfw pfil issues?  Try per user bandwidth and let us know if it really works.

      1 Reply Last reply Reply Quote 0
      • M
        mdouglas
        last edited by

        With Chillispot/Coova the per user bandwidth is given by the radius and controlled by the chilli deamon.  WISPr var.  Works great.  Each user has it own Upload & Download setting.

        1 Reply Last reply Reply Quote 0
        • S
          sullrich
          last edited by

          This is running on top of pfSense?  Can you please show me the output of ipfw show?

          1 Reply Last reply Reply Quote 0
          • M
            mdouglas
            last edited by

            i am using pf not ipfw.

            1 Reply Last reply Reply Quote 0
            • B
              buraglio
              last edited by

              @mdouglas:

              I have custom chillispot/coova daemon running pfsense.  It replaces the CP that comes with pfsense.  It has bandwidth, allowed domains, and many other controls. it uses a local Freeradius & mySQL server within pfsense.  Not recommended for embedded users due to the mySQL R/W. I would be happy to share.

              Do you have a link I can grab this code from and look at it?  Is it documented at all?

              https://www.forwardingplane.net/

              1 Reply Last reply Reply Quote 0
              • M
                mdouglas
                last edited by

                as far as the chilli deamon, I havn't created a true pfsense package (I don't know how).  Although, I have created a gui integrated into the pfsense web gui for configuring the chilli daemon. as far as FreeRadius, as you know, is apart of the pfsense package list. There are some modifications to the FR setup files to get it to work with mysql instead of flat file structure. There are some how tos on getting mysql installed in pfsense, google "mysql pfsense" again, some custom config for getting it to work with mysql.

                all in all, its alittle work.  maybe the pfsense dev would like to look into working with me in getting this all added as a CP package.

                1 Reply Last reply Reply Quote 0
                • jahonixJ
                  jahonix
                  last edited by

                  @mdouglas:

                  maybe the pfsense dev would like to look into working with me in getting this all added as a CP package.

                  …they are listening already.  ;D
                  SUllrich is THE coding mastermind of pfSense "with a little help of his friends".

                  1 Reply Last reply Reply Quote 0
                  • B
                    buraglio
                    last edited by

                    I don't care if it's a package, I'd still like to see whatever code you have (webgui, etc.).  Just tar it up.  I'm competent enough to manually get it working.  I'm really just interested in your implementation of it.  If it's not documented, thats fine.  I can reverse engineer whatever you have.  No hurry, though, I still need to get my dev environment back up and running.

                    nb

                    https://www.forwardingplane.net/

                    1 Reply Last reply Reply Quote 0
                    • S
                      sullrich
                      last edited by

                      I still want to know how per user bandwidth is working.  Call me skeptical but I doubt it's working like you say.  Please tell us how it works.

                      Not trying to sound negative but dummynet which a lot of the captive portal packages use to constrain the bandwidth values does not work with PF currently.

                      1 Reply Last reply Reply Quote 0
                      • M
                        mdouglas
                        last edited by

                        Its been running on my pf platform for months.

                        Chilli uses RADIUS to provision access and to provide accounting.

                        Direction of Input and Output
                        The original ChilliSpot defined input and output as being data uploaded and downloaded by the client respectively. Uses the reverse meaning (per default) making it more compatible with some other commercial access controllers.

                        In RFC 2866, it says:

                        Acct-Input-Octets
                        This attribute indicates how many octets have been received from the port over the course of this service being provided.
                        Acct-Output-Octets
                        This attribute indicates how many octets have been sent to the port in the course of delivering this service.

                        However, this is not very conclusive as it depends on what side of the port you are referring to. In the manual for a popular commercial access controller, is says:

                        Acct-Input-Octets
                        Number of octets/bytes received by the customer.
                        Acct-Output-Octets
                        Number of octets/bytes sent by the customer.

                        This is the definition adopted by CoovaChilli - one of the very first changes made to ChilliSpot, for use with back-end systems also supporting commercial access controllers.

                        Access Provisioning
                        The following RADIUS attributes are used to place limits on a session authorized by a RADIUS Access-Accept response:

                        Session-Timeout = seconds
                        Standard RADIUS attribute (defined in RFC 2865) for setting the maximum session timeout. The user is logged out after this amount of time; session duration.

                        Idle-Timeout = seconds
                        Standard RADIUS attribute (defined in RFC 2865) for setting the maximum idle timeout. The user is logged out after this amount of time of inactivity (no traffic).

                        ChilliSpot-Max-Input-Octets = bytes
                        ChilliSpot-Max-Output-Octets = bytes
                        ChilliSpot-Max-Total-Octets = bytes
                        Chilli vendor specific attributes for setting the max in, out, or total bytes transferred for the session. See above for the meaning of input and output.

                        WISPr-Bandwidth-Max-Up = bits/second
                        WISPr-Bandwidth-Max-Down = bits/second
                        WISPr vendor specific attributes for setting the maximum bandwidth rate in bits per second.

                        ChilliSpot-Bandwidth-Max-Up = kbits/second
                        ChilliSpot-Bandwidth-Max-Down = kbits/second
                        Chilli vendor specific attributes for setting the maximum bandwidth rate in kbits per second. Internally, chilli multiplies this value by 1000 in converting to bits per second.
                        In all cases, the ChilliSpot vendor specific attributes override WISPr attribute values. However, using the WISPr attributes is perhaps the more standard way to go.

                        Session Accounting
                        In RADIUS Accounting, the following attributes are used to report session statistics:

                        Acct-Session-Time = seconds
                        Duration of session in seconds.

                        Acct-Input-Octets = bytes
                        Acct-Output-Octets = bytes
                        The lower 32-bit value of the number of bytes of input and output (see above for a discussion of the meaning of input vs. output).

                        Acct-Input-Gigawords = gigawords
                        Acct-Output-Gigawords = gigawords
                        The upper 32-bit value of the number of bytes of input and output; or how many times the above attributes have rolled-over the 32-bit value.

                        Acct-Input-Packets = num-packets
                        Acct-Output-Packets = num-packets
                        The number of packets carrying input or output octets.

                        1 Reply Last reply Reply Quote 0
                        • S
                          sullrich
                          last edited by

                          nevermind, we are obviously speaking on two different wavelengths.  I want to know TECHNICALLY how it is pulling off constraining the bandwidth from a FreeBSD perspective (ipfw divert, dummynet, etc).

                          1 Reply Last reply Reply Quote 0
                          • M
                            mdouglas
                            last edited by

                            np, obviously I don't know what your asking, nor is it important.  All I know is I have over 200 users, all with different bandwidth restrictions, all of it running through the chillispot/coovachilli daemon running in pfsense. I guess if you want to know more technical info, you might google chillispot and research for the info you are looking for.

                            Scott, is this a project you would like to see included in pf? After reading the CP Forums, I see there are lots of CP users who are looking for a more robust CP package besides the one included in monowall/pfsense.  What dev is the pfsense team doing currently to improve the CP in pf?  Is pfsense still following the monowall dev of the CP?

                            1 Reply Last reply Reply Quote 0
                            • S
                              sullrich
                              last edited by

                              A quick google search shows that it is using ipfw.  Please type ipfw show from a command shell and post the output if you do not mind.

                              1 Reply Last reply Reply Quote 0
                              • M
                                mdouglas
                                last edited by

                                ipfw show

                                ipfw: getsockopt(IP_FW_GET): Protocol not available

                                1 Reply Last reply Reply Quote 0
                                • B
                                  buraglio
                                  last edited by

                                  chillispot can also be made to use pf, although to what extent I don't know at this point. There were patches for this under freebsd earlier this year that (I think) were committed.  Everything I've seen so far shows only NAT and L3 rules.  IT would likely be able to be made to talk to tables using pftabled or perl or something, but I don't see any indication of if that is currently the case. 
                                  I think what sullrich wants to know is what mechanism you are using to actually perform the QoS (ipfw, pf, some kind of weird alchemy or magic, etc.). 
                                  We understand where you are getting the data from to create the rules (radius).     If you post your stuff I'm sure it can be reverse engineered to see what it does.

                                  https://www.forwardingplane.net/

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    mdouglas
                                    last edited by

                                    @mdouglas:

                                    i am using pf not ipfw.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      sullrich
                                      last edited by

                                      @mdouglas:

                                      i am using pf not ipfw.

                                      In that case is it using altq to enforce the bandwidth speed limits?  We are looking to reverse engineer how this works.

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        mdouglas
                                        last edited by

                                        don't understand the "reverse engineer".  in any event, anyone who wants futher assistance getting it install on their box we should take it offline as to not ramble on in this thread. send me a pm, and ill help as much as I can.

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          sullrich
                                          last edited by

                                          Uhh, what else is this forum for?  I would rather keep this public.  If you do not wish to help us out that is fine but its not going to be taken private.

                                          1 Reply Last reply Reply Quote 0
                                          • C
                                            craibo
                                            last edited by

                                            I am very interested in this but would prefer it if it was a proper pfsense package that way any changes in updates to the pfsense software will not result in this feature failing.

                                            I did a little google search on chillispot this is what i came back with www.chillispot.info i think it is the package the mdouglas has used to make this work.

                                            Thanks everyone

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