5/14/2010

IPv6 Over The Wall

本文将介绍如何在Windows XP,Windows 7/Vista 及Ubuntu下使用IPv6到达自由空间。网上一些介绍利用IPv6翻墙的文章,大多数都是采用了不合适或者是错误的技术,本文试图做一个补充,文中介绍的技术相对更简单有效,大家尝试后再给予评论吧。

NOTE: 如需引用文中IP地址,请尽量使用贴图!

1. Windows XP

由于在XP下,IPv6默认是被禁用的,因此需要手动安装。


1.1 打开命令行窗口,输入如下指令进入netsh命令交互模式:
netsh -c interface

1.2 安装IPv6协议
在 netsh interface> 命令提示模式下依次输入以下指令:
ipv6
install
commit

完成后应如下图所示:

1.3 配置IPv6 Teredo
按下图所示,输入IPv6 Teredo设置指令:

完成后输入:
commit
exit
提交更改并退出netsh

1.4Hosts文件中添加支持IPv6网站的地址映射表
请将本文末Hosts File的内容粘贴追加至"%systemroot%\system32\drivers\etc\hosts"文件尾,然后保存之。

2. Windows 7/Vista
在7/Vista下,IPv6是默认允许的,因此无需安装IPv6和配置IPv6 Teredo,只需要执行1.4 在Hosts文件中添加支持IPv6网站的地址映射表

3. Ubuntu
测试环境使用的Ubuntu是最新的10.04桌面版。

3.1 安装miredo
请在Terminal中,执行如下指令:
sudo apt-get install miredo

3.2 修改防火墙IPv6设置
root权限打开ufw的配置文件: "/etc/default/ufw",找到"IPV6=no"这一行,将其改为"IPV6=yes"。

3.3 修改Hosts文件
请将本文末Hosts File的内容粘贴追加 至"/etc/hosts"文件尾,然后保存之。

3.4 重启网络
sudo invoke-rc.d networking restart

4. 测试及故障排除

4.1 使用Ping命令测试

在Windows下使用ping -6 ipv6.google.com


在Ubuntu下使用需要使用ping6指令,可以在Terminal中输入:
ping6  -c 3 twitter.com

4.2 出现完全ping不通的情况
首先,请检查防火墙是否允许IPv6 Teredo,在Windows下,默认是允许IPv6 Teredo 的,而在Ubuntu 10.04下,防火墙是默认禁用IPv6 Teredo的,因此会出现执行ping6指令错误的情况()。

其次,请按以下相应图示调整Teredo服务器地址

在Windows下,请按下图所示操作:


在Ubuntu下,请执行以root权限打开miredo的配置"/etc/miredo/miredo.conf",调整"ServerAddress"为合适的Teredo服务器地址:


4.3 Hosts文件
本文末的 Hosts File 只是本人使用的一个精简版本(来源于这里),目前支持DropboxTwitter, Google Docs/Reader/Photos/YouTube ; 如有需要请自行调整。

4.4 访问Twitter的Firefox截图


Hosts File (如果在你的Hosts文件中没有"::1 localhost"这一行,请添加之):

## ipv4 hosts:
174.36.30.71        www.dropbox.com

## ipv6 hosts:
# testing ipv6 hosts
2404:6800:8001::68 ipv6.google.com

## ipv6.arpa domain: 2001:4860:8006::*

# google url shortener
2001:4860:8006::62 goo.gl

# twitter
2607:fcd0:1337:4b::6 twitter.com
2607:fcd0:1337:4b::2 search.twitter.com
2607:fcd0:1337:4b::2 api.twitter.com
2607:fcd0:1337:4b::2 www.twitter.com
2607:fcd0:1337:4b::2 m.twitter.com

