流程
- 编辑
/etc/sysctl.conf,修改以下条目。
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0
- 执行
sysctl -p刷新设置文件 - 写入配置信息至
/etc/network/interfacesauto he-ipv6 iface he-ipv6 inet6 v4tunnel address [客户端 IPv6 地址] netmask 64 endpoint [隧道服务器 IPv4 地址] local [本机 IPv4 地址] ttl 255 gateway [隧道服务器 IPv6 地址] - 执行
ifup he-ipv6启用隧道
故障
-
add tunnel sit0 failed: No buffer space available隧道已经存在,执行
ip tun del he-ipv6删除已经存在的隧道。 -
add tunnel "sit0" failed: No buffer space available系统 IPv6 被禁用或者未更新配置文件,检查
/etc/sysctl.conf中有无禁用 IPv6 的命令