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

    Counters….. everyone's favorite!

    Scheduled Pinned Locked Moved Captive Portal
    10 Posts 4 Posters 3.9k 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.
    • I
      islandwifibill
      last edited by

      I've been trying to sort out sql counters.  The issue I'm trying to grasp is this:  how can I reliably set a counter that will expire a user account X seconds after the first login?  Example:

      user Wallythetoad buys a 30 day access.  I would want that account to expire 2,592,000 seconds after the very first time he logs in, no ifs, ands, or buts.  If Wally logs in and uses it even one time, and doesn't use it again for 30 days, too bad.

      I don't see any sql counter in the Radius package that does exactly that.  Unless I'm missing something.  Does anyone know of a counter that maybe I'm missing?

      Many thanks in advance

      1 Reply Last reply Reply Quote 0
      • T
        thermo
        last edited by

        In the daloradius application there are quite a few counters provided. Im sure there is one which expires after x minutes.

        1 Reply Last reply Reply Quote 0
        • W
          wallabybob
          last edited by

          Captive portal vouchers expire a configurable time after first use.

          1 Reply Last reply Reply Quote 0
          • N
            Nachtfalke
            last edited by

            @islandwifibill:

            I've been trying to sort out sql counters.  The issue I'm trying to grasp is this:  how can I reliably set a counter that will expire a user account X seconds after the first login?  Example:

            user Wallythetoad buys a 30 day access.  I would want that account to expire 2,592,000 seconds after the very first time he logs in, no ifs, ands, or buts.  If Wally logs in and uses it even one time, and doesn't use it again for 30 days, too bad.

            I don't see any sql counter in the Radius package that does exactly that.  Unless I'm missing something.  Does anyone know of a counter that maybe I'm missing?

            Many thanks in advance

            As wallabybob said this can be done without radius and just with the CP voucher system. Creating avoucher for 30 days - one time entered - the counter starts and will never stop but expire after 30 days.

            What freeradius can do for you is, that the user has a quota of 30 days but if the user interrupts his session the counter stops.
            Further radius can create a fixed expiration time when a user cannot login anymore. So lets say the user should be disconnected on 1st december 2012 this can be done with freeradius

            1 Reply Last reply Reply Quote 0
            • I
              islandwifibill
              last edited by

              Ok, call me negligent for not mentioning that the vouchers are NOT an issue, since (obviously) they have built in expirations.

              I should have mentioned that I need this for self-provisioning sign ups, people who sign themselves up online via a CC processor.

              My bad folks.  But the problem remains.  Nighthawk, which counter are you referring to with quota?  that might be useful, as I could probably find a way to tell the counter NOT to stop counting.  As for expiration via radius, I need this to be completely automated.  CSRs are expensive.

              1 Reply Last reply Reply Quote 0
              • W
                wallabybob
                last edited by

                @islandwifibill:

                I should have mentioned that I need this for self-provisioning sign ups, people who sign themselves up online via a CC processor.

                It is not always easy to tell what factors are significant.

                I presume you are expecting to have some interaction with the credit card processor resulting in the user receiving account details. Could they receive a voucher code instead of account details?

                You might have other constraints you haven't yet mentioned, but I can't yet see a reason not to use vouchers. Can you?

                1 Reply Last reply Reply Quote 0
                • I
                  islandwifibill
                  last edited by

                  It is not always easy to tell what factors are significant.

                  I presume you are expecting to have some interaction with the credit card processor resulting in the user receiving account details. Could they receive a voucher code instead of account details?

                  You might have other constraints you haven't yet mentioned, but I can't yet see a reason not to use vouchers. Can you?

                  Ok, here's the rundown.  I do use vouchers for counter sales, but I also use a CC processor which does update my MySql database and these users are provisioned with a pincode.  I have a thoroughly populated daloradius db that interacts with the CC processor.  The problem is, I need a counter as I have described that would disable accounts in a timely manner for everything BUT vouchers.  Currently, I am stuck with using a scheduler in which I have to manually enter user info so it will remind me to disable accounts on a given date and time.  Which means I have to thoroughly examine every new sign up that occurs.  This is getting highly time consuming.  So the user info is already in the database, and I can assign them to a group/plan/profile.  But that group/plan/profile needs a reliable counter to function properly.

                  P.S.: It seems almost beyond belief that no sql counter to perform this simplest, most obvious of functions has not been created.

                  1 Reply Last reply Reply Quote 0
                  • W
                    wallabybob
                    last edited by

                    I know zilch about radius and sql (I can barely spell sql) so this pointer might be utterly useless. There is a discussion at http://sourceforge.net/p/daloradius/discussion/684101/thread/38326913 about an radius attribute Access-Period that reads as if it might be useful for your requirement.

                    Maybe http://abechik.wordpress.com/2007/03/15/freeradius-limit-user-access-by-period-started-from-activation-time/ would be useful to you.

                    1 Reply Last reply Reply Quote 0
                    • T
                      thermo
                      last edited by

                      Sorry this wasn't part of daloradius but part of the freeradius install.

                      see (on linux) /etc/raddb/modules/sqlcounter_expire_on_login

                      #  Set an account to expire T seconds after first login.
                      #  Requires the Expire-After attribute to be set, in seconds.
                      #  You may need to edit raddb/dictionary to add the Expire-After
                      #  attribute

                      1 Reply Last reply Reply Quote 0
                      • N
                        Nachtfalke
                        last edited by

                        There are timecounters included into freeradius.
                        The one is the "db.daily", "db.monthly" and so on. This can be used without sql database and is just counting the time the user is connected.

                        Another possibility is to use the same counter module but a sql database to do the counting:
                        http://abechik.wordpress.com/2007/03/15/freeradius-disconnected-user-when-time-limit-exceed/

                        But it is always for the connected time but not the offline time of the user. Perhaps you can do some tricks on the sql database to solve this.

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