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

    Captive portal html and images….

    Scheduled Pinned Locked Moved Captive Portal
    26 Posts 7 Posters 17.2k 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.
    • GertjanG
      Gertjan
      last edited by

      Try this line (the image should already be there)

      
      [![](pfsense.jpg)](http://www.pfsense.com) 
      
      

      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
        lir
        last edited by

        thanks will do.
        ill report back

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

          Okey so I'm still having the problem even with that link but I managed to over come it.

          here are the files…

          cd /usr/local/captiveportal/

          ls -al

          total 46
          drwxr-xr-x  2 root  wheel    512 May 24 07:34 .
          drwxr-xr-x  16 root  wheel    512 May 21 06:25 ..
          -rwxr-xr-x  1 root  wheel  14120 Jan  2 23:46 index.php
          lrwxr-xr-x  1 root  wheel    27 May 24 07:31 logo.GIF -> /var/db/cpelements/logo.GIF
          lrwxr-xr-x  1 root  wheel    27 May 24 07:31 logo.JPG -> /var/db/cpelements/logo.JPG
          lrwxr-xr-x  1 root  wheel    27 May 24 07:31 logo.PNG -> /var/db/cpelements/logo.PNG
          lrwxr-xr-x  1 root  wheel    27 May 24 07:31 logo.bmp -> /var/db/cpelements/logo.bmp
          -rw-r--r--  1 root  wheel  10049 Jan 15 03:33 radius_accounting.inc
          -rw-r--r--  1 root  wheel  4255 Jan 15 03:33 radius_authentication.inc

          and here are the files on /var/db/cpelements

          ls -al /var/db/cpelements/

          total 200
          drwxr-xr-x  2 root  wheel    512 May 24 07:33 .
          drwxr-xr-x  9 root  wheel    512 May 24 07:32 ..
          -rw-r--r--  1 root  wheel  11359 May 24 07:31 logo.GIF
          -rw-r--r--  1 root  wheel  11033 May 24 07:31 logo.JPG
          -rw-r--r--  1 root  wheel    4880 May 24 07:31 logo.PNG
          -rw-r--r--  1 root  wheel  169798 May 24 07:31 logo.bmp

          so i figured out that i can see the file only if it's located on /usr/local/captiveportal and with no link or anything, like this:
          -rw-r--r--  1 root  wheel  11033 May 24 07:33 logo.jpg

          SO... thats the fix.

          1 Reply Last reply Reply Quote 0
          • J
            jeroen234
            last edited by

            thats no bug thats normal captive working
            if you ask for www.google.com it redirecting the www.google.com ip to youre pfsense ip until youre accepted

            if portal is on and you have jpg logo.jpg then all these jpg's are the same until youre cleard

            www.google.com/logo.jpg
            www.msn.com/logo.jpg
            www.hotmail.com/logo.jpg
            etc etc

            so you must make links to root in youre captive portal webpage

            will work for all the links

            ps.  never use uppercase in filenames (logo.JPG) webservers and webbrowsers don't like that
            only lowercase

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

              you didnt understand the problem the way i presented it.
              i said that when i upload files it puts a link in /usr/local/captiveportal of them that points to /var/db/cpelements
              thats what happens when i upload images from the admin gui.
              this way it DOES NOT WORK. no matter if its upper case, lower case or without a case.

              if i try manually to ssh to the machine and leave the filename at /usr/local/captiveportal (no links), just put the actual logo.jpg file
              in /usr/local/captiveportal and doesnt make a link out of it then its just fine.

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

                Could someone explain how to fix this image issue to a BSD lamen?

                I am very unfamiliar with BSD command line arguments and am having problems copying my logo.png into the '/usr/local/captiveportal/' directory so it will show correctly on my capture portal.  Every time I try to copy my 'logo.png' file from either the '/var/db/cpelements' dir or the '/tmp' dir (I used the GUI to upload it there) I am met with a "Read-only file system" error.

                I am running BETA 4 embedded on a WRAP equiped with a 128MB CF card.  If someone could take a minute or two to explain the commands I need to know and the steps I need to take to resolve this issue, I would greatly appreciate it.

                Thnx in advance,

                -DrNO

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

                  @DrNo:

                  Could someone explain how to fix this image issue to a BSD lamen?

                  I am very unfamiliar with BSD command line arguments and am having problems copying my logo.png into the '/usr/local/captiveportal/' directory so it will show correctly on my capture portal.  Every time I try to copy my 'logo.png' file from either the '/var/db/cpelements' dir or the '/tmp' dir (I used the GUI to upload it there) I am met with a "Read-only file system" error.

                  I am running BETA 4 embedded on a WRAP equiped with a 128MB CF card.  If someone could take a minute or two to explain the commands I need to know and the steps I need to take to resolve this issue, I would greatly appreciate it.

                  Thnx in advance,

                  -DrNO

                  None of this is required.  Simply upload the image to the element manager.  It will handle everything.

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

                    @sullrich:

                    None of this is required.  Simply upload the image to the element manager.  It will handle everything.

                    I did upload the image from the file manager under the captive portal menu, but when the captive portal splash page shows the image is broken.

                    My code should be fine:

                    ![](logo.png)
                    

                    After reading this post I got the impression that there is a bug in pfSense and a work around is copying the picture into the captiveportal directory rather than relying on the refering link.  My problem is that I'm using an embedded version of pfSense and I have only read only access to the system, and I have no idea how to get around this.

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

                      Run the following commands from the shell:

                      /etc/rc.conf_mount_rw
                      /etc/rc.conf_mount_ro

                      Should be obvious what they do.

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

                        The view captive portal link is broken but users surfing to the page will get the images.  If you are simply viewing the page and pronouncing it broke because of this fact then you need to really test with a captive portal client.

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

                          Okay I tested this again and found some minor errors…

                          png wasn't working.

                          Anything upper or mixed case wouldnt have worked:

                          ie: Jpg

                          If you are running a full installation do a cvs_sync.sh releng_1 && shutdown -r now

                          If not, Diagnostics, Edit file and overwrite the code with this:

                          http://cvs.pfsense.com/cgi-bin/cvsweb.cgi/pfSense/etc/inc/system.inc?rev=1.79.2.38;content-type=text%2Fplain;only_with_tag=RELENG_1

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