Customization of authentication page
-
If I recall correctly there is no "original" captive portal authentication page: right from installation the pfSense administrator has had to supply one.
-
Sure about that ??
Something that seems to be a default page is present in
/etc/inc/captiveportal.incLook for
function get_default_captive_portal_html()
starting at line 52 ;) -
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.
-
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 …
-
what you upload customized login and logout page is stored inside
login page
/var/etc/captiveportal.htmllogout page
/var/etc/captiveportal-logout.htmland 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 fileswhat you upload via file manager is stored at,
/var/db/cpelements/captiveportal-logout.htmland php file is at
/usr/local/captiveportal/index.php -
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. -
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.
-
@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 ;) -
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. -
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).)
-
Thank you… works fine now :o
@wallabybob: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).)