Custom page for "After authentication Redirection URL"



  • hello,

    Is it possible to create a custom page in pfSense where the user is redirected to after a succesfull login?
    I know I can use "After authentication Redirection URL" and put and URL there (Google by example), but thats not what I want.

    I want a page, "Welcome to…." and some disclamer text and buttoms to 2 websites that a frequently used and Google.
    Is it possible to configure/edit that in/on pfSense

    Thanks for the help.



  • Hi !

    Create a file called "index2.html".
    Throw into this file your ""Welcome to…." and some disclamer text and buttoms to 2 websites that a frequently used and Google".

    Take note of the IPv4 pfSense is using for your captive portal (normally, it would be 192.168.2.1 if you are running the captive portal the OPT interface, LAN being your first internal interface).

    Now, in the settings of your captive portal, set the "After authentication Redirection URL" to http://192.168.2.1/**captiveportal-**index2.html
    You saw that right : add "captiveportal-" to the file name.

    Done.

    Note : you can also work with PHP files.
    Note : if you have a web site some where on the net, put the page (lets say : index2.html) up there. The "After authentication Redirection URL" would be http://your-web-site.tld/index2.html



  • This would be great for me. I have been using a separate LAMP server just for this. Where do you put the "index2.html" file? thanks



  • Where do you put the "index2.html" file?

    In the "file manager" tab under captive portal. Note that as Gertjan said when you upload the file pfsense will automatically add prefix captiveportal-.

    ![Screen Shot 2016-10-08 at 12.10.27.jpg](/public/imported_attachments/1/Screen Shot 2016-10-08 at 12.10.27.jpg)
    ![Screen Shot 2016-10-08 at 12.10.27.jpg_thumb](/public/imported_attachments/1/Screen Shot 2016-10-08 at 12.10.27.jpg_thumb)



  • Thanks everyone. I finally got this to work. I had to make one modification. I had to change "After authentication Redirection URL" from 192.168.100.1/captiveportal-PC.html to 192.168.100.1:8002/captiveportal-PC.html.The URL for the main captive portal page contains the port 8002 and the second page never would come up until I added the port to it. Hope this helps anyone who might run into this issue.


Log in to reply