6

fedora21使用ipv6访问google

 2 years ago
source link: https://www.hi-roy.com/posts/fedora21%E4%BD%BF%E7%94%A8ipv6%E8%AE%BF%E9%97%AEgoogle/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

fedora21使用ipv6访问google

2015-09-14

有传言ss、goagent作者被喝茶,不知真假,不过github上的项目确实被删除了,照这趋势大中华局域网指日可待啊。

项目删除并不代表不能使用,如果你有好的ss、goagent服务端fq依然是没太大问题的。不过我最近用ss自己搭建的服务端经常出现时不时就断线的情况,不知道是不是GFW又升级了?作为一个google重度用户,这实在是难以忍受,而且某些情况下又不能直接使用vpn,之前有研究过使用ipv6访问google,但那时候各种fq方法都还不会受到严重干扰,也就没深入了解。ipv6访问google并不是神码新鲜玩意,几年之前就说有朝一日ipv6将取代ipv4,不过喊了几年也没什么动静。原理和废话不多说,想使用ipv6访问google,fedora21默认已经启用了ipv6支持,ubuntu还需要设置一下,具体操作自行百度。然后需要安装miredo: sudo yum install miredo

然后 使用root权限 执行:/usr/local/sbin/miredo

执行后会发现多出一个虚拟网卡:

teredo    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00...
          inet6 addr: 2001:0:8ac3:9ddd:0:7ffa:ad80:3464/32 Scope:...
          inet6 addr: fe80::5445:5245:444f/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP  MTU:1280  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:468 (468.0 b)  TX bytes:560 (560.0 b)

如果向修改网卡名则编辑/etc/miredo/miredo.conf即可,当然懒的话就用默认的。

然后可以用命令测试是否生效:

ping6 ipv6.google.com
PING ipv6.google.com(google.com) 56 data bytes
64 bytes from google.com: icmp_seq=1 ttl=59 time=753 ms
64 bytes from google.com: icmp_seq=2 ttl=59 time=331 ms
64 bytes from google.com: icmp_seq=3 ttl=59 time=334 ms
64 bytes from google.com: icmp_seq=4 ttl=59 time=354 ms
^C
--- ipv6.google.com ping statistics ---

此时不用代理访问https://ipv6.google.com/即可打开。

如果想访问其他网站呢?这就需要hosts文件了,这里不普及hosts是什么了,给个地址https://code.google.com/p/ipv6-hosts/,这个地址貌似很久没更新了,可以去https://github.com/lennylxx/ipv6-hosts 瞧瞧。

如果想知道某个网站是否支持ipv6,我知道3个办法:

  1. http://ipv6-test.com/validate.php
  2. nslookup -q=aaaa xxxx.com
  3. dig @2001:470:20::2 xxxx.com AAAA

上面的2、3原理是一样的,如果支持的话把得到的地址写入hosts中即可。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK