关于阿里云开启IPV6的问题,

lfq1989 2018-7-13 1661

添加了监听端口 依然不能通过检测。

https://blog.csdn.net/jiakg/article/details/69049984

这里有提到编译nginx的时候需要有—-with-ipv6 ,我们的好像是没有这个。

上传的附件:
最新回复 (9)
  • 虚竹 2018-7-13
    引用 2

    默认就支持的。
    启用监听后,可以先在服务器上用 curl 命令测试下连通性:

    curl -v https://[2001:470:c:afd::2]:443/ -H "Host: yourdomain.com"


    yourdomain.com 改成你的域名。

  • lfq1989 2018-7-13
    引用 3

    执行以后提示这个:

    curl: (3) [globbing] error: bad range specification after pos 10

    上传的附件:
  • lfq1989 2018-7-13
    引用 4

    端口也是有监听的。

    上传的附件:
  • 虚竹 2018-7-13
    引用 5

    我的错,ipv6测试时要多加参数:

    curl -v -g -6 "https://[2001:470:c:afd::2]:443/" -H "Host: yourdomain.com"
  • lfq1989 2018-7-13
    引用 6

    这次是这样对了吗

    上传的附件:
  • lfq1989 2018-7-13
    引用 7

    —-with-ipv6 这个不用管吗

    上传的附件:
  • 虚竹 2018-7-13
    引用 8

    测试时还要再加上 -k 参数,不然会出现你上面的这个 ssl 证书错误。

    我在你服务器上测试是成功的。

    # curl -kv -g -6 "https://[2001:470:c:afd::2]:443/" -H "Host: app.xxxxxx.com" | head
    * About to connect() to 2001:470:c:afd::2 port 443 (#0)
    *   Trying 2001:470:c:afd::2...
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 2001:470:c:afd::2 (2001:470:c:afd::2) port 443 (#0)
    * Initializing NSS with certpath: sql:/etc/pki/nssdb
    * skipping SSL peer certificate verification
    * SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
    * Server certificate:
    *       subject: CN=AppNode Auto Generated Wildcard Certificate,OU=AppNode,O="Fuzhou Quyun Information Technology Co., Ltd",L=Fuzhou,ST=Fujian,C=CN
    *       start date: Apr 05 07:42:13 2018 GMT
    *       expire date: Apr 05 07:42:13 2038 GMT
    *       common name: AppNode Auto Generated Wildcard Certificate
    *       issuer: CN=AppNode Auto Generated Wildcard Certificate,OU=AppNode,O="Fuzhou Quyun Information Technology Co., Ltd",L=Fuzhou,ST=Fujian,C=CN
    > GET / HTTP/1.1
    > User-Agent: curl/7.29.0
    > Accept: */*
    > Host: app.xxxxxxx.com
    > 
    < HTTP/1.1 200 OK
    < Server: nginx/1.14.0
    < Date: Fri, 13 Jul 2018 15:08:06 GMT
    < Content-Type: text/html; charset=utf-8
    < Transfer-Encoding: chunked
    < Connection: keep-alive
    < Access-Control-Allow-Origin: *
    < Set-Cookie: PHPSESSID=jtg7j07j06i9nr3m3r821oa757; path=/
    < Expires: Thu, 19 Nov 1981 08:52:00 GMT
    < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    < Pragma: no-cache
    < Access-Control-Allow-Origin: *
    < 
    { [data not shown]
    100 58933    0 58933    0     0   181k      0 --:--:-- --:--:-- --:--:--  182k
    * Connection #0 to host 2001:470:c:afd::2 left intact
  • 虚竹 2018-7-13
    引用 9

    如果是外部网络无法访问,请确定客户端所在的网络环境是否支持IPv6。

    我在一台支持ipv6的海外服务器上,并不能正常ping通你的服务器:

    # ping6 2001:470:c:afd::2
    connect: Network is unreachable


    最好还是咨询下服务商。

  • 虚竹 2018-7-13
    引用 10

    网络上有太多过时或不负责任的文章,请以nginx官方文档和我的回复为准。

    官方的编译参数根本没有这个选项:
    http://nginx.org/en/docs/configure.html

返回
发新帖