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

    [Help] Captive Portal authenticate user from external database MySQL

    Scheduled Pinned Locked Moved Captive Portal
    16 Posts 3 Posters 4.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.
    • C
      communig8
      last edited by

      The freeRADIUS site is really the best source of documentation.

      Signatures are a sign of having signatures.

      1 Reply Last reply Reply Quote 0
      • U
        unixaccent
        last edited by

        hi communig8!

        I am now following your advise to overkillcf. I am now reading the documentation in freeradius.org. My simple question is, I am interested of setting up this in a hotel, would it be possible to provide a balance inquiry page where the user/client will type his username and password and he will be able to see his sessions, time consumed and time remaining in his account? thank you in advance.

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

          Hi.
          Yes but you will have a bit of work to do.
          freeRADIUS can be setup to use MySQL as the backend datastore but does not really have much in the way of querying and showing this data.
          The way I do this is to use a Joomla! web site with Fabrik installed. This allows me to easily construct web pages that show accounting data from
          the freeRADIUS MySQL tables.

          Signatures are a sign of having signatures.

          1 Reply Last reply Reply Quote 0
          • U
            unixaccent
            last edited by

            Thank you for the quick reply communig8!

            I know a little about joomla like how it works as a cms. I hope I am not asking too much of your experience but how did you do it? Did you install first joomla and then from joomla, you added the database structure for the radius?

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

              Install Joomla!
              Add the Fabrik component (from www.fabrikar.com) and the Farbrik Plug-in (allows data to be inserted in articles).
              In Fabrik create a database connection to the database holding the freeRADIUS data.
              In Fabrik create tables (called lists in Fabrik) for the freeRADIUS tables you want to use.
              Fabrik then creates a representation of all the columns.
              Create additional views for querying the data as required.
              You can then create menu items that goto pages that Fabrik will generate to allow you to work with the data.
              You can also insert data in Articles using the Fabrik Plug-in.

              Signatures are a sign of having signatures.

              1 Reply Last reply Reply Quote 0
              • U
                unixaccent
                last edited by

                Good day communig8!

                Do you mean that you never used custom php scripts in your setup? I need an insight on how to put a balance inquiry page in joomla website using fabrik module. Is it possible to show all the sessions(browsing history), time remaining, and other AAA stuffs without diving into php custom scripts?

                Thanks.

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

                  It will all depend how complicated your requirements are.
                  In general you can either create views on the MySQL tables and use the view in Fabrik
                  or you can use the filtering/joining facilities in Fabrik to get your data.
                  In the implementations I have worked on, I have only had to use any scripts to help
                  provision new RADIUS accounts but even they are driven by Fabrik.

                  Signatures are a sign of having signatures.

                  1 Reply Last reply Reply Quote 0
                  • U
                    unixaccent
                    last edited by

                    When you said "I have only had to use any scripts to help provision new RADIUS accounts but even they are driven by Fabrik", do you mean that you created your own script? thanks!

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

                      Yes

                      Signatures are a sign of having signatures.

                      1 Reply Last reply Reply Quote 0
                      • U
                        unixaccent
                        last edited by

                        Copy that sir.. Now that you have shared you ideas, I might consider learning PHP language and create my own queries carried by the php scripts for AAA display of information especially the balance inquiry that I require. There are lots of database (mysql) structure around this forum that I've been seeing but would you care to share or point to us the database structure you used for your setup that was tested and running?

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

                          You need to be looking at the freeRADIUS documentation not pfSense documentation for the MySQL tables used by freeRADIUS.

                          Signatures are a sign of having signatures.

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