12.3. Custom Pages And Files

It is possible to customize the HTML pages that are used for the Captive portal authentication process. The page that does the authentication itself an be changed as well as the default page that is shown for a failed authentication. Graphics files can also be loaded into the SmallWall device for use on these pages, up to a maximum of 256 KB.

Optionally a redirected URL can be used where clients will be redirected instead of the one they initially tried to access after they've authenticated. After reading this information they are free to access the remote networks since they have already been authenticated.

Below are the parameters for custom pages and files.

12.3.1. Portal Page Contents

Upload an HTML 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" input fields if authentication is enabled, otherwise it will always fail. Example code for the form:

<form method="post" action="$PORTAL_ACTION$">
   <input name="auth_user" type="text">
   <input name="auth_pass" type="password">
   <input name="redirurl" type="hidden" value="$PORTAL_REDIRURL$">
   <input name="accept" type="submit" value="Continue">

12.3.2. Authentication Error Page Contents

The contents of the HTML file that you upload here are displayed when an authentication error occurs. You may include "$PORTAL_MESSAGE$", which will be replaced by the error or reply messages from the RADIUS server, if any. You may also include a new login form in the error page to allow the user to attempt another login directly.

12.3.3. Custom Files

The loading page for custom files can be found in the File Manager section of the Captive Portal main menu.

Any files that you upload here will be made available in the root directory of the captive portal HTTP(S) server. You may reference them directly from your portal page HTML code using relative paths. Example: you've uploaded an image with the name 'test.jpg' using the file manager. Then you can include it in your portal page like this:

<img src="test.jpg" width=... height=...> 

The total size limit for all files is 256 KB.