AliYun 配置 TunnelBroker IPv6 隧道

2023-12-24 21:08:17

流程

  1. 编辑 /etc/sysctl.conf,修改以下条目。
1
2
3
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
  1. 执行 sysctl -p 刷新设置文件
  2. 写入配置信息至 /etc/network/interfaces
    1
    2
    3
    4
    5
    6
    7
    8
    auto he-ipv6
    iface he-ipv6 inet6 v4tunnel
    address [客户端 IPv6 地址]
    netmask 64
    endpoint [隧道服务器 IPv4 地址]
    local [本机 IPv4 地址]
    ttl 255
    gateway [隧道服务器 IPv6 地址]
  3. 执行 ifup he-ipv6 启用隧道

故障

  1. add tunnel sit0 failed: No buffer space available

    隧道已经存在,执行 ip tun del he-ipv6 删除已经存在的隧道。

  2. add tunnel "sit0" failed: No buffer space available

    系统 IPv6 被禁用或者未更新配置文件,检查 /etc/sysctl.conf 中有无禁用 IPv6 的命令