# google docs hosts
2001:4860:8006::64 docs.google.com
2001:4860:8006::64 writely.l.google.com
2001:4860:8006::62 spreadsheet.google.com
2001:4860:8006::62 spreadsheets.google.com
2001:4860:8006::62 spreadsheets.l.google.com
2001:4860:8006::62 writely.google.com
2001:4860:8006::62 writely.l.google.com
2001:4860:8006::62 writely-com.l.google.com
2001:4860:8006::62 writely-china.l.google.com

# google reader
2001:4860:8006::62 reader.google.com

# google blogspot
2001:4860:8006::62 www.blogspot.com
2001:4860:8006::62 www.blogger.com
2001:4860:8006::62 blogsofnote.blogspot.com
2001:4860:8006::62 knownissues.blogspot.com
2001:4860:8006::62 1.bp.blogspot.com
2001:4860:8006::62 2.bp.blogspot.com
2001:4860:8006::62 3.bp.blogspot.com
2001:4860:8006::62 4.bp.blogspot.com
2001:4860:8006::62 googleblog.blogspot.com
2001:4860:8006::62 googleappengine.blogspot.com
2001:4860:8006::62 cholyjoe.blogspot.com

# google earth
2001:4860:8006::62 earth.google.com

# google youtube
#YouTube
2001:4860:8006::64 www.youtube.com
2001:4860:8006::64 youtube-ui.l.google.com
2001:4860:8006::64 youtube-ui-china.l.google.com
2001:4860:8006::64 m.youtube.com
2001:4860:8006::64 tw.youtube.com
2001:4860:8006::64 youtu.be
2001:4860:8006::64 gdata.youtube.com
2001:4860:8006::64 help.youtube.com
2001:4860:8006::64 upload.youtube.com
2001:4860:8006::64 insight.youtube.com
2001:4860:8006::64 img.youtube.com
2001:4860:8006::64 s2.youtube.com
2001:4860:8006::64 youtube.com
2001:4860:8006::64 apiblog.youtube.com
2001:4860:8006::64 clients1.youtube.com
2001:4860:8006::64 static.cache.l.google.com
2001:4860:8006::76 ytimg.l.google.com
2001:4860:8006::76 i.ytimg.com
2001:4860:8006::76 i1.ytimg.com
2001:4860:8006::76 i2.ytimg.com
2001:4860:8006::76 i3.ytimg.com
2001:4860:8006::76 i4.ytimg.com
2001:4860:8006::76 d.yimg.com
2001:4860:8006::76 s.ytimg.com
2001:4860:4001:402::10 v1.lscache1.c.youtube.com
2001:4860:4001:402::10 v1.lscache2.c.youtube.com
2001:4860:4001:402::10 v1.lscache3.c.youtube.com
2001:4860:4001:402::10 v1.lscache4.c.youtube.com
2001:4860:4001:402::10 v1.lscache5.c.youtube.com
2001:4860:4001:402::10 v1.lscache6.c.youtube.com
2001:4860:4001:402::10 v1.lscache7.c.youtube.com
2001:4860:4001:402::10 v1.lscache8.c.youtube.com
2001:4860:4001:402::11 v2.lscache1.c.youtube.com
2001:4860:4001:402::11 v2.lscache2.c.youtube.com
2001:4860:4001:402::11 v2.lscache3.c.youtube.com
2001:4860:4001:402::11 v2.lscache4.c.youtube.com
2001:4860:4001:402::11 v2.lscache5.c.youtube.com
2001:4860:4001:402::11 v2.lscache6.c.youtube.com
2001:4860:4001:402::11 v2.lscache7.c.youtube.com
2001:4860:4001:402::11 v2.lscache8.c.youtube.com
2001:4860:4001:402::12 v3.lscache1.c.youtube.com
2001:4860:4001:402::12 v3.lscache2.c.youtube.com
2001:4860:4001:402::12 v3.lscache3.c.youtube.com
2001:4860:4001:402::12 v3.lscache4.c.youtube.com
2001:4860:4001:402::12 v3.lscache5.c.youtube.com
2001:4860:4001:402::12 v3.lscache6.c.youtube.com
2001:4860:4001:402::12 v3.lscache7.c.youtube.com
2001:4860:4001:402::12 v3.lscache8.c.youtube.com
2001:4860:4001:402::13 v4.lscache1.c.youtube.com
2001:4860:4001:402::13 v4.lscache2.c.youtube.com
2001:4860:4001:402::13 v4.lscache3.c.youtube.com
2001:4860:4001:402::13 v4.lscache4.c.youtube.com
2001:4860:4001:402::13 v4.lscache5.c.youtube.com
2001:4860:4001:402::13 v4.lscache6.c.youtube.com
2001:4860:4001:402::13 v4.lscache7.c.youtube.com
2001:4860:4001:402::13 v4.lscache8.c.youtube.com
2001:4860:4001:402::14 v5.lscache1.c.youtube.com
2001:4860:4001:402::14 v5.lscache2.c.youtube.com
2001:4860:4001:402::14 v5.lscache3.c.youtube.com
2001:4860:4001:402::14 v5.lscache4.c.youtube.com
2001:4860:4001:402::14 v5.lscache5.c.youtube.com
2001:4860:4001:402::14 v5.lscache6.c.youtube.com
2001:4860:4001:402::14 v5.lscache7.c.youtube.com
2001:4860:4001:402::14 v5.lscache8.c.youtube.com
2001:4860:4001:402::15 v6.lscache1.c.youtube.com
2001:4860:4001:402::15 v6.lscache2.c.youtube.com
2001:4860:4001:402::15 v6.lscache3.c.youtube.com
2001:4860:4001:402::15 v6.lscache4.c.youtube.com
2001:4860:4001:402::15 v6.lscache5.c.youtube.com
2001:4860:4001:402::15 v6.lscache6.c.youtube.com
2001:4860:4001:402::15 v6.lscache7.c.youtube.com
2001:4860:4001:402::15 v6.lscache8.c.youtube.com
2001:4860:4001:402::16 v7.lscache1.c.youtube.com
2001:4860:4001:402::16 v7.lscache2.c.youtube.com
2001:4860:4001:402::16 v7.lscache3.c.youtube.com
2001:4860:4001:402::16 v7.lscache4.c.youtube.com
2001:4860:4001:402::16 v7.lscache5.c.youtube.com
2001:4860:4001:402::16 v7.lscache6.c.youtube.com
2001:4860:4001:402::16 v7.lscache7.c.youtube.com
2001:4860:4001:402::16 v7.lscache8.c.youtube.com
2001:4860:4001:402::17 v8.lscache1.c.youtube.com
2001:4860:4001:402::17 v8.lscache2.c.youtube.com
2001:4860:4001:402::17 v8.lscache3.c.youtube.com
2001:4860:4001:402::17 v8.lscache4.c.youtube.com
2001:4860:4001:402::17 v8.lscache5.c.youtube.com
2001:4860:4001:402::17 v8.lscache6.c.youtube.com
2001:4860:4001:402::17 v8.lscache7.c.youtube.com
2001:4860:4001:402::17 v8.lscache8.c.youtube.com
2001:4860:4001:402::18 v9.lscache1.c.youtube.com
2001:4860:4001:402::18 v9.lscache2.c.youtube.com
2001:4860:4001:402::18 v9.lscache3.c.youtube.com
2001:4860:4001:402::18 v9.lscache4.c.youtube.com
2001:4860:4001:402::18 v9.lscache5.c.youtube.com
2001:4860:4001:402::18 v9.lscache6.c.youtube.com
2001:4860:4001:402::18 v9.lscache7.c.youtube.com
2001:4860:4001:402::18 v9.lscache8.c.youtube.com
2001:4860:4001:402::19 v10.lscache1.c.youtube.com
2001:4860:4001:402::19 v10.lscache2.c.youtube.com
2001:4860:4001:402::19 v10.lscache3.c.youtube.com
2001:4860:4001:402::19 v10.lscache4.c.youtube.com
2001:4860:4001:402::19 v10.lscache5.c.youtube.com
2001:4860:4001:402::19 v10.lscache6.c.youtube.com
2001:4860:4001:402::19 v10.lscache7.c.youtube.com
2001:4860:4001:402::19 v10.lscache8.c.youtube.com
2001:4860:4001:402::1a v11.lscache1.c.youtube.com
2001:4860:4001:402::1a v11.lscache2.c.youtube.com
2001:4860:4001:402::1a v11.lscache3.c.youtube.com
2001:4860:4001:402::1a v11.lscache4.c.youtube.com
2001:4860:4001:402::1a v11.lscache5.c.youtube.com
2001:4860:4001:402::1a v11.lscache6.c.youtube.com
2001:4860:4001:402::1a v11.lscache7.c.youtube.com
2001:4860:4001:402::1a v11.lscache8.c.youtube.com
2001:4860:4001:402::1b v12.lscache1.c.youtube.com
2001:4860:4001:402::1b v12.lscache2.c.youtube.com
2001:4860:4001:402::1b v12.lscache3.c.youtube.com
2001:4860:4001:402::1b v12.lscache4.c.youtube.com
2001:4860:4001:402::1b v12.lscache5.c.youtube.com
2001:4860:4001:402::1b v12.lscache6.c.youtube.com
2001:4860:4001:402::1b v12.lscache7.c.youtube.com
2001:4860:4001:402::1b v12.lscache8.c.youtube.com
2001:4860:4001:402::1c v13.lscache1.c.youtube.com
2001:4860:4001:402::1c v13.lscache2.c.youtube.com
2001:4860:4001:402::1c v13.lscache3.c.youtube.com
2001:4860:4001:402::1c v13.lscache4.c.youtube.com
2001:4860:4001:402::1c v13.lscache5.c.youtube.com
2001:4860:4001:402::1c v13.lscache6.c.youtube.com
2001:4860:4001:402::1c v13.lscache7.c.youtube.com
2001:4860:4001:402::1c v13.lscache8.c.youtube.com
2001:4860:4001:402::1d v14.lscache1.c.youtube.com
2001:4860:4001:402::1d v14.lscache2.c.youtube.com
2001:4860:4001:402::1d v14.lscache3.c.youtube.com
2001:4860:4001:402::1d v14.lscache4.c.youtube.com
2001:4860:4001:402::1d v14.lscache5.c.youtube.com
2001:4860:4001:402::1d v14.lscache6.c.youtube.com
2001:4860:4001:402::1d v14.lscache7.c.youtube.com
2001:4860:4001:402::1d v14.lscache8.c.youtube.com
2001:4860:4001:402::1e v15.lscache1.c.youtube.com
2001:4860:4001:402::1e v15.lscache2.c.youtube.com
2001:4860:4001:402::1e v15.lscache3.c.youtube.com
2001:4860:4001:402::1e v15.lscache4.c.youtube.com
2001:4860:4001:402::1e v15.lscache5.c.youtube.com
2001:4860:4001:402::1e v15.lscache6.c.youtube.com
2001:4860:4001:402::1e v15.lscache7.c.youtube.com
2001:4860:4001:402::1e v15.lscache8.c.youtube.com
2001:4860:4001:402::20 v16.lscache1.c.youtube.com
2001:4860:4001:402::20 v16.lscache2.c.youtube.com
2001:4860:4001:402::20 v16.lscache3.c.youtube.com
2001:4860:4001:402::20 v16.lscache4.c.youtube.com
2001:4860:4001:402::20 v16.lscache5.c.youtube.com
2001:4860:4001:402::20 v16.lscache6.c.youtube.com
2001:4860:4001:402::20 v16.lscache7.c.youtube.com
2001:4860:4001:402::20 v16.lscache8.c.youtube.com
2001:4860:4001:402::21 v17.lscache1.c.youtube.com
2001:4860:4001:402::21 v17.lscache2.c.youtube.com
2001:4860:4001:402::21 v17.lscache3.c.youtube.com
2001:4860:4001:402::21 v17.lscache4.c.youtube.com
2001:4860:4001:402::21 v17.lscache5.c.youtube.com
2001:4860:4001:402::21 v17.lscache6.c.youtube.com
2001:4860:4001:402::21 v17.lscache7.c.youtube.com
2001:4860:4001:402::21 v17.lscache8.c.youtube.com
2001:4860:4001:402::22 v18.lscache1.c.youtube.com
2001:4860:4001:402::22 v18.lscache2.c.youtube.com
2001:4860:4001:402::22 v18.lscache3.c.youtube.com
2001:4860:4001:402::22 v18.lscache4.c.youtube.com
2001:4860:4001:402::22 v18.lscache5.c.youtube.com
2001:4860:4001:402::22 v18.lscache6.c.youtube.com
2001:4860:4001:402::22 v18.lscache7.c.youtube.com
2001:4860:4001:402::22 v18.lscache8.c.youtube.com
2001:4860:4001:402::23 v19.lscache1.c.youtube.com
2001:4860:4001:402::23 v19.lscache2.c.youtube.com
2001:4860:4001:402::23 v19.lscache3.c.youtube.com
2001:4860:4001:402::23 v19.lscache4.c.youtube.com
2001:4860:4001:402::23 v19.lscache5.c.youtube.com
2001:4860:4001:402::23 v19.lscache6.c.youtube.com
2001:4860:4001:402::23 v19.lscache7.c.youtube.com
2001:4860:4001:402::23 v19.lscache8.c.youtube.com
2001:4860:4001:402::23 v20.lscache1.c.youtube.com
2001:4860:4001:402::23 v20.lscache2.c.youtube.com
2001:4860:4001:402::23 v20.lscache3.c.youtube.com
2001:4860:4001:402::23 v20.lscache4.c.youtube.com
2001:4860:4001:402::23 v20.lscache5.c.youtube.com
2001:4860:4001:402::23 v20.lscache6.c.youtube.com
2001:4860:4001:402::23 v20.lscache7.c.youtube.com
2001:4860:4001:402::23 v20.lscache8.c.youtube.com
2001:4860:4001:402::24 v21.lscache1.c.youtube.com
2001:4860:4001:402::24 v21.lscache2.c.youtube.com
2001:4860:4001:402::24 v21.lscache3.c.youtube.com
2001:4860:4001:402::24 v21.lscache4.c.youtube.com
2001:4860:4001:402::24 v21.lscache5.c.youtube.com
2001:4860:4001:402::24 v21.lscache6.c.youtube.com
2001:4860:4001:402::24 v21.lscache7.c.youtube.com
2001:4860:4001:402::24 v21.lscache8.c.youtube.com
2001:4860:4001:402::35 v22.lscache1.c.youtube.com
2001:4860:4001:402::25 v22.lscache2.c.youtube.com
2001:4860:4001:402::25 v22.lscache3.c.youtube.com
2001:4860:4001:402::25 v22.lscache4.c.youtube.com
2001:4860:4001:402::25 v22.lscache5.c.youtube.com
2001:4860:4001:402::25 v22.lscache6.c.youtube.com
2001:4860:4001:402::25 v22.lscache7.c.youtube.com
2001:4860:4001:402::25 v22.lscache8.c.youtube.com
2001:4860:4001:402::26 v23.lscache1.c.youtube.com
2001:4860:4001:402::26 v23.lscache2.c.youtube.com
2001:4860:4001:402::26 v23.lscache3.c.youtube.com
2001:4860:4001:402::26 v23.lscache4.c.youtube.com
2001:4860:4001:402::26 v23.lscache5.c.youtube.com
2001:4860:4001:402::26 v23.lscache6.c.youtube.com
2001:4860:4001:402::26 v23.lscache7.c.youtube.com
2001:4860:4001:402::26 v23.lscache8.c.youtube.com
2001:4860:4001:402::27 v24.lscache1.c.youtube.com
2001:4860:4001:402::27 v24.lscache2.c.youtube.com
2001:4860:4001:402::27 v24.lscache3.c.youtube.com
2001:4860:4001:402::27 v24.lscache4.c.youtube.com
2001:4860:4001:402::27 v24.lscache5.c.youtube.com
2001:4860:4001:402::27 v24.lscache6.c.youtube.com
2001:4860:4001:402::27 v24.lscache7.c.youtube.com
2001:4860:4001:402::27 v24.lscache8.c.youtube.com

