Skip to content

NGINX - SSL routines:ssl3_read_bytes:tlsv1 alert protocol version

NGINX
  • Eines der Probleme, was aufgetaucht ist wie ich einige Server zu meinem Proxmox umgezogen habe, war das hier.

    root@frank-MS-7C37:/var/log# curl -I -v --tlsv1.3 --tls-max 1.3 https://frank-mankel.de
    *   Trying 2a01:4f8:160:XXXX::XXX:443...
    * TCP_NODELAY set
    * Connected to frank-mankel.de (2a01:4f8:160:XXX::XXX) 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):
    * TLSv1.3 (IN), TLS alert, protocol version (582):
    * error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version
    * Closing connection 0
    curl: (35) error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version
    

    Das Resultat war, das ich kein TLSv1.3 hinbekam sondern nur TLSv1.2. Das hat mich viele Stunden gekostet und ich weiß leider auch nicht 100% was es war. Ich hatte alle meine bestehenden Konfigurationen kopiert und hatte eigentlich gar kein Problem erwartet. Es sollte anders kommen.....

    Ich habe viele Stunden versucht das Problem zu erkennen, auch das Internet war nicht besonders hilfreich. So habe ich mich dann herangemacht, die ein oder andere Konfiguration neu zu machen und alles nochmal zu kontrollieren.

    Am Ende habe ich einige Umleitungen in Verdacht, das das nicht mehr so klappte. Warum? Ich habe keine Ahnung es hätte funktionieren müssen!?!?

    Das obige Beispiel sieht wie folgt aus, wenn es funktioniert.

    root@frank-MS-7C37:/var/log# curl -I -v --tlsv1.3 --tls-max 1.3 https://frank-mankel.de
    *   Trying 136.243.29.253:443...
    * TCP_NODELAY set
    * Connected to frank-mankel.de (136.243.29.253) 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):
    * TLSv1.3 (IN), TLS handshake, Server hello (2):
    * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
    * TLSv1.3 (IN), TLS handshake, Certificate (11):
    * TLSv1.3 (IN), TLS handshake, CERT verify (15):
    * TLSv1.3 (IN), TLS handshake, Finished (20):
    * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
    * TLSv1.3 (OUT), TLS handshake, Finished (20):
    * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
    * ALPN, server accepted to use h2
    * Server certificate:
    *  subject: CN=frank-mankel.de
    *  start date: Sep 11 15:08:52 2021 GMT
    *  expire date: Dec 10 15:08:51 2021 GMT
    *  subjectAltName: host "frank-mankel.de" matched cert's "frank-mankel.de"
    *  issuer: C=US; O=Let's Encrypt; CN=R3
    *  SSL certificate verify ok.
    * Using HTTP2, server supports multi-use
    * Connection state changed (HTTP/2 confirmed)
    * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
    * Using Stream ID: 1 (easy handle 0x55f56f398e10)
    > HEAD / HTTP/2
    > Host: frank-mankel.de
    > user-agent: curl/7.68.0
    > accept: */*
    > 
    * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
    * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
    * old SSL session ID is stale, removing
    * Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
    < HTTP/2 200 
    HTTP/2 200 
    < server: nginx
    server: nginx
    < date: Sun, 12 Sep 2021 16:34:10 GMT
    date: Sun, 12 Sep 2021 16:34:10 GMT
    < content-type: text/html; charset=utf-8
    content-type: text/html; charset=utf-8
    < vary: Accept-Encoding
    vary: Accept-Encoding
    < set-cookie: d2e068f37e20df151d2a41a967850cb8=21ufmbr6exxxxxxxx44hog0bm; path=/; HttpOnly
    set-cookie: d2e068f37e20df151dxxxxxxxxxxxxcb8=21ufmbr6edb3926qa644hog0bm; path=/; HttpOnly
    < link: </templates/cassiopeia/css/global/colors_standard.min.css>; rel="prefetch"; as="style"
    link: </templates/cassiopeia/css/global/colors_standard.min.css>; rel="prefetch"; as="style"
    < expires: Wed, 17 Aug 2005 00:00:00 GMT
    expires: Wed, 17 Aug 2005 00:00:00 GMT
    < last-modified: Sun, 12 Sep 2021 16:34:10 GMT
    last-modified: Sun, 12 Sep 2021 16:34:10 GMT
    < cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    < pragma: no-cache
    pragma: no-cache
    < strict-transport-security: max-age=31536000; includeSubDomains; preload; always
    strict-transport-security: max-age=31536000; includeSubDomains; preload; always
    < x-frame-options: sameorigin
    x-frame-options: sameorigin
    < referrer-policy: no-referrer
    referrer-policy: no-referrer
    < x-robots-tag: none
    x-robots-tag: none
    < x-download-options: noopen
    x-download-options: noopen
    < x-permitted-cross-domain-policies: none
    x-permitted-cross-domain-policies: none
    < x-content-type-options: nosniff
    x-content-type-options: nosniff
    < x-ua-compatible: IE=Edge
    x-ua-compatible: IE=Edge
    < x-xss-protection: 1; mode=block
    x-xss-protection: 1; mode=block
    
    < 
    * Connection #0 to host frank-mankel.de left intact
    

    Aber am Ende war alles gut und man bekommt TLSv1.3, so wie es sich gehört.

  • Debian 11 - nginx mit Seafile

    NGINX
    3
    0 Stimmen
    3 Beiträge
    109 Aufrufe
    H

    Hi,
    ja es ist zu Warm 😀 😎

    Hab mich vielleicht etwas falsch ausgedrückt.
    Ich suche ne möglichkeit bzw. ein Howto wie ich Seafile für einen bekannten auf ein Shared Hosting Paket installiert bekomme.

  • NGINX - Neue Domain bekannt machen

    NGINX
    1
    0 Stimmen
    1 Beiträge
    91 Aufrufe
    Niemand hat geantwortet
  • NGINX & Webmin

    NGINX
    3
    0 Stimmen
    3 Beiträge
    829 Aufrufe
    FrankMF

    Das was da oben steht über Firewalld, ganz schnell vergessen. Das brauchen wir nicht, hat auch nur Probleme gemacht....

    21edf29c-ec9a-4cb5-a8ba-8bc534e4f4ec-grafik.png

    Man kann ganz normal mit iptables arbeiten, man sollte schon mal eine Firewall konfiguriert haben, das macht es etwas einfacher.

    Kurzer Test, ob das so klappt wie erwartet.

    frank@debian:~$ nmap 192.168.3.6 Starting Nmap 7.70 ( https://nmap.org ) at 2019-10-13 19:57 CEST Nmap scan report for 192.168.3.6 Host is up (0.0011s latency). Not shown: 996 filtered ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp closed https 10000/tcp open snet-sensor-mgmt

    Das hier sind aktuell die Regeln.

    root@rockpro64:~# iptables-legacy -L Chain INPUT (policy DROP) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp multiport ports ssh ACCEPT tcp -- anywhere anywhere tcp multiport ports webmin ACCEPT tcp -- anywhere anywhere tcp multiport ports http ACCEPT tcp -- anywhere anywhere tcp multiport ports https Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination

    Wenn ich das so die ganze Zeit teste, dann zweifel ich immer daran, ob solche Tools(Webmin) irgend einen Vorteil haben!? Mir macht das mittlerweile mehr Arbeit, als wenn ich das alles schnell eben auf der Konsole erledige. Vielleicht bin ich auch nur mittlerweile zu weit weg, von grafischen UI. Ich gebe dem Webmin aber noch ein paar Tage, gibt noch ein paar Sachen zu entdecken.

  • NGINX - Installation

    NGINX
    1
    0 Stimmen
    1 Beiträge
    277 Aufrufe
    Niemand hat geantwortet
  • NGINX - Grundlagen worker_processes

    NGINX
    1
    0 Stimmen
    1 Beiträge
    222 Aufrufe
    Niemand hat geantwortet
  • NGINX - Standard .conf

    NGINX
    3
    0 Stimmen
    3 Beiträge
    294 Aufrufe
    FrankMF

    Als kleiner Tipp, die meisten Anbieter von Software haben mittlerweile Beispiele, wie man das konfiguriert. Hier mal ein Beispiel von Nextcloud.

    Link Preview Image Nginx configuration — Nextcloud latest Administration Manual latest documentation

    favicon

    (docs.nextcloud.com)

  • NGINX - www entfernen

    NGINX
    2
    0 Stimmen
    2 Beiträge
    282 Aufrufe
    FrankMF

    Es geht noch eleganter. Für eine Domain wie frank-mankel.de z.B. so. Muss das mal hier parken, damit ich nicht immer wieder danach suchen muss.

    server { server_name www.example.com example.com; return 301 https://example.com$request_uri; } server { listen 443 ssl; ssl_certificate /path/to/server.cert; ssl_certificate_key /path/to/server.key; server_name www.example.com; return 301 https://example.com$request_uri; } server { listen 443 ssl; ssl_certificate /path/to/server.cert; ssl_certificate_key /path/to/server.key; server_name example.com; <locations for processing requests> }

    Quelle: https://serverfault.com/questions/258378/remove-www-and-redirect-to-https-with-nginx

  • NGINX

    Verschoben NGINX
    1
    0 Stimmen
    1 Beiträge
    532 Aufrufe
    Niemand hat geantwortet