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

Customization of authentication page

Scheduled Pinned Locked Moved Captive Portal
12 Posts 6 Posters 26.8k 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.
  • P
    pfsenseo
    last edited by Oct 25, 2011, 12:14 PM

    Hello community,

    I've modified the login and others pages of my pfsense 2.0 captive Portal.

    Can someone explain to me how to reset the authentication page to the original ??
    And others.

    Thanks in advance to any guru !

    1 Reply Last reply Reply Quote 0
    • W
      wallabybob
      last edited by Oct 25, 2011, 11:30 PM

      If I recall correctly there is no "original" captive portal authentication page: right from installation the pfSense administrator has had to supply one.

      1 Reply Last reply Reply Quote 0
      • G
        Gertjan
        last edited by Oct 28, 2011, 1:47 PM

        Sure about that ??

        Something that seems to be a default page is present in
        /etc/inc/captiveportal.inc

        Look for
        function get_default_captive_portal_html()
        starting at line 52  ;)

        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
        • P
          pfsenseo
          last edited by Oct 28, 2011, 10:12 PM

          Firstly  thanks a lot to you wallabybob & Gertjan !

          My question is how to restore those two screen :

          pfsense 2.0 default captive portal:

          and this one (when credential are incorrect):

          I've personalized them on my pfsense 2 and would like to restore them ??

          Thanks in advance for your help.

          1 Reply Last reply Reply Quote 0
          • G
            Gertjan
            last edited by Oct 28, 2011, 10:37 PM

            Don't have my pfSense nearby, so I propose you what I should do (try):
            If memory serves me well, the html code for these portal login pages are stored in the config file.
            Export the config file - it's an XML file.
            Edit it, empty the part that contains YOUR html code.
            Don't touch anything else.
            Import it back in pfSense.

            The field will be empty, pfSEnse will propose the build-in pages, as shown above.

            Btw: this was valid for 1.2.3 - I'm using 2.0 Release for 2 days now, and still under a shock. pfSense was amazing, now it became incredible …

            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
            • P
              proff_g33k
              last edited by Sep 21, 2012, 9:35 AM Sep 21, 2012, 8:35 AM

              what you upload customized login and logout page is stored inside

              login page
              /var/etc/captiveportal.html

              logout page
              /var/etc/captiveportal-logout.html

              and error page

              /var/etc/captiveportal-error.html

              you can browse it in
              diagnostic->edit file
              and also you can change it from there.

              I have tried to delete these files but it recovered automatically,
              I'm not sure how to do this but there is something you can do with these files

              what you upload via file manager is stored at,
              /var/db/cpelements/captiveportal-logout.html

              and php file is at
              /usr/local/captiveportal/index.php

              1 Reply Last reply Reply Quote 0
              • G
                Gertjan
                last edited by Sep 21, 2012, 10:02 AM

                Editing these files will do the job …
                But you will be in for a surprise when you reboot the system.

                Keep in mind: ALL settings of pfSEnse are stored in one file: /cf/conf/config.xml - also these login pages.
                All "setting files", like the 'portal login html page' will be recreated on system start.

                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
                • ?
                  A Former User
                  last edited by Sep 30, 2012, 3:44 PM

                  @Gertjan:

                  Editing these files will do the job …
                  But you will be in for a surprise when you reboot the system.

                  Keep in mind: ALL settings of pfSEnse are stored in one file: /cf/conf/config.xml - also these login pages.
                  All "setting files", like the 'portal login html page' will be recreated on system start.

                  what is the surprise after a reboot? pages dont save?

                  i am looking to edit the current file (and make a backup of the file plus my config before i upload new files) and came across this thread in a search.

                  1 Reply Last reply Reply Quote 0
                  • G
                    Gertjan
                    last edited by Oct 2, 2012, 5:47 AM

                    @tomdlgns:

                    what is the surprise after a reboot? pages dont save?

                    Well… of course - they do save. As long as you stick with the pfsense way of entering them: using the pfsense PHP web interface.

                    But when you edit the default login page and the error page directly, they aren't stored in the the /cf/conf/config.xml file.
                    Try so, and reboot.
                    You see what's happens  ;)

                    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
                    • C
                      carcar
                      last edited by Oct 23, 2012, 5:28 AM

                      hi there!
                      Can I have also a GUIDE on how to edit my captiveportal.html file permanently? Always having problem during system reboot, it will revert to its original file.

                      thanks!
                      @Gertjan:

                      Editing these files will do the job …
                      But you will be in for a surprise when you reboot the system.

                      Keep in mind: ALL settings of pfSEnse are stored in one file: /cf/conf/config.xml - also these login pages.
                      All "setting files", like the 'portal login html page' will be recreated on system start.

                      1 Reply Last reply Reply Quote 0
                      • W
                        wallabybob
                        last edited by Oct 23, 2012, 6:00 AM

                        @carcar:

                        Can I have also a GUIDE on how to edit my captiveportal.html file permanently? Always having problem during system reboot, it will revert to its original file.

                        Why can't you use a custom portal page? (See Services -> Captive Portal, on the Captive Portal tab scroll down to Portal Page Contents (near the bottom).)

                        1 Reply Last reply Reply Quote 0
                        • C
                          carcar
                          last edited by Oct 25, 2012, 2:31 PM

                          Thank you… works fine now  :o
                          @wallabybob:

                          @carcar:

                          Can I have also a GUIDE on how to edit my captiveportal.html file permanently? Always having problem during system reboot, it will revert to its original file.

                          Why can't you use a custom portal page? (See Services -> Captive Portal, on the Captive Portal tab scroll down to Portal Page Contents (near the bottom).)

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                            This community forum collects and processes your personal information.
                            consent.not_received