15 comments:

sun said...

请教一下,是否受局域网的限制?
如果局域网不支持IPV6,就没办法使用吧?

Holy Joe said...

不受局域网限制,试试吧,速度不错的。

BOBLOG said...

试了一下,一步步照着做的,结果失败了,不知道原因什么,以前在hosts里添加过dropbox的ip也是行不通,不知道会不会是网络的问题

Geminisnow said...

hey thanks for the introduction.
但是我遇到了一个问题:设置后我能看youtube了,但是twitter和picasa依然无法访问,我试着ping了下twitter,返回的结果都是正确的,期待解惑,3x!

Holy Joe said...

Hi, Geminisnow,
在hosts文件中添加如下Picasa地址映射:

# google picasa
2001:4860:8006::62 photos.google.com
2001:4860:8006::62 picasa.google.com
2001:4860:8006::62 picasaweb.google.com
2001:4860:8006::62 lh0.ggpht.com
2001:4860:8006::62 lh1.ggpht.com
2001:4860:8006::62 lh2.ggpht.com
2001:4860:8006::62 lh3.ggpht.com
2001:4860:8006::62 lh4.ggpht.com
2001:4860:8006::62 lh5.ggpht.com
2001:4860:8006::62 lh6.ggpht.com
2001:4860:8006::62 lh7.ggpht.com
2001:4860:8006::62 lh8.ggpht.com
2001:4860:8006::62 lh9.ggpht.com

