bmw320li

1、修改 /etc/sysctl.conf 中的配置文件(没有就添加)

net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0

2、修改配置文件 /etc/modprobe.d/disable_ipv6.conf 

options ipv6 disable=0

3、修改配置文件 /etc/sysconfig/network

NETWORKING_IPV6=yes

4、修改配置文件 /etc/sysconfig/network-scripts/ifcfg-eth0

PV6INIT=yes
IPV6_AUTOCONF=yes

5、配置完后,重启服务器.

6、访问 https://tunnelbroker.net 注册一个账号

注意:邮箱最好是填163的。

7、登录后

 

点击 Create Regular Tunnel 创建ipv6隧道,输入ip地址,选择离服务器最近的隧道服务,点击Create Tunnel

选择Example Configurations->linux-route2 

得到

modprobe ipv6
ip tunnel add he-ipv6 mode sit remote 216.218.221.6 local (服务器ip,如果是阿里云的服务器就填写内网地址) ttl 255
ip link set he-ipv6 up
ip addr add 2003:581:48:565::2/64 dev he-ipv6
ip route add ::/0 dev he-ipv6
ip -f inet6 addr

8、把代码复制到服务器执行。

9、找到resolv.conf 配置,添加谷歌的ipv6 dns服务器设置,路径在:/etc/resolv.conf

   在配置文件中追加:

   nameserver 2001:4860:4860::8888

   nameserver 2001:4860:4860::8844

10、用ping命令测试连接谷歌服务器

     ping6 -c 5 ipv6.google.com

 

分类:

技术点:

相关文章:

  • 2021-11-01
  • 2021-08-09
  • 2021-08-18
  • 2021-08-27
  • 2022-02-20
  • 2022-01-19
  • 2022-03-08
  • 2021-10-14
猜你喜欢
  • 2021-09-04
  • 2021-07-15
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
相关资源
相似解决方案