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

    Captive Portal not using uploaded custom HTML?

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 2 Posters 1.1k 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.
    • S
      SBTech
      last edited by

      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.

      S GertjanG 2 Replies Last reply Reply Quote 0
      • S
        SBTech @SBTech
        last edited by

        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."
        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan @SBTech
          last edited by

          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.

          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
          • S
            SBTech
            last edited by

            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.

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