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

    Captive portal not redirect

    Scheduled Pinned Locked Moved Captive Portal
    41 Posts 3 Posters 5.5k 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
      Martí Ferret @Gertjan
      last edited by

      @Gertjan I copy the second one and didn't work yet ;(

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

        Afterwards, you can - and you should - adapt.
        All depends on what type off public you have on your captive portal.
        Familly ? You'll be fine?
        Public network ? You should NOT activate the captive portal on your LAN, use a dedicated interface (OPT1) and depreciated rules.
        For an example, I show you my firewall rules on my captive portal (a public portal - untrusted visitors) :

        d8e43528-5ccf-4327-a8f6-0fc19bdf3743-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 0
        • M
          Martí Ferret @Gertjan
          last edited by

          @Gertjan IDK why i put www.google.es and dont redirect but if i put 11.11.11.11 redirects to captive portal.
          Before to configurate rules I want to get automatically redirected to captive portal not only if i put ip on URL

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

            Test this :

            Disconnect all captive portal users (tricky, you are on LAN - you will disconnect yourself).
            At this moment, a "nslookup" should work.
            In other words : DNS should not be blocked
            If 10.0.0.2 is your DNS and gateway, DNS request will be passed. DNS will work.

            If not : what did you change concerning DNS ?

            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
            • F
              free4 Rebel Alliance
              last edited by

              @Martí-Ferret Your problem is coming from your DNS server, it's not related to the captive portal or to your firewall rules.

              Few things :

              • Use the "DNS Resolver" in pfSense. The DNS forwarder is a legacy option.
              • What DNS server are you using for your pfSense appliance (in System->General Settings) ? Could you check that your pfSense can correctly ping this IP and that a DNS server is enabled on this IP?
              • Could you verify your ACL in the DNS resolver settings? What are the logs of your pfSense when you try to resolve a random domain name using DNSSEC ( fbi.gov ) and not using DNSSEC ( kcna.kp ) ?
              M 1 Reply Last reply Reply Quote 0
              • M
                Martí Ferret @Gertjan
                last edited by

                @Gertjan Idk why now internet on client don't work.
                https://imgur.com/a/W4cfWeC

                GertjanG F 2 Replies Last reply Reply Quote 0
                • GertjanG
                  Gertjan
                  last edited by Gertjan

                  Added to what @free4 said ; use https://docs.netgate.com/pfsense/en/latest/captiveportal/captive-portal-troubleshooting.html

                  Show us

                  ipfw table all list
                  

                  and

                  ipfw list
                  

                  (run these commands in the console)

                  Here is mine (last command) :

                  [2.4.4-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: ipfw list
                  01000 skipto tablearg ip from any to any via table(cp_ifaces)
                  01100 allow ip from any to any
                  02100 pipe tablearg ip from any to any MAC table(cpzone1_pipe_mac)
                  02101 allow pfsync from any to any
                  02102 allow carp from any to any
                  02103 allow ip from any to any layer2 mac-type 0x0806,0x8035
                  02104 allow ip from any to any layer2 mac-type 0x888e,0x88c7
                  02105 allow ip from any to any layer2 mac-type 0x8863,0x8864
                  02106 deny ip from any to any layer2 not mac-type 0x0800,0x86dd
                  02107 allow ip from any to table(cpzone1_host_ips) in
                  02108 allow ip from table(cpzone1_host_ips) to any out
                  02109 allow ip from any to 255.255.255.255 in
                  02110 allow ip from 255.255.255.255 to any out
                  02111 pipe tablearg ip from table(cpzone1_allowed_up) to any in
                  02112 pipe tablearg ip from any to table(cpzone1_allowed_down) in
                  02113 pipe tablearg ip from table(cpzone1_allowed_up) to any out
                  02114 pipe tablearg ip from any to table(cpzone1_allowed_down) out
                  02115 pipe tablearg ip from table(cpzone1_auth_up) to any layer2 in
                  02116 pipe tablearg ip from any to table(cpzone1_auth_down) layer2 out
                  02117 fwd 127.0.0.1,8003 tcp from any to any 443 in
                  02118 fwd 127.0.0.1,8002 tcp from any to any 80 in
                  02119 allow tcp from any to any out
                  02120 skipto 65534 ip from any to any
                  65534 deny ip from any to any
                  65535 allow ip from any to any
                  

                  The first 9 (nine) rules are not important here (they let through IPv4=>DHCP, etc)
                  These :

                  02107 allow ip from any to table(cpzone1_host_ips) in
                  02108 allow ip from table(cpzone1_host_ips) to any out
                  

                  are very important.
                  They let through DNS requests. Always.
                  " cpzone1_host_ips " is 192.18.2.1 is my pfSense portal interface = gateway = DNS access.
                  Yours should be 10.0.0.2 ( see ipfw table all list )

                  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
                  • GertjanG
                    Gertjan @Martí Ferret
                    last edited by

                    @Martí-Ferret said in Captive portal not redirect:

                    @Gertjan Idk why now internet on client don't work.
                    https://imgur.com/a/W4cfWeC

                    Your image tells me : DNS does not work for your clients .... => Clients can not access DNS ..... see my message above.

                    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
                    • F
                      free4 Rebel Alliance @Martí Ferret
                      last edited by

                      @Martí-Ferret maybe you still have captive portal enabled?

                      1 Reply Last reply Reply Quote 0
                      • M
                        Martí Ferret @free4
                        last edited by

                        @free4 I use dns resolver,DNS in general settings

                        M GertjanG 2 Replies Last reply Reply Quote 0
                        • M
                          Martí Ferret @Martí Ferret
                          last edited by

                          @Martí-Ferret General setings, https://imgur.com/a/HNBdlpN
                          https://imgur.com/a/Vd2Rx4w

                          GertjanG 1 Reply Last reply Reply Quote 0
                          • GertjanG
                            Gertjan @Martí Ferret
                            last edited by

                            @Martí-Ferret said in Captive portal not redirect:

                            @free4 I use dns resolver,DNS in general settings

                            The DNS Resolver has no setting here :

                            406a0ed3-d580-4f48-9602-234676a06bb5-image.png

                            You should NOT change (add, what ever) anything here.
                            (no "8.8.8.8" to start with)

                            Show us your general settings ?

                            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
                            • GertjanG
                              Gertjan @Martí Ferret
                              last edited by Gertjan

                              @Martí-Ferret said in Captive portal not redirect:

                              @Martí-Ferret General setings, https://imgur.com/a/HNBdlpN
                              https://imgur.com/a/Vd2Rx4w

                              Ok !!!! That looks fine.

                              edit : LAN firewall rules ?

                              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
                                Martí Ferret @Gertjan
                                last edited by

                                @Gertjan https://imgur.com/a/TPJnrdf

                                GertjanG 1 Reply Last reply Reply Quote 0
                                • GertjanG
                                  Gertjan @Martí Ferret
                                  last edited by Gertjan

                                  @Martí-Ferret said in Captive portal not redirect:

                                  @Gertjan https://imgur.com/a/TPJnrdf

                                  Ok also.

                                  ipfw list
                                  

                                  and

                                  ipfw table all list
                                  

                                  ?

                                  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
                                    Martí Ferret @Gertjan
                                    last edited by

                                    @Gertjan https://imgur.com/a/Efpkjdv

                                    GertjanG 1 Reply Last reply Reply Quote 0
                                    • GertjanG
                                      Gertjan @Martí Ferret
                                      last edited by

                                      @Martí-Ferret said in Captive portal not redirect:

                                      @Gertjan https://imgur.com/a/Efpkjdv

                                      Your images shows no rules => captive portal in not activated.

                                      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
                                      • GertjanG
                                        Gertjan
                                        last edited by

                                        Sorry
                                        Not

                                        ipfw all
                                        

                                        Should be

                                        ipfw list
                                        

                                        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
                                          Martí Ferret @Gertjan
                                          last edited by

                                          @Gertjan Yea i disabled cause i want to know why client have no network https://imgur.com/a/edCdVJg

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            Martí Ferret
                                            last edited by

                                            https://imgur.com/a/EzLJhdk

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