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

    [2.0-RC3-IPv6] Captive Portal Port 8000 not reachable

    Scheduled Pinned Locked Moved IPv6
    7 Posts 5 Posters 9.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.
    • C
      CrisvG
      last edited by

      Hi all,

      I am running 2.0-RC3-IPv6 (amd64) and I have an issue that is reported here : http://redmine.pfsense.org/issues/1700  (though not for this version)

      I tried to beat the system by manualy adjust the /var/etc/lighty-CaptivePortal.conf to bind to all addresses again instead of only the localhost.

      However, after I restart the captive portal this conf file is overwritten.
      I even tried to chmod it 444 but that doesn't work either.

      This is the part that is currently my problem (i think) –>

      
      ## bind to port (default: 80)
      server.bind     = "127.0.0.1"
      server.port  = 8000
      $SERVER["socket"]  == "127.0.0.1:8000" { }
      $SERVER["socket"]  == "[::1]:8000" {
       }
      
      

      This makes the captive portal in-accessible from outside the localhost.

      How can I "fix" this until the bug is officially fixed? Any ideas anyone?
      Removing the lines is no use as the file is overwritten every time.

      Oh , i forgot to mention that this issue might only appear on the IPv6 release.. but i cannot confirm that.

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        @CrisvG:

        (though not for this version)

        That is for that version, 2.0-IPv6 is really 2.1-IPv6 as classified in redmine and as it will be for release. You can edit the file that generates that in /etc/inc/captiveportal.inc.

        1 Reply Last reply Reply Quote 0
        • C
          CrisvG
          last edited by

          @cmb:

          @CrisvG:

          (though not for this version)

          That is for that version, 2.0-IPv6 is really 2.1-IPv6 as classified in redmine and as it will be for release. You can edit the file that generates that in /etc/inc/captiveportal.inc.

          Hi ,

          I managed to make it work. Unfortunatly before i read your reaction.

          This is what I did (not sure if its best practise , but it works)

          I have altered the /etc/inc/system.inc file

          Old

          
           if($captive_portal == true) {
                          $lighty_config .= "server.bind  = \"127.0.0.1\"\n";
                          $lighty_config .= "server.port  = {$lighty_port}\n";
                          $lighty_config .= "\$SERVER[\"socket\"]  == \"127.0.0.1:{$lighty_port}\" { }\n";
                          $lighty_config .= "\$SERVER[\"socket\"]  == \"[::1]:{$lighty_port}\" { \n";
          
          

          New

          
           if($captive_portal == true) {
                          $lighty_config .= "server.bind  = \"0.0.0.0\"\n";
                          $lighty_config .= "server.port  = {$lighty_port}\n";
                          $lighty_config .= "\$SERVER[\"socket\"]  == \"0.0.0.0:{$lighty_port}\" { }\n";
                          $lighty_config .= "\$SERVER[\"socket\"]  == \"[::1]:{$lighty_port}\" { \n";
          
          

          This did the job for me. Now the /var/etc/lighty-CaptivePortal.conf file is not overwritten to the "default" settings anytime i make the change there.

          1 Reply Last reply Reply Quote 0
          • E
            eri--
            last edited by

            I had opened a bug report about this on redmine.pfsense.org since i found out as well this.

            The solution might be more involved and can be followed through that ticket.

            1 Reply Last reply Reply Quote 0
            • B
              bardelot
              last edited by

              Instead of editing the file and having lighty bind to all addresses you could add a port forward rule to redirect the traffic on the captive portal enabled interface to the localhost.

              1 Reply Last reply Reply Quote 0
              • J
                jilingshu
                last edited by

                @bardelot:

                Instead of editing the file and having lighty bind to all addresses you could add a port forward rule to redirect the traffic on the captive portal enabled interface to the localhost.

                This is a good idea and I have configured my server for it. I will test it later :-)
                BTW: It seems like the configurations about Hard timeout and Radius host cannot be saved. Every time I return to edit page, it would shown as 60min and empty. Is this a bug?

                1 Reply Last reply Reply Quote 0
                • J
                  jilingshu
                  last edited by

                  Yeee, the method I mentioned before can work perfectly. :-)
                  However, it seems Captive Portal cannot save most configuration. Why? I think I should open a new thread on this.

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