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

    How to redirect users to their appropriate CP

    Scheduled Pinned Locked Moved Captive Portal
    3 Posts 2 Posters 442 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
      yelmo
      last edited by

      Hello PFSense friends.

      I've been touching PFS a few weeks back with a project in mind, configure +10 CP to +10 small coffee shops.
      at this moment in my PFSensen Box that is hosted by a hosting provider? , each CP it's configured, I have used vouchers and as far as I see in my tests are working fine with CP each itself.

      Each AP (that is located in a different location) has it own fixed public IP (this will be the way I can identify each coffee shop)

      but there come some questions:

      1-. How should I configure, each AP, to reach to my PFsense that is hosted by a hosting provider?

      2-. I saw this website https://wifi.garden/ and see they do it, by only changing the AP's DNS IP to their DNS, I think the maybe are combining some DDNS to get AP's IP updated.

      I tried to configure a Blackhole DNS that resolves all DNS request to a server my PFsense can see and depending on the IP that made the request I send to the appropriate CP, but I face the problem that no matter the user had logged in always the user receives the login page even.

      3- I've seen some other approaches where a second AP is placed on the client's premises with some custom firmware but that is not like https://wifi.garden/ does.

      4-. is there some advise for me to get this done?

      Thank you all.

      Regards.

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        The only way I can think to do that is if the APs opened some sort of tunnel to the central site and routed all traffic over that.

        You could then use interfaces, VLANs, or CP PHP magic to show the right page to the right source addresses.

        If this wifi garden stuff does what you need why not use that?

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

          Hello Derelict, thanks for your reply.

          Wifi-Garden it's a paid service and I want to construct my own with pfsense.

          I tried a Blackhole DNS that redirects to a host with PHP scripts that do the magic redirecting to each CP, the problem is that I always receive the login page of each portal no matter if the user logged into the portal.

          I read this post https://forum.pfsense.org/index.php?topic=34148.msg181641#msg181641

          but in the documentation there is not much explanition on how this works
          https://doc.pfsense.org/index.php/Captive_Portal_Pre-authentication_Redirect

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