V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
There is no place like ::1
aries1998
V2EX  ›  IPv6

部分国内 ipv6 访问出现端口能通,但 ssl 握手不回包的奇怪问题

  •  
  •   aries1998 · 362 天前 · 1247 次点击
    这是一个创建于 362 天前的主题,其中的信息可能已经有所发展或是发生改变。
    大概的网络环境就是 ubuntu 做主路由,iptables 透明代理分流国内国外 ip ,dnsmasq 下发 ipv6 地址, 后端机器都能正常拿到 ipv6 地址.

    具体问题表现: 后端机器 pc 或者手机访问国内大部分有 ipv6 部署的比如 B 站都没问题,国外的也没问题,但是有部分国内的 ipv6 地址访问出现超时,目前只发现了 https 协议这块。 这些问题 ipv6 地址直接在路由上访问是没有任何问题的. http://test-ipv6.com/上检测 ipv6 环境也都 ok 。



    举个例子 https://www.zhibo8.cc , 这个是我在 windows 机器上用 curl 抓的结果, 服务器 tls 握手直接不回包
    curl -v -6 --header "Host:www.zhibo8.cc" https://[2400:3200:1300::7e]:443
    * Trying 2400:3200:1300::7e:443...
    * TCP_NODELAY set
    * Connected to 2400:3200:1300::7e (2400:3200:1300::7e) port 443 (#0)
    * ALPN, offering http/1.1
    * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
    * successfully set certificate verify locations:
    * CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
    * TLSv1.2 (OUT), TLS header, Certificate Status (22):
    * TLSv1.2 (OUT), TLS handshake, Client hello (1):


    但是这个 ip 又是通的,比如 icmp
    ping 2400:3200:1300::7e

    正在 Ping 2400:3200:1300::7e 具有 32 字节的数据:
    来自 2400:3200:1300::7e 的回复: 时间=22ms
    来自 2400:3200:1300::7e 的回复: 时间=22ms
    来自 2400:3200:1300::7e 的回复: 时间=22ms

    以及直接 nc 到 443 端口, 也是通的
    nc -6 2400:3200:1300::7e 443
    get /
    HTTP/1.1 400 Bad Request
    Server: nginx/1.8.0
    Date: Fri, 21 Apr 2023 18:42:58 GMT
    Content-Type: text/html
    Content-Length: 172
    Connection: close

    <html>
    <head><title>400 Bad Request</title></head>
    <body bgcolor="white">
    <center><h1>400 Bad Request</h1></center>
    <hr><center>nginx/1.8.0</center>
    </body>
    </html>

    windows 上查看路由也没问题, 第一跳是我路由器的 ip ,后面就到运营商去了
    tracert -d 2400:3200:1300::7e

    通过最多 30 个跃点跟踪到 2400:3200:1300::7e 的路由

    1 <1 毫秒 <1 毫秒 <1 毫秒 2409:8a4c:a24:9651:d250:99ff:fe44:f5e2
    2 3 ms 3 ms 3 ms 2409:804c:27:1:2702:200:2710:1901
    3 4 ms 3 ms 3 ms 2409:804c:27:1:2702:400:2710:1900
    4 5 ms 4 ms 4 ms 2409:8080:0:2:503:554::
    5 23 ms 23 ms 23 ms 2409:8080:0:1:205:503:1:0
    6 19 ms 19 ms 19 ms 2409:8080:0:2:205:271:0:1
    7 20 ms 19 ms 19 ms 2409:801e:f0:1::5cb
    4 条回复    2023-05-29 12:50:56 +08:00
    miaomiao888
        1
    miaomiao888  
       362 天前
    似乎和 MTU 有关: https://www.v2ex.com/t/928381
    aries1998
        2
    aries1998  
    OP
       361 天前
    @miaomiao888 果然是 PMTU 黑洞这个问题, 问了些全网开 ipv6 人都正常, 但问的几个都用的 openwrt ,可是固件处理了这个问题。
    naoki66
        3
    naoki66  
       350 天前
    ImmortalWrt 21.02.6 目前没有遇到黑洞问题,
    lean 自编译 IPV6 总是调不好。
    sdcg1994
        4
    sdcg1994  
       325 天前 via Android
    我家上海电信,直接连光猫和连路由器 ipv6 获得之后,都是微信登录不了,之前以为是 cn2 问题,重新拨号到正常网段还是不行,就把 v6 关了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5507 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:58 · PVG 14:58 · LAX 23:58 · JFK 02:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.