toyst
V2EX  ›  问与答

docker 如何映射 ipv6 端口

  •  
  •   toyst · Nov 25, 2019 · 3288 views
    This topic created in 2364 days ago, the information mentioned may be changed or developed.

    我 VPS 是有 IPV6 的,地址如下:

    压缩地址:	2a02:180::119/64
    扩展地址:	2a02:0180:0000:0000:0000:0000:0000:0119/64
    前缀字首:	ffff:ffff:ffff:ffff:0000:0000:0000:0000
    范围:	2a02:180:0:0:0:0:0:0
    2a02:180:0:0:ffff:ffff:ffff:ffff
    数量 /64s:	1
    Gateway:        2a02:0180:0000:0000:0000:0000:0000:0001
    

    编辑密钥**/etc/docker/daemon.json**,里面的fixed-cidr-v6我应该怎么填写呢?

    {
      "ipv6": true,
      "fixed-cidr-v6": "2a02:180::119/64"
    }
    

    我按上面的填写,运行容器以后,-p 80:80,外面能通过**[2a02:180::119]:80**访问到页面,但是容器里面 ping6 ipv6.google.com 不通,也就是说容器里面无法访问 IPV6,请教如何实现映射 IP6 端口像 IPV4 那样呢? 谢谢!

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2952 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:12 · PVG 14:12 · LAX 23:12 · JFK 02:12
    ♥ Do have faith in what you're doing.