AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / server / Perguntas / 1068803
Accepted
Andrew Newby
Andrew Newby
Asked: 2021-07-07 07:24:25 +0800 CST2021-07-07 07:24:25 +0800 CST 2021-07-07 07:24:25 +0800 CST

nginx ouvindo no ipv6, mas por algum motivo os sites não carregam

  • 772

Estou tentando fazer com que o ipv6 funcione no nginx (nginx/1.19.6) para SSL. Nas minhas configurações de domínio eu tenho:

server {
    listen      93.93.135.169:443 http2;
    listen      [::]:443 http2;
    server_name backups.myserver.com;
   ....
}

..e então para a porta padrão;

server {
    listen      93.93.135.169:80;
    listen      [::]:80;
    server_name backups.myserver.com ;
    ...
}

O Netstat mostra o nginx como escutando nas portas 443 e 80:

 netstat -tulpn | grep nginx
tcp        0      0 93.93.135.169:80        0.0.0.0:*               LISTEN      1168/nginx: master
tcp        0      0 127.0.0.1:8084          0.0.0.0:*               LISTEN      1168/nginx: master
tcp        0      0 93.93.135.169:443       0.0.0.0:*               LISTEN      1168/nginx: master
tcp        0      0 0.0.0.0:9183            0.0.0.0:*               LISTEN      5247/nginx: master
tcp6       0      0 :::80                   :::*                    LISTEN      1168/nginx: master
tcp6       0      0 :::443                  :::*                    LISTEN      1168/nginx: master

Eu posso encontrar o servidor em ipv4 e ipv6:

root@admin3:~# ping -4 backups.myserver.com
PING backups.myserver.com (93.93.135.169) 56(84) bytes of data.
64 bytes from backups.myserver.com (93.93.135.169): icmp_seq=1 ttl=60 time=1.58 ms
^X^C
--- backups.myserver.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.575/1.575/1.575/0.000 ms
root@admin3:~# ping -6 backups.myserver.com
PING backups.myserver.com(2a00:1098:80:a0::1 (2a00:1098:80:a0::1)) 56 data bytes
64 bytes from 2a00:1098:80:a0::1 (2a00:1098:80:a0::1): icmp_seq=1 ttl=61 time=1.55 ms
^X64 bytes from 2a00:1098:80:a0::1 (2a00:1098:80:a0::1): icmp_seq=2 ttl=61 time=1.74 ms

No iptables , recebo:

iptables --list -n | grep 443
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 80,443

iptables --list -n | grep 80
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 80,443

..e ip6tables:

ip6tables --list -n | grep 80
ACCEPT     tcp      ::/0                 ::/0                 state NEW tcp dpt:80

ip6tables --list -n | grep 443
ACCEPT     tcp      ::/0                 ::/0                 state NEW tcp dpt:443

No entanto, quando testo o site em https://ipv6-test.com/ com http , funciona:

insira a descrição da imagem aqui

Mas assim que tento SSL, recebo:

insira a descrição da imagem aqui

Executando um teste de curl de outro servidor para ele, recebo:

curl -v -6 https://backups.myserver.com
*   Trying 2a00:1098:80:a0::1:443...
* TCP_NODELAY set
* Connected to backups.myserver.com (2a00:1098:80:a0::1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* error:1408F10B:SSL routines:ssl3_get_record:wrong version number
* Closing connection 0
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

Estou ficando sem outras coisas para tentar. Alguma sugestão?

nginx ipv6
  • 1 1 respostas
  • 216 Views

1 respostas

  • Voted
  1. Best Answer
    Michael Hampton
    2021-07-07T09:55:41+08:002021-07-07T09:55:41+08:00

    Você esqueceu de informar ao nginx que essas portas de escuta na porta 443 são para TLS.

        listen      93.93.135.169:443 http2;
        listen      [::]:443 http2;
    

    Observe que sslestá faltando. Deve ler-se:

        listen      93.93.135.169:443 ssl http2;
        listen      [::]:443 ssl http2;
    
    • 3

relate perguntas

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve