Navigation

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

    My modern Captive Portal/Login template

    Captive Portal
    5
    6
    6614
    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.
    • M
      mrbrax last edited by

      Since i couldn't find a good looking one when i first set up our box, i made my own.
      I do web design/programming on my spare time, so this was my contribution.

      It needs an external file host (or if you like ftp'ing into your box then go for it ), and it has a font from Google's API.
      It's also optimized for modern browsers (HTML5/CSS3), so if your clients are still on XP and <ie8 then="" you="" should="" consider="" moving="" into="" the="" future="" ;)<br="">Our internal version has a squid3 username collector since the pfsense one just makes the network stop working, so i had to cut that out.
      I had to do this without being able to check the final result, so please tell me if it just doesn't work at all.

      Installation
      Copy sg_handle folder to a webpage host
      Upload captive.php to all captive portal upload fields in the pfSense section.

      Features

      • Username+Password login (no vouchers)
      • Logout button (detects if the user is logged in)
      • Some neat animations
      • Responsive design for smaller displays (phone/tablet)
      • Tabs with links to your webmail e.g. (add it to exlusions so users can quickly access it without logging into the portal)
      • base64 encoded reference with user IP and MAC address so you can add them to the exclusions by them providing the string.
      • Footer with support information

      Settings you might want to configure:
      captive.php

      • $site_url
      • $site_title
      • tab links
      • login/logout messages + button text

      action.css

      • website url

      I don't really know anything about licenses, so i put it on the GNU License, since i copied code that had it - i don't really care about my code being modified.

      (the screenshots use our internal version, it looks slightly different with the images/text)




      captive-redist-1.0.0.zip</ie8>

      1 Reply Last reply Reply Quote 0
      • R
        redeyes last edited by

        Can you help me with the code.

        How to  redirect to the login page instead of  logout message after logging out ?

        Thank you.

        1 Reply Last reply Reply Quote 0
        • U
          uv4487 last edited by

          "Installation
          Copy sg_handle folder to a webpage host"

          I didnt understand where i upload this sg_handle folder to upload?

          1 Reply Last reply Reply Quote 0
          • Gertjan
            Gertjan last edited by

            @redeyes:

            How to  redirect to the login page instead of  logout message after logging out ?

            When the "logout" (from the file "captive/php" is fired, it will NOT be handled by 'pfSense'.
            But, checkout out first /usr/local/captiveportal/index.php line 236, this is the line that checks loggins using local Manager and user/password  authentication.
            How to redirect is shown over there.

            Be careful that redirecting from the logout page to the login page - and the you logn again - will/can redirect you to the …. logout page.

            Have also a look at line 73 that handles 'pfSense', own logout page.

            @uv4487:

            I didnt understand where i upload this sg_handle folder to upload?

            You can put that folder on a (read = any) web host.
            I advise you to put it on your pfsense system in /usr/local/captiveportal
            remember to adapt the 'captive.php' line 51 - like
            $site_url = "sg_handle"; // external host with sg_handle folder

            If you put it here :
            $site_url = "http://wwww.your-web-server-on-the.net/sg_handle"; // external host with sg_handle folder
            the add the domain "your-web-server-on-the.net" on the tab
            ServicesCaptive Portalcpzone1Allowed Hostnames
            or add it's Ip on the tab:
            ServicesCaptive Portalcpzone1Allowed IP Addresses

            1 Reply Last reply Reply Quote 0
            • I
              iNCONIX last edited by

              mrbrax

              Please post .ZIP file again

              action.js is 0k

              Do not login

              tks

              1 Reply Last reply Reply Quote 0
              • M
                mrbrax last edited by

                @iNCONIX:

                mrbrax

                Please post .ZIP file again

                action.js is 0k

                Do not login

                tks

                How am i supposed to post it if i'm not allowed to log in? ;)

                It is supposed to be empty, yes. Not sure why i provided it at all.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                Products

                • Platform Overview
                • TNSR
                • pfSense Plus
                • Appliances

                Services

                • Training
                • Professional Services

                Support

                • Subscription Plans
                • Contact Support
                • Product Lifecycle
                • Documentation

                News

                • Media Coverage
                • Press
                • Events

                Resources

                • Blog
                • FAQ
                • Find a Partner
                • Resource Library
                • Security Information

                Company

                • About Us
                • Careers
                • Partners
                • Contact Us
                • Legal
                Our Mission

                We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                Subscribe to our Newsletter

                Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                © 2021 Rubicon Communications, LLC | Privacy Policy