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

    Portal captive https

    Scheduled Pinned Locked Moved Captive Portal
    20 Posts 5 Posters 7.9k 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.
    • DerelictD
      Derelict LAYER 8 Netgate
      last edited by

      You do not understand how https works.

      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
      • P
        pfsense.user 0
        last edited by

        Hi,

        Can't we avoid https error page even with squid? it is a https intercepter if I don't mistake.

        When a user open any https web site before authentication, he will be redirect to Captive Portal without certificate error. That

        is what we want.

        You said for that, the CP needs a valid certificate. Is it correct?

        Thank you.

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

          No.

          Even when you have a valid (trusted authority by the/your browser the visitor uses) certificate installed on pfSense, when you (your visitors) visit https://www.facebook.com the browser will get back a nice certificate (yours, from portal pfsense) saying a lot, except that it is NOT signed for "facebook.com".
          The browser of the visitor will scream !!
          Don't try to look for a solution to circumvent this. It will be a pure waste of time.
          (on the other hand, if yo managed to do so, you'll be in for some kind of Nobel price, because you would have broken Internet as we know it).

          What would work is this : try to get THE super wildcard certificate, this one : ".". THAT will work  ;)

          As Derelict says, first try to figure out what "https" means. really. Don't pretend, do so.

          But, I have some good news for you.
          Every known OS these days are "portal minded" !!
          This means that this :
          @Mypfsense2016:

          I also get trouble as users love to open https://google.com as the first page.

          is a non-existing problem.

          Example : when an Windows PC connects to a network using a Wifi adapter, it will throw out an hidden request to a http:// site (NON-https !!).
          When the (pre-programmed) result returned is something like "Succes" the the OS will 'know' that the Wifi connections offers an open connection to the net - or, at least, requests to any destination port 80 will work.
          If the results is any different, like : our pfsense portal page, that Windows WILL show on the screen a message like "More user interaction is needed" and offers the visitor, by clicking on the message show on the system tray, to open a browser that will ….  => Major magic => open a browser (IE) that shows our …. captive portal page.
          All this even when the default browser home page is something like https://www.google.com !
          iOS device have the same functionality.  When connecting, a simple browser WILL open automatically that shows our portal page.
          Android stuff : I guess they do the same thing .....

          So : conclusion : EXCEPT if the user messed up the configuration of his device, connecting to a "wifi-captive-portal" network just works.
          If it doesn't, well, then that is not YOUR problem.

          I can prove what I'm saying : I'm using pfSense for years now in a hotel. Our clients bring along all kind of devices. These clients do not contact me - they just connect to our guest network.

          When they have "https://google.com" as the default home page, then that is NO problem at all.
          It shouldn't neither be one for you neither.

          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
          • P
            pfsense.user 0
            last edited by

            Hi,

            Can't we automatically open a http page on client's browser when he connects? so he will be redirect to the CP authentication page.

            Thank you.

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

              No. The client browser browses to whatever it browses to. if that is http, it is http. If it is https, it is https.

              Why do you think you would have such control over a client's browser? Think about that for just one or two seconds.

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

                @pfsense.user:

                Can't we automatically open a http page on client's browser ….

                You (= we ?) never ever controls a user's (the visitor !) browser !!
                It's the OS (Android, iOS, Microsoft Windows, whatever, that the user (again : the visitor !) uses on his device that decides to open a 'hidden' http (not https) page somewhere on the Internet (of course a http request, a https request will NOT work to bypass portal pages, if they exist).
                You have nothing to do - nothing to control - it just 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
                • P
                  pfsense.user 0
                  last edited by

                  Hi,

                  Is it possible to authenticate user from active directory in pfsense captive portal?

                  By user I mean username

                  EX: Dupont paul, his username is "dpaul".

                  Authenticate dpaul if CP. only with Windows server 2012 and Pfsense.

                  Thank you.

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

                    Interfacing with Microsoft products means you are entering the $ market.
                    So, the short answer will be 'no'.

                    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
                    • DerelictD
                      Derelict LAYER 8 Netgate
                      last edited by

                      Yes but it is probably outside what you will get on a forum. Might try googling that. You should be able to use RADIUS to NPS there. CP doesn't support LDAP.

                      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
                      • M
                        myke
                        last edited by

                        Hello everyone,

                        I was in hotel in France who had a portal captive with Ucopia and the redirection worked without a certificat issue.

                        I tested with a computer and a samsung mobile.All worked fine.

                        So I don't know why but Ucopia can do it… :-\

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

                          No it didn't.

                          It is simply not possible to get in the middle of an HTTPS connection and not generate a certificate error unless you can mint a certificate for the original destination signed by a CA trusted on the device. And even then you are hampered by certificate pinning, etc.

                          I would love to see the certificate generated by the captive portal that was presented when you tried to go to a regular, global HTTPS site and got the portal instead without a cert error being presented.

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