Holy Joe said...

Hi, bob,
你用的什么操作系统?能否把你的hosts文件和网络配置贴上来?

Holy Joe said...

Hi, Geminisnow,
你用的是什么Twitter客户端?

Unknown said...

你好 我的twitter也打不开 youtube dropbox可以打开
完全按照你图片里设置打
XP

Holy Joe said...

Hi, 金鑫,
目前Twitter网站是不能访问了,但是可以ping通,通过Twitter客户端还是能上的。

Geminisnow said...

多谢 Holy Joe
原来我忘了添加Picasa的ip地址了XD
twitter我平时都是直接登录网页的,看来要考虑客户端了,能推荐几款么?
btw, ipv6确实很不错,一时半会不怕失效而且校园网的速度也很快:)

Holy Joe said...

Hi,Geminisnow,
在Windows下我一般用blu,下载地址在这http://is.gd/cezEu;在Ubuntu下喜欢用内置的Gwibber.

DIAOBAO said...

2607:fcd0:1337:4b::2 是bbc的IP,不是twitter的ip,你搞错了。另外2607:fcd0:1337:4b::6IP以经无效了,不过从网段上看,也是BBC的,而不是twitter的

Holy Joe said...

Hi,DIAOBAO,
2607:fcd0:1337:4b::6/2地址并不是什么BBC的,具体是什么我就不多说了,用工具可以查到的。另外,需要注意的是Twitter可以继续使用。

Holy Joe said...

目前http://twitter.com站点无法访问,但是使用https://twitter.com/login还是能够访问的;另外,通过Twitter客户端工具也是可以的,请注意!

Geminisnow said...

omg,不知道为什么https可以登录twitter,blu居然连接服务器失败……