hhgfy
V2EX  ›  问与答

不懂就问,通过 https://ip 这样的方式访问,预期的行为应该是什么?

  •  1
     
  •   hhgfy · Aug 27, 2020 · 4513 views
    This topic created in 2263 days ago, the information mentioned may be changed or developed.

    是这样的,项目中用了 kong 作为代理,被安全扫描出漏洞,说是用了自签证书( kong 默认的 localhost )。

    那么这种通过 ip 访问的场景,应该返回什么证书呢?

    19 replies  •  2020-08-27 14:56:46 +08:00
    flowfire
    flowfire
    Aug 27, 2020
    1
    预期行为是返回被受信任的根证书签发机构签发的证书。
    不过一般来说让受信任的根证书签发机构签发 ip 证书比让他签发域名证书难很多就是了。
    具体参考 https://1.1.1.1
    hhgfy
    hhgfy
    OP
    Aug 27, 2020
    2
    @flowfire 也就是说 host 和证书对不上也不用管吗?
    flowfire
    flowfire
    Aug 27, 2020
    3
    @hhgfy #2 人家的 host 就是 ip 啊。。。。
    hhgfy
    hhgfy
    OP
    Aug 27, 2020
    4
    @flowfire 就是说没 ip 证书的话应该是什么样的,我看了一些网站,还是返回了原本的域名证书
    virusdefender
    virusdefender
    Aug 27, 2020
    5
    自签名证书不一定是漏洞吧
    hhgfy
    hhgfy
    OP
    Aug 27, 2020
    6
    @virusdefender 虽然完全没用上,但安全那边就是标了个警告。。。
    flowfire
    flowfire
    Aug 27, 2020
    7
    我觉得要不你直接给个链接看看
    hhgfy
    hhgfy
    OP
    Aug 27, 2020
    8
    @flowfire https://121.201.64.193/ 就像这样
    flowfire
    flowfire
    Aug 27, 2020
    9
    @hhgfy #8 你这个就是因为证书不被信任啊。
    简单地方法就是买个域名,把域名解析上去,然后去 let's encrypt 申请个免费的证书。然后用域名访问。
    如果你一定要用 https + ip 访问的话,我也不知道哪家证书卖这种的。
    反正 纯 ip + https 是可行的,参考这个 https://106.54.251.56/
    shinciao
    shinciao
    Aug 27, 2020
    10
    需要 IP 证书可以联系我 129 一年
    takemeaway
    takemeaway
    Aug 27, 2020
    11
    @hhgfy 买 IP 证书即可
    xJogger
    xJogger
    Aug 27, 2020 via Android
    12
    给 IP 签证书需要证明自己拥有这个 IP,拥有 IP 的前提是需要有自己的 ASN 号码,一般买服务器带的那个 IP 都是只有使用权的,所以没法签证书。
    我也只是大概知道,说的可能不准确。
    shinciao
    shinciao
    Aug 27, 2020❤️1
    13
    效果参考:
    https://112.124.31.113/
    shinciao
    shinciao
    Aug 27, 2020❤️1
    14
    @xJogger #12 不需要的 文件验证就可以 我这边只要 129 一年
    Showfom
    Showfom
    PRO
    Aug 27, 2020 via iPhone❤️1
    15
    @xJogger 老早就不需要 ov 了 现在 dv 就可以申请 ip 证书 只要 http 验证证明你能用这个 ip 即可

    另外 common name 必须要带一个域名,

    参考我自己申请的

    https://45.9.9.9/
    shinciao
    shinciao
    Aug 27, 2020❤️1
    16
    @Showfom #15 我这边 common name 可以不带域名(
    参考我上面发的
    Showfom
    Showfom
    PRO
    Aug 27, 2020 via iPhone
    17
    @lanternxx 还真的 牛逼啊 Comodo 都可以这么搞了啧啧
    whywhywhy
    whywhywhy
    Aug 27, 2020
    18
    一直想问个问题,JS 能获取当前连接 SSL 证书是可信状态还是不可信状态吗?
    pinews
    pinews
    Aug 27, 2020❤️1
    19
    1 、跳转到域名
    2 、禁止访问
    3 、不支持的访问方式
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   808 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 19:10 · PVG 03:10 · LAX 11:10 · JFK 14:10
    ♥ Do have faith in what you're doing.