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.
    • 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
                                  • B
                                    buraglio
                                    last edited by

                                    @aneip:

                                    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.

                                    I plugged this into my test box and it works pretty well.
                                    It's a pretty cool start and would be nice to have in the system to build off of.  I'm willing, time permitting, to write a simple patch for the CP to enable this from the services > captive portal page if there is interest.

                                    nb

                                    https://www.forwardingplane.net/

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