cathedrel
V2EX  ›  SSL

自签 CA 证书和服务器 IP 证书有什么要注意的?

  •  
  •   cathedrel · Sep 19, 2021 · 3136 views
    This topic created in 1878 days ago, the information mentioned may be changed or developed.

    尝试着自签了一个 CA 和一个服务器证书,因为是要放到好几台小鸡上的,我就这样签的:

    authorityKeyIdentifier = keyid,issuer

    basicConstraints = CA:FALSE

    keyUsage = critical, digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment, cRLSign, keyCertSign

    subjectAltName = @alt_names

    [alt_names]

    IP.1 = 1.2.3.4

    IP.2 = 2.2.2.2

    IP.3 = 3.3.3.3

    IP.4 = 4.4.4.4

    IP.5 = 5.5.5.5

    DNS.1 = aaa.com

    DNS.2 = ×.aaa.com

    自签的证书在我的 TLS 隧道上可以用,感觉还比之前通过可信 CA 签发的域名证书去连接的还快一点点。但是网页就不行,打开就显示 ERR_CONNECTION_REFUSED

    有哪些地方该检查的?

    5 replies  •  2021-10-01 10:54:47 +08:00
    ryd994
    ryd994
    Sep 19, 2021 via Android❤️1
    1
    connection refused 是 443 端口没开。检查你的服务器软件配置。
    如果是证书问题的话应该是 ssl handshake failure
    cathedrel
    cathedrel
    OP
    Sep 19, 2021 via Android
    2
    @ryd994 不是 443 端口,是 webmin 的默认 10000 号端口,又是内网机器,通过端口映射访问的,加载 ssl 证书就不行,修改 /etc/webmin/config 把“ssl=1”的 1 删除再重启 webmin 就又能 http 访问了……
    iBugOne
    iBugOne
    Sep 19, 2021 via Android
    3
    你看看服务器软件的 log 有没有吐槽证书有问题,我有一次 nginx 挂了就是证书签得不对
    cathedrel
    cathedrel
    OP
    Sep 20, 2021
    4
    @iBugOne 后来发现是哪里不对的?
    BitCert
    BitCert
    Oct 1, 2021
    5
    可以申请公网的 IP 证书
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2366 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:54 · PVG 20:54 · LAX 04:54 · JFK 07:54
    ♥ Do have faith in what you're doing.