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

    Need pfSense captive portal tutorial—not sure, where to put HTML code

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 3 Posters 1.2k 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.
    • D
      DominikHoffmann
      last edited by

      I am a bit perplexed as to where and how to configure my captive portal with HTML code. Is there a tutorial on how to set one up somewhere?

      E 1 Reply Last reply Reply Quote 0
      • E
        EDaleH @DominikHoffmann
        last edited by

        @DominikHoffmann

        As far as the logon, failed logon and logout pages go, you set those in the captive portal itself:

        1. Navigate to Services/Captive Portal/ "select a portal and click the edit pencil icon"
        2. Scroll down and check the "Use custom captive portal page" option

        cp_custom.jpg

        1. You can start by downloading the Portal Page Contents (login page) by clicking the download button. That will provide you with a place and example from which to start.
        2. Any images or other files you want to link in your HTML can be uploaded under the "File Manager" tab at the top of the specific Captive Portal you are editing.
        3. Look under var/etc for some of the custom captive portal files.
        4. I use usr/local/captiveportal for my other custom files. This is also where you will find the index.php and logout.php files that teh portal uses. Leave this code alone until you understand it.
        D 1 Reply Last reply Reply Quote 1
        • D
          DominikHoffmann @EDaleH
          last edited by DominikHoffmann

          @EDaleH: Thank you very much! The key for me was to check “Enable to use a custom captive portal login page.” Without that, I could not get a captive portal to appear. Now, I don’t know, why, but I won’t have time to investigate that.

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @DominikHoffmann
            last edited by

            @DominikHoffmann said in Need pfSense captive portal tutorial—not sure, where to put HTML code:

            The key for me was to check “Enable to use a custom captive portal login page.” Without that, I could not get a captive portal to appear.

            This :

            06b9ae74-b82e-4b53-b203-dcc6627e0783-image.png

            option doesn't have to be check.
            If it isn't, the default login, build-in, page will be sued.

            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
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.