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

    captive portal settings not saved

    Scheduled Pinned Locked Moved Captive Portal
    captive portalsave error
    7 Posts 3 Posters 1.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.
    • Y
      yanqian
      last edited by

      I installed a new pfsense 2.4.5 P1, tried to create the captive portal settings, but it cannot be saved.

      Here is what I did:
      Add zone > input zone name > save and continue > Enable Captive Portal, complete all the configuration > Save

      Here is the screen capture:

      CP_save_issue.png

      Does anyone else have the save issue ?
      May I know what other information should I provide to troubleshoot this ?

      Thank you!

      1 Reply Last reply Reply Quote 0
      • Y
        yanqian
        last edited by yanqian

        I did more tests, tried to add several captive portal zones, it seems that when I use "VIP" as zone name, it will shows as the capture, i.e. zone name and interface info columns show nothing. When I use other names as zone name, for example "abc" or "test", it will display well.

        If mouse is moving over the edit or delete icon of the blank one (the screen capture in last post, VIP zone), I can see the link shows as:

        https://192.168.1.1/services_captiveportal.php?zone=vip
        https://192.168.1.1/services_captiveportal_zones.php?act=del&zone=vip

        If I click "edit", it shows the zone is not enabled (but I did enable it before), I enable it (again), finish the settings in the configuration page, then Save. It is still the same, then I click "edit", it shows the zone is not enabled...

        I also checked captive portal config files created via SSH, the zone config file named "vip" does exisit here.

        ls -l /var/etc/nginx-*
        -rw-r--r-- 1 root wheel 2592 Jul 25 09:20 /var/etc/nginx-abc-CaptivePortal-SSL.conf
        -rw-r--r-- 1 root wheel 2099 Jul 25 09:20 /var/etc/nginx-abc-CaptivePortal.conf
        -rw-r--r-- 1 root wheel 2596 Jul 25 09:12 /var/etc/nginx-test-CaptivePortal-SSL.conf
        -rw-r--r-- 1 root wheel 2101 Jul 25 09:12 /var/etc/nginx-test-CaptivePortal.conf
        -rw-r--r-- 1 root wheel 2450 Jul 25 09:13 /var/etc/nginx-vip-CaptivePortal-SSL.conf
        -rw-r--r-- 1 root wheel 1957 Jul 25 09:13 /var/etc/nginx-vip-CaptivePortal.conf
        -rw-r--r-- 1 root wheel 2365 Jul 24 21:48 /var/etc/nginx-webConfigurator.conf

        I am not sure if others can reproduce this issue, maybe more tests are needed. It is some kind of weird, I will submit a ticket in bug tracker if others can reproduce this issue.

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

          I'm seeing the same thing. Using VIP as a zone name/identifier doesn't work out.
          Keep in mind : VIP is a reserved word, as it stands for Virtual IP.

          I advise you to chose another nam ;).

          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 1
          • Y
            yanqian
            last edited by

            Hi, Gertjan,
            Thank you, I will use another name.

            BTW,
            I got the php logs every minute:

            Jul 26 18:12:57 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration!
            Jul 26 18:13:58 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration!
            Jul 26 18:14:58 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration!
            Jul 26 18:15:58 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration!
            Jul 26 18:16:59 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration!
            Jul 26 18:17:59 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration!
            Jul 26 18:18:59 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration!
            Jul 26 18:20:00 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration!

            I had tried to restart PHP-FPM, it didn't work.

            1 Reply Last reply Reply Quote 0
            • Y
              yanqian
              last edited by

              Hi, I did some search in this forum, it was related to minicron job, then I found the two processes using ps command:

              root 89145 0.0 0.0 6192 2020 - Is Sat09 0:00.00 /usr/local/bin/minicron 60 /var/run/cp_prunedb_vip.pid /etc/rc.prunecaptiveportal vip
              root 89445 0.0 0.0 6192 2028 - S Sat09 0:00.13 minicron: helper /etc/rc.prunecaptiveportal vip (minicron)

              I killed these two processes, and no more logs generated.
              I am not sure if this is a proper way to handle this, if someone has better idea, please reply this post and let me know, thank you!

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

                The two minicron: helper /etc/rc.prunecaptiveportal vip tasks are responsible for ejecting connecting users
                When you start the portal, these are also created.
                Right now, the hard time out and soft time out are working anymore for you.

                I advise you to export the config.xml, remove the VIP portals entries manually, and import the config.xml again. That will get rid of it.

                In the

                <captiveportal>
                

                section you'll find the <VIP> block, delete the entire section.

                @yanqian said in captive portal settings not saved:

                Jul 26 18:12:57 php-cgi rc.prunecaptiveportal: vip is not a valid zone in the configuration

                Well, the log told you what the issue was. Now its official ;) => Don't use reserved PHP key words.

                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 1
                • viktor_gV
                  viktor_g Netgate
                  last edited by

                  Issue created: https://redmine.pfsense.org/issues/10798

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