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

    Captive portal user self REGISTER

    Expired/Withdrawn Bounties
    8
    21
    39.4k
    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.
    • D
      dmcghee
      last edited by

      I would like to offer at least $200 USD starting out for someone to develop a way for users to build their own accounts on the captive portal. It would be acceptable for this to run on the built in dB, but even better if it could run on the freeradius package or external radius server. I have read through several posts on this topic here on the forum:

      http://forum.pfsense.org/index.php/topic,8605.0.html

      http://forum.pfsense.org/index.php/topic,648.0.html

      http://forum.pfsense.org/index.php/topic,2922.0.html

      The consensus seems to be that this would not be difficult, but I have zero knowledge of PHP or radius so….that makes it impossible for me to do without outside help. We actually had a commercial product at first ( Lok-Technology’s Air-lok) that did exactly this, but when it bite the dust we ditched it in favor of PFS.

      There are several reasons behind wanting this option but the main is time savings. We implemented PFS about 2 years ago and it has work very well in our situation. But we did not plan for the number of users we have now (~700) and implementing an authentication scheme now seems impossible unless the users can create the accounts for us (hard to take 700 calls and build an account for each).

      Thanks in advance for any consideration and if anyone else wants help put up more $$ please feel free.

      1 Reply Last reply Reply Quote 0
      • A
        aneip
        last edited by

        Dear dmcghee,

        I would be able to do this using built in DB. My proposal/understanding is something like this.

        When user connect to you network they will be presented by captive portal login page, in this page the will be a link to register page. I will develop the register page which user can fill it by them self. This page will add the user to built in database. But I need to know whether you need other function. Current the only thing this page will do it

        1. Present registration page, username, password, full name.
        2. Save the info into built in database. -> you than can view/edit/delete via captive portal/user page.
        3. Display success page and ask user to login.

        What i need to know is

        1. Do you allow anyone connecting to the network to register or there is something to check it a valid user?
        2. Do you need the page to auto set expiry date? Like xx months after register.

        Regards

        1 Reply Last reply Reply Quote 0
        • D
          dmcghee
          last edited by

          aneip,

          The page needs to be for anyone at this point, we just need to get all the people already on to register themselves. There does not need to be an expiration date on the users (hopefully they will keep our service  :D ).

          Thanks for the reply looking forward to the results…

          1 Reply Last reply Reply Quote 0
          • H
            hoba
            last edited by

            Adding the expiation date would make this useable in other scenarios though. Shouldn't be too much effort to add it….come on, do it for the community  ;D

            1 Reply Last reply Reply Quote 0
            • D
              dmcghee
              last edited by

              yeah auto adding the expiration date would make it more useable in a hotspot like senerio, so if its no trouble add it

              1 Reply Last reply Reply Quote 0
              • A
                aneip
                last edited by

                I try to code this asap. Should be really straight forward, just afraid is not what people looking for. My solutions is very simple, single php page where you upload using file manager under captive portal. Then link to this file from login page.

                1 Reply Last reply Reply Quote 0
                • D
                  dmcghee
                  last edited by

                  Thanks aneip looking forward to the results

                  1 Reply Last reply Reply Quote 0
                  • A
                    aneip
                    last edited by

                    Download the following file, rename to php.

                    Use captive portal -> file manager to upload the file.

                    Access to the file using

                    http://192.168.1.1:8000/captiveportal-register.php

                    use ur own IP. Also can link from login page. No config need. Expired date can be set as needed, can hack those very easily. For eg, to set time out 1 months after register.

                    I don't know how bounty works, but I believe this is for a good of community. If you believe I help you, some donation can be made to my paypal email -> mhanif@[nospamplz]gmail.com remove [nospamplz]

                    Please dl the 2nd one, 2.54KB -> added config lock, forgot about that till last minutes.

                    captiveportal-register.txt
                    captiveportal-register.txt

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

                      Thats pretty cool.  What would be neat is if we could enable  registration mode in the GUI to deliver this page automatically?

                      1 Reply Last reply Reply Quote 0
                      • A
                        aneip
                        last edited by

                        That's can be done but need to hack

                        index.php - put add new user as a function which register form will post all the info. Than this func will process and register a user.
                        captive portal config - allow to upload html register page and save it in captiveportal directory.

                        I'm web programmer so never get the concept of diff action. I think that what it called. Where after you sync with monowall you will run diff against the monowall source and it will add all the hacked stuff back.

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

                          @aneip:

                          That's can be done but need to hack

                          index.php - put add new user as a function which register form will post all the info. Than this func will process and register a user.
                          captive portal config - allow to upload html register page and save it in captiveportal directory.

                          I'm web programmer so never get the concept of diff action. I think that what it called. Where after you sync with monowall you will run diff against the monowall source and it will add all the hacked stuff back.

                          Yep, I was envisioning the need for index.php to be changed.  I am happy to accept patches to make this seamless and commit.  Seems m0n0walls captive-portal efforts are stalled at the moment.

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

                            I think that making this application use a real SQL backend (MySQL) would make it much more powerful and scalable.. Is this a possibility?

                            1 Reply Last reply Reply Quote 0
                            • H
                              hoba
                              last edited by

                              Freeradius support would be nice  ;)

                              1 Reply Last reply Reply Quote 0
                              • D
                                dmcghee
                                last edited by

                                aneip,

                                tested this yesterday and it seems to work great, I only have two questions. First I get the error:

                                Warning: Invalid argument supplied for foreach() in /var/db/cpelements/captiveportal-register.php on line 29

                                It continues on and works fine just displays the error.

                                The other issue is mainly my problem not knowing how to properly set this up. How do I direct users to this page first?

                                1 Reply Last reply Reply Quote 0
                                • A
                                  aneip
                                  last edited by

                                  Need to add some more checking. The error will only occur when the no user register. Once there is at least 1 user than the error should not occur. If you still got error msg even after got user please feedback here. Will check further.

                                  You can put the link in login page, the page that user see when they need to login. This page you set inside captive portal GUI page.

                                  bairdmj,

                                  Yes it possible to use the mysql. By using freeradius you can configure it to read from MYSQL. But it not really easy if wanna do it using GUI. I think php prepaid already done most of the jobs. Just need to point freeradius to php myprepaid DB. But once you setup mysql it better to setup freeradius inside that machine too rather than inside pfsense.

                                  Basically what I mean is, you need something like 'Hotspot Management System' which consist of mysql, freeradius and php application to manage those data. Than just point pfsense to radius server.

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

                                    Are you referring to a specific hotspot management system?

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

                                      this work great.  what im using now is pfsense for voip and now registation of new users but im using m0n0wall for my captive portal with radius thou visp.net as my database provider is it posiable to make it to where it would work like below.

                                      Regisation (pfsense to www.visp.net) to login page (m0n0wall)

                                      Would need the more info from the customer.
                                      Name
                                      Address
                                      city
                                      zip
                                      state
                                      how they are going to pay
                                      and what package they want.

                                      1 Reply Last reply Reply Quote 0
                                      • A
                                        aneip
                                        last edited by

                                        @bairdmj:

                                        Are you referring to a specific hotspot management system?

                                        No.. I cannot find any free one.. Most of them is commercial.

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          dingo
                                          last edited by

                                          chillispot, coovachilla, or wifidog, and paypalchilli, phpmyprepaid will about fill the bill

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            aneip
                                            last edited by

                                            @siwireless:

                                            this work great.  what im using now is pfsense for voip and now registation of new users but im using m0n0wall for my captive portal with radius thou visp.net as my database provider is it posiable to make it to where it would work like below.

                                            Regisation (pfsense to www.visp.net) to login page (m0n0wall)

                                            Would need the more info from the customer.
                                            Name
                                            Address
                                            city
                                            zip
                                            state
                                            how they are going to pay
                                            and what package they want.

                                            This would depends on visp.net API. Do they provide API to allow user registration? If they do, than this is possible. Depends whether PFSense php able to connect to their server, I think at least need CURL.

                                            Currently what I do is, call built in library of PFSense to register a new members.

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