【发布时间】:2018-10-02 09:31:27
【问题描述】:
首先,感谢所有可能会或可能不会尝试帮助我的人。 我的问题:我正在尝试使用 Let's Encrypt 创建一个 ssl 证书。已经安装了文档中提到的所有内容。我决定使用 certbot / 因为它似乎是满足我需求的最简单方法。
我们已经释放了 80 和 443 端口,到达其中一个端口的每个请求都被重定向到我的 Ubuntu 18.04 机器的内部 IP 地址。
这台机器上没有配置,所以在端口 80 或 443 上没有任何监听,正如您在我的 netstat 命令中看到的那样:
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 895/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1211/sshd
tcp6 0 0 :::22 :::* LISTEN 1211/sshd
创建证书后,我将运行一个 Spring Boot 应用程序,它应该使用该证书。
据我从文档中了解到,不需要让正在运行的应用程序监听这些端口。应该可以使用独立参数创建证书。所以我猜 certbot 创建了一个小型应用程序,它自己监听其中一个端口,以验证我就是我声称的那个人。对吧?
placeholder.example.com 就像您将假定为占位符一样。我认为在打开端口 80 和 443 时,为什么我不发布我的域名很明显。
root@urlaub:/# certbot certonly --standalone --preferred-challenges http -d placeholder.example.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for placeholder.example.com
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. placeholder.example.com (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://placeholder.example.com/.well-known/acme-challenge/jCJ4waxV0aYPxjqDI3OcBXXPReNSrse1kd6piK9Dwdo: Connection refused
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: placeholder.example.com
Type: connection
Detail: Fetching
http://placeholder.example.com/.well-known/acme-challenge/jCJ4waxV0aYPxjqDI3OcBXXPReNSrse1kd6piK9Dwdo:
Connection refused
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
编辑:我已经尝试了很多次,但都没有成功。现在 /etc/letsencrypt/keys 中有 13 个 .pem 文件 我可以将它们转换为 .p12 文件以在 Spring Boot 应用程序中使用它吗?
【问题讨论】:
-
"placeholder.mydomain.com 是您将假定的占位符。"然后使用
placeholder.example.com,因为mydomain.com肯定不是占位符,它是在线存在的。 -
已编辑。不过不明白使用 placeholder.mydomain.com 有什么奇怪的地方。
-
简单:你认为
mydomain.com今天在互联网上存在并且被某人积极使用吗?如果没有,请仔细检查。如果是,这是您的域名吗?如果不是,想象一下真正的所有者发生了什么。有关所有详细信息,请阅读 RFC 2606:rfc-editor.org/rfc/rfc2606.txt 另一个示例:.MAILTLD 永远不会真正存在,因为它已被许多文档(ab)使用,这使得它现在无法在不破坏的情况下使用多人配置。 -
“我认为我不公开我的域名的原因很明显”这是默默无闻的安全性(这不起作用):除了使任何人的故障排除变得更加复杂之外,您是否知道域列表名字,特别是
.COM的名字,是公共数据,所以任何人都可以在某个时候找到你的......
标签: spring spring-boot ssl lets-encrypt