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

    CaptivePortal w/ Users database

    Scheduled Pinned Locked Moved Captive Portal
    12 Posts 3 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.
    • L
      lynx
      last edited by

      I'm using pf2.0.3

      I want to set up a captive portal for my WIFI that is connected to my pfbox..

      I want to create a database of users w/ passwords.. let's say username: user123  password:321resu

      so every time the user connects to my wifi, they need to log-in to my portal and they need to use the username and password assigned to them.. the one I created in my database…

      IS THIS POSSIBLE?

      can you help me please. thanks

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        Hello.

        First of all: why stick with an old version ? The latest version is 2.1.3, not 2.0.3.

        Have a look at the System menu, sub menu User Manager. You could define users there with a password for each that can access the portal interface.

        What do you mean with 'database' ?

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • L
          lynx
          last edited by

          @Gertjan:

          First of all: why stick with an old version ? The latest version is 2.1.3, not 2.0.3.

          I have no luck in 2.1.3.. my squid + squidguard + allias + rules wont work in 2.1.3 even fresh install… then I try the 2.0.3 and do same thing in 2.1.3..this time it all work perfectly..so Im staying here in 2.0.3

          @Gertjan:

          Have a look at the System menu, sub menu User Manager. You could define users there with a password for each that can access the portal interface.

          What do you mean with 'database' ?

          I have nearly thousand of possible user.. I have a student database in our school laboratory… they have their own account username and password... my plan is Ill use the same account in that database...

          when a user try to connect to my WIFI, they have to log in to the portal... and they will use the account they have in laboratory...

          so the portal will check from the database if the details entered are on it...

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by

            I still don't really get what your database is, but of course I understood it is a list with users. It might be an Open Office spreadsheet page, or a MySQL (or MsSQL) (real) database.

            The good news:
            Adding some data base support to pfSEnse isn't that hard, some examples exists already on this forum.
            Then take a look at /usr/share/captiveportal/index.php:
            function $loginok = local_backed($_POST['auth_user'], $_POST['auth_pass']); (lines 220 - 230)

            All boils down to: rewrite your version of local_backed() that access your database.
            See /etc/inc/auth.inc : line 295.

            A plan B would be: have a look how the config of pfSense is being stored.
            Here /conf/config.xml
            Now, export (only) the captive portal setting.
            This is the model that you have to re-generate.
            You could use C, Basic, PHP, whatever to export users from the data base to a file that has the same format as the exported captive portal settings.
            When well done, import the file (you generated) back in.

            Plan C: always works but tedious: sync your database by hand …

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 0
            • L
              lynx
              last edited by

              actually the database Im planning to use is from my ACTIVE DIRECTORY … if thats not possible, Ill use sql or excel .. anything that will allow me to export users, many user accounts ONE TIME only...

              1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan
                last edited by

                @lynx:

                actually the database Im planning to use is from my ACTIVE DIRECTORY …

                Finally, some détails arrive  ;)

                Google + ACTIVE DIRECTORY + PfSense => (click !) => https://www.google.fr/?gfe_rd=cr&ei=okCIU7T3Do7-4wa334D4Bw#q=active+directory+pfsense isn't good for you ?

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                1 Reply Last reply Reply Quote 0
                • L
                  lynx
                  last edited by

                  @Gertjan:

                  @lynx:

                  actually the database Im planning to use is from my ACTIVE DIRECTORY …

                  Finally, some détails arrive  ;)

                  Google + ACTIVE DIRECTORY + PfSense => (click !) => https://www.google.fr/?gfe_rd=cr&ei=okCIU7T3Do7-4wa334D4Bw#q=active+directory+pfsense isn't good for you ?

                  hehehe sorry..

                  thanks! Ill check and try this one! wish me success :D

                  1 Reply Last reply Reply Quote 0
                  • L
                    lynx
                    last edited by

                    I tried to follow the tutorial based on how I understand it…

                    but I got this under system user manager setting SAVE and TEST

                    Testing pfSense LDAP settings... One moment please...

                    Attempting connection to                                   OK
                    Attempting bind to                                             OK
                    Attempting to fetch Organizational Units from failed

                    can you help me point out where and in what part I did wrong? Thanks

                    …..
                    on my set up , this one doesn't show up, Im missing this one

                    and if I click SELECT in Authentication Container nothing happens, If I leave it blank and click SELECT it say I should type something on it

                    My domain name is    mydomain.edu.localnetwork  ..I have two dots… most examples are mydomain.local only... mine happens to be mydomain.edu.localnetwork

                    1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan
                      last edited by

                      Well, I hope an " ACTIVE DIRECTORY" expert will drop by.

                      I know what it is, but I never joined the $$$ Microsoft training courses.

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      1 Reply Last reply Reply Quote 0
                      • L
                        lynx
                        last edited by

                        @Gertjan:

                        Well, I hope an " ACTIVE DIRECTORY" expert will drop by.

                        I know what it is, but I never joined the $$$ Microsoft training courses.

                        Thank you sir…

                        do you have other different way and solution..I'd like to try.. :)

                        1 Reply Last reply Reply Quote 0
                        • L
                          lynx
                          last edited by

                          this is solved.. using different approach/way ..

                          thanks all. :)

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

                            hello. pfSense program database server pull data out of the computer, the data is pulled username and password I need something to distribute. Is there anyone that can help?

                            "server program on the computer that will receive the passport number and room number, they will give you the username and password assigned as the internet."

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