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

    Captive portal issue

    Scheduled Pinned Locked Moved Captive Portal
    5 Posts 3 Posters 469 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.
    • M
      mra
      last edited by

      In a captive portal, I'm creating 3 different zones with different quota settings. However, users in Zone1 can access Zone2 and Zone3. I want Zone1 users to only access Zone1. The quota settings for the zones are not working; internet usage continues even after the quota is exhausted. How can I resolve these issues?

      zone1: localzone -- 192.168.100.1/24
      zone2: wifi1zone -- 172.10.10.1/24
      zone3: wifi2zone -- 172.10.20.1/24

      The zones are configured as stated, but users from 'localzone' can still log in to 'wifi1zone' captive portal and access other zones in the same way.
      What should happen is that users from "localzone" should only have access to the "localzone" captive portal.

      I am waiting for your helps in this matter.

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

        Hi,

        @mra said in Captive portal issue:

        zone1: localzone -- 192.168.100.1/24
        zone2: wifi1zone -- 172.10.10.1/24
        zone3: wifi2zone -- 172.10.20.1/24

        By default, these 3 interfaces have no firewall rules.
        So, nobody can access nothing suing any of these 3.
        Then you added firewall rules....

        @mra said in Captive portal issue:

        The quota settings for the zones are not working; internet usage continues even after the quota is exhausted. How can I resolve these issues?

        What did you do to enforce quotas ?
        What quotas : Amount of Download and Upload Traffic - or time based ?

        @mra said in Captive portal issue:

        but users from 'localzone' can still log in to 'wifi1zone' captive portal

        Who do you identify / authenticate users ?

        @mra said in Captive portal issue:

        What should happen is that users from "localzone" should only have access to the "localzone" captive portal.

        Normally, a modern OS will handle a new network as public : il will not use niether share any any local resources.
        Modern access points can be put in "AP Isolation" mode : none of the Wifi connected devices can 'see' each other'. But be carefull if you have more then one AP on a portal segment : users from AP1 can 'see' wifi connected users on AP2 (AP1 and AP2 being on the same network). To change this : you'll be needing MAC ( ! ) based firewall rules on each AP ... Or maybe the AP has also user (GUI) setting :for this.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        M 1 Reply Last reply Reply Quote 0
        • M
          mra @Gertjan
          last edited by

          @Gertjan thank you for replying.

          What kind of firewall rule should I write? I need to group the users, otherwise users will always be able to log in to other captive portals.

          WiFi will broadcast SSID without a password, and when it automatically redirects to the captive portal, it will be necessary to log in with local users.

          My problem is that when connected to wifi1's wifi, the user who needs to log in to wifi2 will also be able to log in to wifi1. In this way, I want to create a user group for wifi1 and connect only to wifi1 captive portal.

          GertjanG 1 Reply Last reply Reply Quote 0
          • F
            FSC830
            last edited by

            A possible approach could be to setup 3 (at least 2) RADIUS servers for authentication.
            So you can use in each zone a dedicated authentication server (and/or the local database).
            Users from other zones cant access.
            But this is a very oversized and uncomfortable solution, you need to administrate different authentication servers and need to know, which user is to create at which server.
            Anyhow, I do not see any other way using default pfSense configuration.

            Cant find any menuitem to allow/disallow zone access at a per user/group object.

            Regards

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

              @mra said in Captive portal issue:

              My problem is that when connected to wifi1's wifi, the user who needs to log in to wifi2 will also be able to log in to wifi1. In this way, I want to create a user group for wifi1 and connect only to wifi1 captive portal.

              I think I have a solution for you.
              No radius needed, just pfSense.

              Locate Line 263 of the main portal /usr/local/captiveportal/index.php file.
              It's an empty line, just before the function

              $auth_result = captiveportal_authenticate_user($user, $passwd, $clientmac, $clientip, $pipeno, $context)
              

              where a user name and password are used to check if a user is authorized.

              These are your 'zone' names :
              zone1: "localzone"
              zone2: "wifi1zone"
              zone3: "wifi2zone"

              Add this single line line :

              	$user = $cpzone.$user;
              

              83d222f4-9aef-4828-8e72-4032dad7700a-image.png

              Now, goto the pfSense User manager.

              Example :
              Let's presume you have a user called "001" that is allowed to visit your "localzone" captive portal.
              Make the user info look like this :

              fa0a71c4-6ec4-4059-937d-69e0b99e8fb3-image.png

              If user "001" also needs to be able to visit the "wifi1zone" portal zone add another user like this :

              2d5831ad-c7db-4e93-a13b-ce20cf95a3a6-image.png

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