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

    What is needed to tweak the code of the captive_portal.inc files?

    Scheduled Pinned Locked Moved Development
    4 Posts 3 Posters 1.3k 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.
    • V
      vanmanhpbc1998
      last edited by

      Hi everyone,
      I'm quite new to PfSense.
      I wanted to intercept the Captive Portal user sign in process to make some configuration of my own (with regards to bandwidth assignment in particular).
      Upon manually changing the captiveportal.inc file using the vim editor. I'd found that the captiveportal tab stopworking completely. (It was some error indicating that there are some sort of security issues).
      Is it because PfSense has some mechanism built-in to prevent these edit? What does it take to edit these .inc file? Do I have to rebuild the whole thing from source code?

      Thank you!
      Cheers!

      1 Reply Last reply Reply Quote 0
      • S
        Steve_B Netgate
        last edited by

        There is no such mechanism. If you edited the file and it broke, the breakage was caused by your edit.

        Als ik kan

        V 1 Reply Last reply Reply Quote 1
        • V
          vanmanhpbc1998 @Steve_B
          last edited by vanmanhpbc1998

          @steve_b Hi,
          I've tried it again and it works.

          The last time I was copying the entire folder from the Virtual Machine to my ubuntu host and use VSCode to edit, then copy the entire text back to the .inc file.

          I suppose that should not be the problem but I'm putting it here just in case.

          Anyways I can edit this now
          Thanks!

          Also if I can ask this here. I'm unable to install vim or neovim on the pfsense server. Is there a reason for it? How would you set up an editor for this type of customization?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Normally you would not edit files in that way on the firewall directly.

            Many of us work in one of the following ways:

            • Edit remotely by loading and saving over ssh or scp which is supported by many popular editors
            • Edit a file in a local copy of the Git repository and then copy the edited file to the firewall by scp
            • Edit a file in a local copy of the Git repository and then load the file in Diagnostics > Edit File and paste the new content
            • Making minor/simple on the firewall directly changes using vi, ee, or Diagnostics > Edit File without extra steps

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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