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

    Important Captive Portal changes for RC2

    Scheduled Pinned Locked Moved Captive Portal
    22 Posts 6 Posters 11.6k 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.
    • H
      hoba
      last edited by

      We have introduced some fixes to the captive portal to handle everything properly which require all captive portal elements (webpages, images) to start with "captiveportal-". This was needed for the webserver that is running the captive portal to handle everything properly.

      Keep this in mind when designing captive portal pages and/or update your already existing captive portal pages and images to reflect these changes.

      Btw, you are able to use PHP pages for your captive portal too now to run some funky stuff!

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

        Another thought for those designing a captive portal interface….

        I was at a hotel today who were running some form of captive portal.  However they had no links which were marked as "free browsing"  Since I was sitting in a particularly boring meeting (union bollocks) I thought I could at least read about the hotel, but every page linked back to the captive portal login.

        In short - if the web server is local, allow free, unlogged in access.  Why not?

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

          Add this to the allowed IP-Adresses in the captive portal tab. It's already supported  ;)

          1 Reply Last reply Reply Quote 0
          • K
            krt
            last edited by

            Are there any restrictions for the Error page that differ from the Portal page with respect to image naming convention?

            I.e. What used to work doesn't.  I've renamed my 404 page's jpg to captiveportal-error.jpg and modified the html to suit.  The page source shows that the modification is correct, but I don't see an image.

            The modifications to the Portal page worked - all of my image references are captiveportal-whatever.whatever now.

            Stumped…

            [FIXED]

            Turned out to be a browser refresh issue.  PEBKAC

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

              Is there any particular reason that $PORTAL_ACTION$ and $PORTAL_REDIRURL$ aren't available in the error page? My login page uses some css to display an error message, but I'd like the user to be able to actually try again rather than just displaying an error.

              In other words if they type in the wrong userid/pass they get an error message and the form to fill out. Without $PORTAL_ACTION$ and $PORTAL_REDIRURL$  I can't seem to do this. I also can't add my own php code to the page - it's ignored and treated as content.

              SC

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

                @ScaredyCat:

                Is there any particular reason that $PORTAL_ACTION$ and $PORTAL_REDIRURL$ aren't available in the error page? My login page uses some css to display an error message, but I'd like the user to be able to actually try again rather than just displaying an error.

                Should work ok.  Are you on RC2h?

                @ScaredyCat:

                In other words if they type in the wrong userid/pass they get an error message and the form to fill out. Without $PORTAL_ACTION$ and $PORTAL_REDIRURL$  I can't seem to do this. I also can't add my own php code to the page - it's ignored and treated as content.

                If you use the captive portal element manager you can upload a custom php page and then use a meta redirect as html on the standard captive portal page and have it redirect to your custom php page where the error processing can be extended.

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

                  @sullrich:

                  Should work ok.  Are you on RC2h?

                  RC2 on a Wrap ( I don't see 'h' ) I do have the following

                  RC2
                  built on Tue Aug 1 18:56:52 UTC 2006

                  on the System Overview page… If I view the source of the error page it shows:

                  
                  <form method="POST" action="$PORTAL_ACTION$">
                  
                  and
                  
                  rather than interpreting them..
                  
                  @sullrich:
                  
                  > If you use the captive portal element manager you can upload a custom php page and then use a meta redirect as html on the standard captive portal page and have it redirect to your custom php page where the error processing can be extended.
                  
                  Ahh ok, I was trying to include php in the page but if I could get $PORTAL_ACTION$ and $PORTAL_REDIRURL$ working on the error page it wouldn't be an issue..
                  
                  SC
                  </form>
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • S
                    sullrich
                    last edited by

                    Search the forum for RC2e.  You should upgrade to RC2h.

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

                      uhmm… Several things,

                      • Is there support now for per-user bandwidth throttling on the captive portal?
                          I'm more than willing to test :)
                      • Is it possible to enlarge the file-limit of the uploaded files to the Captive Portal system? (i think its currently set to a 250kb limit)
                          This is an important issue, at least for me, cause I'm sure that even the lower specs of the servers even of the low-end line have several gigabytes of
                          hard drives so this limit seems a bit odd to hold.
                      1 Reply Last reply Reply Quote 0
                      • H
                        hoba
                        last edited by

                        There is no per user limit yet. Enlargement of the CP elements is possible (though not done yet) as we moved the embedded images to 128 MB partitionsize (mainly due to upgrade reasons). We'll have to discuss and to check how much space we are willing to give to CP elements now in order to not break upgradability. We also should discuss if we don't want to drop the limit for full installs as there most likely should be enough space to upload a bunch of files on these.

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

                          @hoba:

                          as we moved the embedded images to 128 MB partitionsize (mainly due to upgrade reasons).

                          When was this done? The images I downloaded today only create a 64mb partition - which fails to do the current upgrade due to lack of space (I daren't reboot the wrap just incase that failed upgrade will make it fail to boot). I'm currently trying to find a good way to increase the size of the partition - looks like I'll have to dl 500mb of freebsd iso just to do this :'(

                          SC

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

                            http://pfsense.com/~sullrich/1.0-SNAPSHOT-09-03-06/ has the snapshots of last night with the 128mb images. These will be upgradeable. You don't need to run an update on these atm. They are brand new.

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

                              @hoba:

                              http://pfsense.com/~sullrich/1.0-SNAPSHOT-09-03-06/ has the snapshots of last night with the 128mb images. These will be upgradeable. You don't need to run an update on these atm. They are brand new.

                              Excellent!!!

                              Thanks very much  ;D

                              SC

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

                                Ok, the image file in that direcotry is an old version that basically breaks most stuff - it reports itself as

                                1.0-SNAPSHOT-08-03-06
                                built on Sun Sep 3 21:35:19 UTC 2006

                                so if anyone else is looking at this don;t do the update.. I've basically buggered my wrap until I can get it fixed.

                                SC

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

                                  Say what?  The date is mislabeled but its absolultely the latest image.

                                  Speak up about what the problems are…

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

                                    @sullrich:

                                    Say what?  The date is mislabeled but its absolultely the latest image.

                                    Speak up about what the problems are…

                                    Ok, well first of all I'm on a wireless connection talking to the wrap and I have captive portal enabled for wireless. Every 10-15 seconds I am forced to log in again - which is a PITA - especially when trying to reply :) - idle timeout is set at 120 minutes, with no hard timeout.

                                    .. and the reason I did the update originally, is still an issue…

                                    SC

                                    update:

                                    Applied the mini update to the image, seems to have cured the captive portal logout issue, but the $PORTAL_ACTION$ and $PORTAL_REDIRURL$ are still broken for me on the error page.

                                    SC

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

                                      I have upgraded 2 systems today with that image without problems. What exactly is the problem? Non of these systems is using captive portal though.

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

                                        Please run the following from a command prompt:

                                        /etc/rc.conf_mount_rw
                                        fetch -o /usr/local/captiveportal/index.php http://www.pfsense.com/~sullrich/index.php.txt

                                        Then test again.

                                        If it still does not work, please give directions on how to reproduce problem, I have to confess that I am ignorant about those two options.

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

                                          @sullrich:

                                          Please run the following from a command prompt:

                                          /etc/rc.conf_mount_rw
                                          fetch -o /usr/local/captiveportal/index.php http://www.pfsense.com/~sullrich/index.php.txt

                                          Then test again.

                                          If it still does not work, please give directions on how to reproduce problem, I have to confess that I am ignorant about those two options.

                                          This fixes the problem but introduces another.  :) - the error page now has the correct translatons of $PORTAL_ACTION$ and $PORTAL_REDIRURL$ but the following error is generated when valid user details are supplied  to either the login or error page.

                                          
                                          Fatal error: Call to undefined function: captiveportal_get_next_ipfw_ruleno() in /usr/local/captiveportal/index.php on line 245
                                          
                                          

                                          SC

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

                                            File updated again.  Please rerun the commands outlined prior and test again.

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