dovecot:我在本地主机上获取了证书,但没有从外部获取

dovecot:我在本地主机上获取了证书,但没有从外部获取

几天前,我的 dovecot/postfix/fail2ban 设置运行良好:当我从外部连接(例如我的本地主机)时,我得到

CONNECTED(000002F8)
write:errno=10054
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 326 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol  : TLSv1.2
Cipher    : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg   : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1569483184
Timeout   : 300 (sec)
Verify return code: 0 (ok)
---

但是当我本地连接时

    me@example:/etc/dovecot/conf.d$ openssl s_client localhost:995
CONNECTED(00000005)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = example.com
verify return:1
---
Certificate chain
 0 s:CN = example.com
   i:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
 1 s:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
   i:O = Digital Signature Trust Co., CN = DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
bla
-----END CERTIFICATE-----
subject=CN = example.com

issuer=C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3

---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: ECDH, P-384, 384 bits
---
SSL handshake has read 3274 bytes and written 767 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 2048 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : TLS_AES_256_GCM_SHA384
    Session-ID: bla
    Session-ID-ctx:
    Resumption PSK: bla
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 7200 (seconds)
    TLS session ticket:
    bla

    Start Time: 1569483321
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: no
    Max Early Data: 0
---
read R BLOCK
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : TLS_AES_256_GCM_SHA384
    Session-ID: bla
    Session-ID-ctx:
    Resumption PSK: bla
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 7200 (seconds)
    TLS session ticket:
    bla

    Start Time: 1569483321
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: no
    Max Early Data: 0
---
read R BLOCK
+OK Dovecot (Ubuntu) ready.

我搜索了日志,没有发现任何可疑的东西。而且,毕竟,它清楚地表明我可以在本地主机上连接并获得证书。然而,从外部我可以连接(CONNECTED(000002F8))但我没有获得证书。

我需要看哪里?什么可能导致此类问题?

谢谢!

答案1

写入:errno=10054
...
SSL 握手已读取 0 个字节并写入 326 个字节

虽然您可以先连接,但随后连接被重置(10054 是 WSAECONNRESET - 对端重置连接)。 造成这种情况的可能原因是客户端和服务器之间的某个深度检查防火墙,当它看到 TLS 握手并且不允许此协议时,它会阻止连接。 这导致无法从服务器读取数据(“...已读取 0 字节”) 因此也没有证书或 TLS 握手的任何其他服务器端部分。

相关内容