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

    Captive Portal com HTTPS Login

    Scheduled Pinned Locked Moved Portuguese
    20 Posts 2 Posters 6.0k 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 Offline
      gilmarcabral
      last edited by

      Bom dia.
      Fiz um teste com cliente windows 7, tanto o IE como o firefox não apresenta erro de certificado no navegador porem a tela do navegador fica em branco.

      1 Reply Last reply Reply Quote 0
      • marcellocM Offline
        marcelloc
        last edited by

        Este erro acontece quando você tenta acessar um https em cima de um portocolo http.

        Provavelmente sua porta 8001 ainda é http.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • G Offline
          gilmarcabral
          last edited by

          Bom dia.
          Marcelloc agradeço novamente pela sua presteza.
          Aqui a GUI esta na porta 80 sem https e o captive portal esta rodando https na porta 8001.
          A solução seria mudar a porta segurad do captive portal?
          Agradeço novamente.

          1 Reply Last reply Reply Quote 0
          • marcellocM Offline
            marcelloc
            last edited by

            Já tentou não colocar a intermediate certificate?

            De onde você pegou os certificados?

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • G Offline
              gilmarcabral
              last edited by

              Boa tarde.
              Os certificados foram gerados pelo próprio pfsense.
              Segui este link

              http://blog.stefcho.eu/?p=814
              A única coisa que tentei quando gerando assinado a chave foi especificar na segunda aba o tipo de certificado que testei tanto como Certificate Type= Server Certificate e também Certificate Type = User Certificate.

              Se eu não especificar o  intermediate certificate no campo HTTPS intermediate certificate na configuração do captive portal ele reclama por este erro abaixo.

              The following input errors were detected:

              This intermmediate certificate does not appear to be valid.

              1 Reply Last reply Reply Quote 0
              • G Offline
                gilmarcabral
                last edited by

                Boa noite.
                Galera continua com tentando detectar o problema para fazer o captive portal rodar com certificado https:
                Fiz uma instalação do zero, habilitado apenas o captive portal com a pagina default.
                A rules na interface que esta rodando o captive portal esta tudo liberado.
                Sem o https roda de boa mas quando habilito o https ai aparece que a pagina não foi encontrada.
                Estou seguindo o manual do post anterior.
                Posso estar enganado, mas parece que quando habilito o https ai o captive portal passa a responder na porta 8001 e não mais como 8000 ai a pagina do captive portal não consegue localizar na porta 8001.
                Alguem sabe se tem que fazer alguma modificação na pagina do captive portal.
                Estou vasculhando a net inclusive aki no forum internacional em inglês porem sem sucesso.
                Agradeço

                1 Reply Last reply Reply Quote 0
                • marcellocM Offline
                  marcelloc
                  last edited by

                  Veja com netstar -an | grep -i listen que portas estão abertas e com o ipfw show, que regras de redirecionamento existe.

                  Qual versão do pfsense você esta usando?

                  Treinamentos de Elite: http://sys-squad.com

                  Help a community developer! ;D

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    gilmarcabral
                    last edited by

                    Resultado do comando netstat
                    Vejo que tanto a porta 8000 como a 8001 estão abertas
                    netstat -an | grep -i listen
                    tcp4      0      0 *.8001                .                    LISTEN
                    tcp4      0      0 *.8000                .                    LISTEN
                    tcp6      0      0 *.53                  .                    LISTEN
                    tcp4      0      0 *.53                  .                    LISTEN
                    tcp4      0      0 *.80                  .                    LISTEN
                    tcp4      0      0 *.443                  .                    LISTEN
                    tcp4      0      0 *.2229                .                    LISTEN
                    tcp6      0      0 *.2229                .                    LISTEN

                    Resultado do ipfw show
                    Não vi o direcionamento da porta 8000 para 8001 apenas uma regra referente a porta 8000
                    ipfw show
                    65291  0    0 allow pfsync from any to any
                    65292  0    0 allow carp from any to any
                    65301  6  222 allow ip from any to any layer2 mac-type 0x0806
                    65302  0    0 allow ip from any to any layer2 mac-type 0x888e
                    65303  0    0 allow ip from any to any layer2 mac-type 0x88c7
                    65304  0    0 allow ip from any to any layer2 mac-type 0x8863
                    65305  0    0 allow ip from any to any layer2 mac-type 0x8864
                    65307  0    0 deny ip from any to any layer2 not mac-type 0x0800
                    65310  0    0 allow ip from any to { 255.255.255.255 or 10.9.9.5 } in
                    65311  0    0 allow ip from { 255.255.255.255 or 10.9.9.5 } to any out
                    65312  0    0 allow icmp from { 255.255.255.255 or 10.9.9.5 } to any out icmptypes 0
                    65313  0    0 allow icmp from any to { 255.255.255.255 or 10.9.9.5 } in icmptypes 8
                    65314  0    0 allow ip from table(3) to any in
                    65315  0    0 allow ip from any to table(4) out
                    65316  0    0 pipe tablearg ip from table(5) to any in
                    65317  0    0 pipe tablearg ip from any to table(6) out
                    65318  0    0 allow ip from any to table(7) in
                    65319  0    0 allow ip from table(8) to any out
                    65320  0    0 pipe tablearg ip from any to table(9) in
                    65321  0    0 pipe tablearg ip from table(10) to any out
                    65322  0    0 allow ip from table(1) to any in
                    65323  0    0 allow ip from any to table(2) out
                    65531  34  1360 fwd 127.0.0.1,8000 tcp from any to any in
                    65532  36 51104 allow tcp from any to any out
                    65533 108  8026 deny ip from any to any
                    65534  0    0 allow ip from any to any layer2
                    65535  3  463 allow ip from any to any

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      gilmarcabral
                      last edited by

                      Boa tarde.
                      Descobri o motivo do erro referente ao primeiro print screen.
                      O erro certificado de ssl que aparece no navegador ocorre quando informo o proxy no navegador.
                      Se eu retirar o proxy do navegador ai o navegador pede para instalar o certificado e aparece a tela do captive portal.
                      Agora se eu deixar o proxy ai da erro de ssl.
                      Tenho que deixar setado o proxy no navegador pois o proxy que utilizo e autenticado.
                      Tentei no squid liberar a porta 8001 no squid nas opções Squid Allowed ports o campo acl sslports porem sem sucesso.
                      Alguém tenha uma solução de como resolver isso.
                      Agradeço.

                      1 Reply Last reply Reply Quote 0
                      • marcellocM Offline
                        marcelloc
                        last edited by

                        Qual versão do squid você esta usando?

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          gilmarcabral
                          last edited by

                          Squid3

                          Available: 3.1.20 pkg 2.0.6
                          Installed: 3.1.20 pkg 2.0.5_7

                          1 Reply Last reply Reply Quote 0
                          • marcellocM Offline
                            marcelloc
                            last edited by

                            Marque a opção patch captive portal, salve as configurações do squid, salve novamente as configurações do captive portal e veja se muda alguma coisa.

                            Na grande maioria dos casos, o captive portal é ignorado quando o squid esta configurado em modo transparente ou marcado no browser.

                            att,
                            Marcello Coutinho

                            Treinamentos de Elite: http://sys-squad.com

                            Help a community developer! ;D

                            1 Reply Last reply Reply Quote 0
                            • G Offline
                              gilmarcabral
                              last edited by

                              Bom dia.
                              Marcelloc já estava marcado este path, então eu desmarquei e marquei novamente e mandei salvar. Em seguida fui no captive portal e mandei salvar novamente as configurações porem sem sucesso.
                              O erro de ssl ainda continua.
                              O interessante que se não utilizar o certificado o problema não ocorre. posso utilizar proxy autenticado setado no navegador que o captive portal consegue trabalhar
                              normalmente.
                              Fiz um teste no navegador do cliente que foi o seguinte.
                              Deixei setado o proxy porem não defei o proxy padrão para todos serviços como https e ftp. deixei somente conexão http e funcionou.
                              O problema que desta forma os bancos e sites com https não iram funcionar.

                              1 Reply Last reply Reply Quote 0
                              • marcellocM Offline
                                marcelloc
                                last edited by

                                executou o ipfw depois de salvar tudo novamente?

                                O procedimento para remover o patch é salvar as configurações do squid e do captive portal.

                                Via ipfw você consegue monitorar as alterações que o patch faz.

                                Treinamentos de Elite: http://sys-squad.com

                                Help a community developer! ;D

                                1 Reply Last reply Reply Quote 0
                                • G Offline
                                  gilmarcabral
                                  last edited by

                                  rodei o comando ipfw list e tive 2 resultados. com e sem o path

                                  Sem o path salvando o squid e o captive portal
                                  ipfw list
                                  65291 allow pfsync from any to any
                                  65292 allow carp from any to any
                                  65301 allow ip from any to any layer2 mac-type 0x0806
                                  65302 allow ip from any to any layer2 mac-type 0x888e
                                  65303 allow ip from any to any layer2 mac-type 0x88c7
                                  65304 allow ip from any to any layer2 mac-type 0x8863
                                  65305 allow ip from any to any layer2 mac-type 0x8864
                                  65307 deny ip from any to any layer2 not mac-type 0x0800
                                  65310 allow ip from any to { 255.255.255.255 or 10.9.9.5 } in
                                  65311 allow ip from { 255.255.255.255 or 10.9.9.5 } to any out
                                  65312 allow icmp from { 255.255.255.255 or 10.9.9.5 } to any out icmptypes 0
                                  65313 allow icmp from any to { 255.255.255.255 or 10.9.9.5 } in icmptypes 8
                                  65314 allow ip from table(3) to any in
                                  65315 allow ip from any to table(4) out
                                  65316 pipe tablearg ip from table(5) to any in
                                  65317 pipe tablearg ip from any to table(6) out
                                  65318 allow ip from any to table(7) in
                                  65319 allow ip from table(8) to any out
                                  65320 pipe tablearg ip from any to table(9) in
                                  65321 pipe tablearg ip from table(10) to any out
                                  65322 allow ip from table(1) to any in
                                  65323 allow ip from any to table(2) out
                                  65531 fwd 127.0.0.1,8000 tcp from any to any in
                                  65532 allow tcp from any to any out
                                  65533 deny ip from any to any
                                  65534 allow ip from any to any layer2
                                  65535 allow ip from any to any

                                  Com o path salvando o squid e o captive portal
                                  ipfw list
                                  65291 allow pfsync from any to any
                                  65292 allow carp from any to any
                                  65301 allow ip from any to any layer2 mac-type 0x0806
                                  65302 allow ip from any to any layer2 mac-type 0x888e
                                  65303 allow ip from any to any layer2 mac-type 0x88c7
                                  65304 allow ip from any to any layer2 mac-type 0x8863
                                  65305 allow ip from any to any layer2 mac-type 0x8864
                                  65307 deny ip from any to any layer2 not mac-type 0x0800
                                  65310 skipto 65314 ip from any to { 255.255.255.255 or 10.9.9.5 } dst-port 3128 in
                                  65310 allow ip from any to { 255.255.255.255 or 10.9.9.5 } in
                                  65311 skipto 65314 ip from { 255.255.255.255 or 10.9.9.5 } 3128 to any out
                                  65311 allow ip from { 255.255.255.255 or 10.9.9.5 } to any out
                                  65312 allow icmp from { 255.255.255.255 or 10.9.9.5 } to any out icmptypes 0
                                  65313 allow icmp from any to { 255.255.255.255 or 10.9.9.5 } in icmptypes 8
                                  65314 allow ip from table(3) to any in
                                  65315 allow ip from any to table(4) out
                                  65316 pipe tablearg ip from table(5) to any in
                                  65317 pipe tablearg ip from any to table(6) out
                                  65318 allow ip from any to table(7) in
                                  65319 allow ip from table(8) to any out
                                  65320 pipe tablearg ip from any to table(9) in
                                  65321 pipe tablearg ip from table(10) to any out
                                  65322 allow ip from table(1) to any in
                                  65323 allow ip from any to table(2) out
                                  65531 fwd 127.0.0.1,8000 tcp from any to any in
                                  65532 allow tcp from any to any out
                                  65533 deny ip from any to any
                                  65534 allow ip from any to any layer2
                                  65535 allow ip from any to any

                                  1 Reply Last reply Reply Quote 0
                                  • G Offline
                                    gilmarcabral
                                    last edited by

                                    Fiz o teste desabilitando o path em seguida salvei o squid e salvei o freeradius.
                                    Com esta alteração realizada fui no cliente e abri a o navegador onde o mesmo esta setado os proxy para todos protocolos e o erro de ssl continua.

                                    1 Reply Last reply Reply Quote 0
                                    • G Offline
                                      gilmarcabral
                                      last edited by

                                      Alguém com alguma outra sugestão de como resolver?
                                      Agradeço

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