工单节点使用指南
• 请用平和的语言准确描述你所遇到的问题
• 厂商的技术支持和你一样也是有喜怒哀乐的普通人类,尊重是相互的
• 如果是关于 V2EX 本身的问题反馈,请使用 反馈 节点
twoyuan

有锥子斜技的人?你们的 https://t.tt 证书配错了……

  •  
  •   twoyuan · Jan 3, 2018 · 11381 views
    This topic created in 3228 days ago, the information mentioned may be changed or developed.
    58 replies  •  2018-01-04 10:17:01 +08:00
    tylinux
    tylinux
    Jan 3, 2018 via Android❤️5
    1
    锥子,斜技…
    xman99
    xman99
    Jan 3, 2018
    2
    请描述清楚, 是锤子, 不是锥子,哈哈哈
    linescape
    linescape
    Jan 3, 2018
    3
    人压根没配,是你多加了 s 而已
    riggzh
    riggzh
    Jan 3, 2018
    4
    f2f2f
    f2f2f
    Jan 3, 2018
    5
    301 跳转的为啥还要给配 https ……
    riggzh
    riggzh
    Jan 3, 2018
    6
    @linescape 我也是这么想的-。-
    twoyuan
    twoyuan
    OP
    Jan 3, 2018
    7
    @linescape #3 配了的,Chrome 的报错是 net::ERR_CERT_COMMON_NAME_INVALID,证书信息可以看到是 *.smartisan.com 的
    davidyin
    davidyin
    Jan 3, 2018
    8
    这里显示的超时。没有跳转。
    q409195961
    q409195961
    Jan 3, 2018
    9
    3L 正解
    wsly47
    wsly47
    Jan 3, 2018 via iPhone
    10
    forsam
    forsam
    Jan 3, 2018
    11
    总想搞些大新闻
    riggzh
    riggzh
    Jan 3, 2018
    12


    因为证书校验在 301 跳转之前
    Funian
    Funian
    Jan 3, 2018
    13
    t.tt 直接到锤子网站
    LeoNG
    LeoNG
    Jan 3, 2018❤️1
    14
    锤子!! 科技!!

    你想决战优酷吗!
    Panic
    Panic
    Jan 3, 2018
    15
    不够体面啊
    rrfeng
    rrfeng
    Jan 3, 2018
    16
    说实话这些小细节真的不是每个人(运维)都能考虑到的。
    Phariel
    Phariel
    Jan 3, 2018
    17
    锥子斜技

    楼主是五笔玩家么???
    dangyuluo
    dangyuluo
    Jan 3, 2018
    18
    人家是 t.tt 跳转到 smartisan.com 然后做了个通配符域名。t.tt 只负责跳转,人家没上 https 的
    Hozzz
    Hozzz
    Jan 3, 2018
    19
    @Phariel 你这个滑稽怎么弄的?
    realpg
    realpg
    Jan 3, 2018
    20
    人家根本没开 https 服务 443 上跑的是 smartisan 的网站
    ouqihang
    ouqihang
    Jan 3, 2018
    21
    楼主故意打错字,估计是想避免纠纷什么的,老罗可不好惹,V 站的贴又很容易搜到。
    scriptB0y
    scriptB0y
    Jan 3, 2018❤️2
    23
    @linescape @q409195961 t.tt 的 443 是开了的,只不过是 smartisan.com 的网站。这不叫“没配啊”

    https://gist.github.com/laixintao/21771e85ddd5d06da932dd8e3a965be3

    这个就是 443 握手成功,但是获得的证书里面不包含 t.tt 域名。这里要么给 t.tt 申请一个域名 https 要么证书换成多域名的加上 t.tt

    @f2f2f 301 也是 HTTP 的状态码,为什么 301 也要配 HTTPS 跳转,就和为什么要配 HTTPS 答案一样。想要安全,就用 TLS 建立连接了才拿到 301 状态码。

    @realpg 说没开也不准确吧, 如果没开应该把 host 是 t.tt 的 443 端口请求直接关掉吧。
    logOo
    logOo
    Jan 3, 2018
    24
    wwqgtxx
    wwqgtxx
    Jan 3, 2018 via iPhone
    25
    @scriptB0y 很多网站最前端是 cdn,只不过没在 cdn 节点上配置 t.tt 的证书而已,至于没开为什么不直接把 host 是 t.tt 的 443 请求关闭,那是因为完全没这个必要多此一举罢了
    xi2008wang
    xi2008wang
    Jan 3, 2018
    26
    200 万买的域名,证书都懒得买
    scriptB0y
    scriptB0y
    Jan 3, 2018
    27
    @wwqgtxx cdn 也可以关闭 443 吧。我觉得“关闭来自 t.tt 的 443 ”比“把来自 t.tt 的 443 的请求转发到 www.smartisan.com 的 443 ”更合适一些吧? 虽然两者都是错误……
    Tinet
    Tinet
    Jan 3, 2018
    28
    五笔用户,而且应该上了年纪了,字都不记得怎么写了
    wwqgtxx
    wwqgtxx
    Jan 3, 2018 via iPhone
    29
    @scriptB0y 看来你是没配置过 cdn,一般 cdn 回源的时候不管你前台是 http 还是 https 后端都是走同一个协议回源真正的服务器(当然也可以配置成选择性回源),在访问 https://t.tt 的时候 403 只是因为访问 http://t.tt 的时候也是 403 到 https://www.smartisan.com/仅此而已,人家维护人员都懒得给 t.tt 配置个证书还指望人家专门加个配置把 t.tt 的 https 访问关掉?多此一举
    wwqgtxx
    wwqgtxx
    Jan 3, 2018 via iPhone
    30
    @scriptB0y 而且你去手动 nslookup 一下就知道 t.tt 和 www.smartisan.com 是解析到同一个 cdn 的,直接把 t.tt 的 443 端口关了,你让 https://www.smartisan.com/ 怎么访问
    liuxu623
    liuxu623
    Jan 3, 2018 via Android
    31
    @wwqgtxx 匹配 host 啊,不是运维或者没有相关经验就别乱回复了啊…
    wwqgtxx
    wwqgtxx
    Jan 3, 2018 via iPhone
    32
    @liuxu623 重点是为什么要多此一举
    wwqgtxx
    wwqgtxx
    Jan 3, 2018 via iPhone
    33
    @liuxu623 虽然在 nginx 或者其他服务器配置中的确可以关闭指定 host 的 https 的访问,但是有那个功夫干嘛不配置个 https 证书,不就是运维啥都没配置而已么…
    liuxu623
    liuxu623
    Jan 3, 2018 via Android
    34
    @wwqgtxx 不配正确的证书,你完全可以劫持 t.tt 的 dns 然后放个假证书,再跳转到自己的网站,用户是不能分辨的,因为两个证书都是不正确的,没有相关经验就别回复了…
    Liang
    Liang
    Jan 3, 2018
    35
    想当年帮朋友修电脑把 baidu.com 改成了自己的搜索引擎。。。
    wwqgtxx
    wwqgtxx
    Jan 3, 2018
    36
    @liuxu623 核心只是在于人家运维只配置了 http 部分,https 部分只不过沿用了他们服务器上的默认配置而已,你“劫持 t.tt 的 dns 然后放个假证书,再跳转到自己的网站”不还是多此一举,t.tt 的所有权本来就是锤子的,干嘛不配置个合法证书更一劳永逸,而且人家主站的证书是合法的,别没事炫耀你的奇葩经验,谁会干这种吃力不讨好的事,又不是运营商劫持,天天想着这种歪门邪道
    liuxu623
    liuxu623
    Jan 3, 2018 via Android
    37
    @wwqgtxx 你这个智商就不要回复了,我第一条回复只是告诉你怎么关闭 t.tt 的 https 访问,并没有说这样做是合理的
    wwqgtxx
    wwqgtxx
    Jan 3, 2018 via iPhone
    38
    @liuxu623 那么用你的质量告诉我为什么要这么干
    wwqgtxx
    wwqgtxx
    Jan 3, 2018 via iPhone
    39
    质量->智商
    liuxu623
    liuxu623
    Jan 3, 2018 via Android
    40
    @wwqgtxx 不应该这么干和不能这么干是两个概念,我第一条回复是反驳你说不能单独关闭 t.tt 的 https 访问,你这个智商就不要回复了好吗?
    wwqgtxx
    wwqgtxx
    Jan 3, 2018 via iPhone
    41
    我从来没说过不能只关闭 t.tt 的 https 访问,我只是说不能粗暴的关闭 cdn 上的 443 端口,麻烦你老人家看仔细
    @liuxu623
    liuxu623
    liuxu623
    Jan 3, 2018 via Android
    42
    @wwqgtxx 人家就说关闭 t.tt 的 443,到你这就变成关闭那台服务器的 443 端口,正常人都是理解为关闭 t.tt 的 https 访问,发现自己回复错了又赶紧百度了一发吧,这个智商…
    wwqgtxx
    wwqgtxx
    Jan 3, 2018
    43
    @liuxu623 关闭 443 端口和关闭 https 访问正常人怎么就理解从同一个意思了,您老这语文真的及格了么。而且就这个问题而言,关闭 t.tt 的 https 有意义么
    wwqgtxx
    wwqgtxx
    Jan 3, 2018
    44
    而且别一句两句的就说别人的智商,仿佛你是天下第一似的,那么你就靠你强大的智商帮人家 t.tt 把问题解决了呀
    @liuxu623
    lyhiving
    lyhiving
    Jan 3, 2018 via Android
    45
    一些浏览器会一 s 到底,所以锤子申请个免费的换上去就可以了。都散了吧
    banro512
    banro512
    Jan 3, 2018 via Android
    46
    打起来了
    哈哈
    server
    server
    Jan 3, 2018
    47
    锥子斜技
    tylerdurden
    tylerdurden
    Jan 3, 2018
    48
    好像问题已经解决了?
    scriptB0y
    scriptB0y
    Jan 3, 2018
    49
    @tylerdurden 是的已经解决了,证书没问题了。

    curl -Iv https://t.tt
    * Rebuilt URL to: https://t.tt/
    * Trying 140.143.179.117...
    * TCP_NODELAY set
    * Connected to t.tt (140.143.179.117) port 443 (#0)
    * ALPN, offering h2
    * ALPN, offering http/1.1
    * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
    * successfully set certificate verify locations:
    * CAfile: /etc/ssl/cert.pem
    CApath: none
    * TLSv1.2 (OUT), TLS handshake, Client hello (1):
    * TLSv1.2 (IN), TLS handshake, Server hello (2):
    * TLSv1.2 (IN), TLS handshake, Certificate (11):
    * TLSv1.2 (IN), TLS handshake, Server key exchange (12):
    * TLSv1.2 (IN), TLS handshake, Server finished (14):
    * TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
    * TLSv1.2 (OUT), TLS change cipher, Client hello (1):
    * TLSv1.2 (OUT), TLS handshake, Finished (20):
    * TLSv1.2 (IN), TLS change cipher, Client hello (1):
    * TLSv1.2 (IN), TLS handshake, Finished (20):
    * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
    * ALPN, server accepted to use http/1.1
    * Server certificate:
    * subject: C=CN; ST=BeiJing; L=BeiJing; O=Smartisan Technology Co.,LTD.; OU=IT Dept; CN=www.t.tt
    * start date: Aug 24 00:00:00 2016 GMT
    * expire date: Aug 24 23:59:59 2019 GMT
    * subjectAltName: host "t.tt" matched cert's "t.tt"
    * issuer: C=US; O=GeoTrust Inc.; CN=GeoTrust SSL CA - G3
    * SSL certificate verify ok.
    > HEAD / HTTP/1.1
    > Host: t.tt
    > User-Agent: curl/7.54.0
    > Accept: */*
    >
    < HTTP/1.1 301 Moved Permanently
    HTTP/1.1 301 Moved Permanently
    < Date: Wed, 03 Jan 2018 06:21:01 GMT
    Date: Wed, 03 Jan 2018 06:21:01 GMT
    < Content-Type: text/html
    Content-Type: text/html
    < Content-Length: 178
    Content-Length: 178
    < Connection: keep-alive
    Connection: keep-alive
    < Location: https://www.smartisan.com
    Location: https://www.smartisan.com
    < Server: ARTWS/1.0
    Server: ARTWS/1.0
    < X-XSS-Protection: 1;mode=block
    X-XSS-Protection: 1;mode=block

    <
    * Connection #0 to host t.tt left intact
    tylerdurden
    tylerdurden
    Jan 3, 2018
    50
    issue closed,next !
    dobelee
    dobelee
    Jan 3, 2018
    51
    锥子斜技...笑尿了。。。
    jason19659
    jason19659
    Jan 3, 2018
    52
    66666
    Terry05
    Terry05
    Jan 3, 2018
    53
    不怕老罗找你上优酷吗?
    twoyuan
    twoyuan
    OP
    Jan 3, 2018
    54
    @tylinux #1
    @xman99 #2
    @LeoNG #14
    @Phariel #17
    @ouqihang #21
    @Tinet #28
    @server #47
    @dobelee #51

    这真不是我起的啊……你们大概不认识一个叫方迟的设计师 🌚

    https://www.zhihu.com/people/jordanfc
    salmon5
    salmon5
    Jan 3, 2018
    55
    openssl s_client -connect t.tt:443 2>&1 | openssl x509 -text |grep -A1 "Subject Alternative Name"
    X509v3 Subject Alternative Name:
    DNS:static.smartisanos.cn, DNS:dl2.smartisan.cn, DNS:www.t.tt, DNS:t.tt


    这个还是有必要的,这就是一个运维的情怀,不是 60 分就行了,90-100 分才行。
    HSTS 也是必要的。
    Phariel
    Phariel
    Jan 3, 2018
    56
    @twoyuan #54 哈哈哈哈哈哈,跪了
    msg7086
    msg7086
    Jan 4, 2018
    57
    看到有人说 IP 上的端口可以根据 host 选择性关闭我就笑了。v2 大了什么智商的鸟都来了。
    Tinet
    Tinet
    Jan 4, 2018
    58
    @twoyuan 哈哈哈哈哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1390 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 78ms · UTC 18:43 · PVG 02:43 · LAX 10:43 · JFK 13:43
    ♥ Do have faith in what you're doing.