AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1068270
Accepted
Hannes
Hannes
Asked: 2021-07-01 07:38:15 +0800 CST2021-07-01 07:38:15 +0800 CST 2021-07-01 07:38:15 +0800 CST

使用 stunnel 作为带有 STARTTLS 的 SMTP 的 SSL 版本之间的代理

  • 772

我有一个不支持 TLS 1.2 的旧软件。但是 SMTP 服务器只支持 TLS 1.2。

现在我想使用 stunnel 连接到 SMTP 服务器并监听 smtp 访问。我已经有此服务器的有效证书。在配置不同的 TLS 版本之前,我只想测试这个“stunnel 代理”是否正常工作。我使用 Thunderbird 连接到 :587 在 [TLS_proxy_connector] 和 [TLS_proxy_listener] 我有protocol = smtp. 我试图在一个或两个部分中将它们注释掉。但是我立即收到错误或某种超时,Thunderbird 无法发送电子邮件。

这是stunnel配置:

setuid = stunnel4
setgid = stunnel4

foreground = yes
;don't write pid
pid =


[TLS_proxy_connector]
client = yes
accept = 127.0.0.1:53681
protocol = smtp
connect = <mailserver>:587
verify = 2
CApath = /etc/ssl/certs/
checkHost = <mailserver>
;OCSPaia = yes

[TLS_proxy_listener]
accept = 587
protocol = smtp
key = /etc/ssl/private/key.pem
cert = /etc/ssl/certs/cert_.pem
CAfile = /etc/ssl/certs/chain_.pem
connect = 53681

我究竟做错了什么?还有其他更适合这里的工具吗?我知道我可以设置一个自己的邮件服务器,它接受 TLS 1.0 和 1.1 并用作智能主机,但这太过分了,因为我必须关心安全性。当前检查安全性,因为您只能使用有效凭据发送。谢谢你的帮助。

更新:当两个条目都有protocol = smtp. 当对 TLS 版本进行进一步测试时,我将添加更多信息。

proxy smtp ssl ssmtp starttls
  • 1 1 个回答
  • 1079 Views

1 个回答

  • Voted
  1. Best Answer
    Hannes
    2021-07-02T04:26:41+08:002021-07-02T04:26:41+08:00

    以上配置对于代理不同的 TLS 版本是正确的。无需在 stunnel 中为 SSL/TLS 配置任何特殊内容。

    stunnel -version
    stunnel 5.30 on x86_64-pc-linux-gnu platform
    

    当您通过sudo apt install stunnel.

    原始服务器的testssl.sh输出

    
     Testing protocols via sockets
    
     SSLv2      not offered (OK)
     SSLv3      not offered (OK)
     TLS 1      not offered
     TLS 1.1    not offered
     TLS 1.2    offered (OK)
     SPDY/NPN   (SPDY is an HTTP protocol and thus not tested here)
     HTTP2/ALPN (HTTP/2 is a HTTP protocol and thus not tested here)
    

    testssl.sh 通过 stunnel 输出代理端口

     Testing protocols via sockets
    
     SSLv2      not offered (OK)
     SSLv3      not offered (OK)
     TLS 1      offered
     TLS 1.1    offered
     TLS 1.2    offered (OK)
     SPDY/NPN   (SPDY is an HTTP protocol and thus not tested here)
     HTTP2/ALPN (HTTP/2 is a HTTP protocol and thus not tested here)
    

    注意:使用 TLS 1 和 1.1 通常是个坏主意,因为这两种协议都有安全漏洞,例如https://www.venafi.com/blog/why-its-dangerous-use-outdated-tls-security-protocols 在这种情况下,这个 TLS 代理端口将只在内部网络中可用,并且永远不会暴露在互联网上,所以可以使用这个 hack,直到这个不支持 TLS 1.2 的旧软件被替换。

    • 0

相关问题

  • 持续监控许多服务器运行状况的简单方法?

  • Web 代理脚本与 http 代理的效率?

  • 为将笔记本电脑带回家的用户模拟公司代理

  • 什么是 Microsoft 代理客户端(MSP 客户端)

  • 使用大量 javascript 的页面上的鱿鱼速度很慢

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

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

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve