Captive Portal not using uploaded custom HTML?



  • I have been using the captive portal for years, my current production captive portal is running PFSense 2.3.4.

    I setup a new router to test 2.4.4 and migrate over to from my productions 2.3.4. When I upload my custom page that I have been using for years it does not work as expected.

    This is the page that I upload.

    <html>
    <head>
    <title></title>
    <meta http-equiv="refresh" content="0;url=/captiveportal-redirect.php?zone=$PORTAL_ZONE$&redirurl=$PORTAL_REDIRURL$" />
    </head>
    
    <body>
    	<center>
    		<p>press the "Continue" button below to get on the Internet.</p>
    		<form method="post" action="/captiveportal-redirect.php">
    			<input name="redirurl" type="hidden" value="$PORTAL_REDIRURL$">
    			<input name="zone" type="hidden" value="$PORTAL_ZONE$">
    			<table>
    			   <tr>
    				 <td colspan="2">
    					<center><input name="accept" type="submit" value="Continue"></center>
    				 </td>
    			   </tr>
    			</table>
    		</form>
    	</center>
    </body>
    </html>
    

    When I go to the http://routerip:8002/captiveportal-redirect.php I get the expected behavior but the portal page is not redirecting to that page.

    My Goal, PFSense Captive Portal try to Auth thru Radius if that fails redirect to my Payment Page.



  • As soon as I post, I figure it out!

    • Upload my redirect page to "Auth error page contents"
    • Check "Display the login page as fallback if RADIUS MAC authentication failed."


  • What is this doing :
    @sbtech said in Captive Portal not using uploaded custom HTML?:

    <form method="post" action="/captiveportal-redirect.php">

    ?
    See info on settings page :

    Upload an HTML/PHP file for the portal page here (leave blank to keep the current one). Make sure to include a form (POST to "$PORTAL_ACTION$")** with a submit button (name="accept") and a hidden field with name="redirurl" and value="$PORTAL_REDIRURL$". Include the "auth_user" and "auth_pass" and/or "auth_voucher" input fields if authentication is enabled, otherwise it will always fail.



  • The captive-portal was setup with MAC authentication. If login fails, rather then display a login page that scripts gets the MAC address and redirects to my captive portal site which allows them to setup an account and pay with PayPal.


Log in to reply