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

    Captive portal and DNS Redirection

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 2 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.
    • G
      GalacticFreez
      last edited by GalacticFreez

      Hello,
      I'm currently setting up a PFSense gateway with a DNS Resolver, a DNS Redirect (using this documentation) and a custom captive portal.
      Everything works fine until I change the DNS Servers on the interface of my fake client : the DNS queries get blocked by the firewall rules added by the captive portal.
      Using the ipfw command, I can view the rules added :
      Before activating the captive portal :
      before
      And after activating the portal :
      after
      Those rules seem to be added by this file : /etc/inc/filter.inc (GitHub)
      Is there a way of addressing this issue without editing this file ?
      Thank you in advance !

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

        @galacticfreez

        Compare

        7915fb95-2838-4024-9e5f-2f62b2efca0d-image.png

        with what you find here : https://www.pfsense.org/download/

        The list with resolved issues, problems, ameliorations and new options is big.
        And worse : who recalls the issues that you might have with this very ancient version ?

        @galacticfreez said in Captive portal and DNS Redirection:

        Everything works fine until I change the DNS Servers on the interface of my fake client

        To keep things simple : pfSense is the captive portal, pfSense should be the DNS of the clients.

        When a captive portal client is not authenticated, everything is blocked, line 65534, with two exceptions :
        The IP of pfSense itself (as you can see, the ipfw tells you so)
        and :
        Whatever you enter here :

        70088f1e-c345-455e-a8f6-87e3313500db-image.png

        Why would you want to change the DNS IP on a client ?

        ( also : listed MACs are passing through, and to some extend, also listed host names. But read the manual first )

        edit : really, an Ibis hotel from group Accor ?

        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
        • G
          GalacticFreez
          last edited by

          @gertjan Thank you for the quick response !
          I'm going to have a deeper look at the changelog and the manual

          Why would you want to change the DNS IP on a client ?

          I thought Apple Devices had different DNS configured and that it would avoid the captive portale to open. But it isn't the case (it seems this could help : https://developer.apple.com/news/?id=q78sq5rv)

          I forgot to hide the domain name, thank you for pointing that out ☺

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

            @galacticfreez said in Captive portal and DNS Redirection:

            I thought Apple Devices had different DNS configured and that it would avoid the captive portale to open. But it isn't the case (it seems this could help : https://developer.apple.com/news/?id=q78sq5rv)

            That link shows what the future might look like. It's, at best, RFC draft today.
            This solution only needs a working DHCP server, and some json/webserver support.
            Initial DNS functionality becomes irrelevant, as captive portal interaction becomes possible as soon as the IP link is established.

            iDevices - and all the others - work just fine with the current way of doing things.
            I'm using myself the captive portal for a hotel.
            It works.

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