不用安装软件,也来体验ipv6
- mea
- 帖子: 110
- 注册时间: 2008-11-27 18:31
Re: 不用安装软件,也来体验ipv6
快不快的倒没啥,校园网用IPV6浏览某些网站是不用翻墙的。
-
- 帖子: 225
- 注册时间: 2008-04-08 13:24
Re: 不用安装软件,也来体验ipv6
好文,参考一下
-
- 帖子: 100
- 注册时间: 2008-11-09 13:43
Re: 不用安装软件,也来体验ipv6
为了用ipv6翻墙,搞了好久,现在成功一半。经验如下:要先开通隧道,国内大学的也好,国外免费注册的也好,这样乌龟就动起来了。但是,要翻墙看youtube,还要找有用的host地址,设对了才能用,速度很快。其他像blogspot的,我这边还没弄好……找不到可用的host地址
感觉同样是上海交大的隧道,在xp和ubuntu下面不太一样,在ubuntu下面,我这边google docs都封了……
可惜GApp代理的证书不行,不然也蛮好的,就是设置步骤比较多
感觉同样是上海交大的隧道,在xp和ubuntu下面不太一样,在ubuntu下面,我这边google docs都封了……
可惜GApp代理的证书不行,不然也蛮好的,就是设置步骤比较多
-
- 帖子: 17
- 注册时间: 2009-10-29 21:04
Re: 不用安装软件,也来体验ipv6
用teredo隧道接入要方便的多
sudo apt-get install miredo
miredo可以自动配置teredo隧道,基本上是傻瓜式的。
sudo apt-get install miredo
miredo可以自动配置teredo隧道,基本上是傻瓜式的。
-
- 帖子: 26
- 注册时间: 2005-06-13 11:55
- 来自: 路上
- 联系:
Re:
借用此脚本修改了一下,PPPOE拨号成功连接上交的isatap隧道,其中rdisc6包需要apt一下:peachcolor 写了:分享我的python脚本吧,跟楼主说的功能一模一样,保存成ipv6.py之后运行sudo python ipv6.py就行了代码: 全选
import socket import fcntl import struct import os def get_ip_address(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl(s.fileno(),0x8915,struct.pack('256s', ifname[:15]))[20:24]) interface = 'eth0' ip = get_ip_address('eth0') print 'DBG >>> current inet ip on %s : %s'%(interface,ip) interface = 'sit1' cmd = 'modprobe ipv6' print 'RUN >>>',cmd os.system(cmd) cmd = 'ip tunnel add %s mode sit remote 59.66.4.50 local %s'%(interface,ip) print 'RUN >>>',cmd os.system(cmd) cmd = 'ifconfig %s up'%(interface) print 'RUN >>>',cmd os.system(cmd) cmd = 'ifconfig %s add 2001:da8:200:900e:0:5efe:%s/64'%(interface,ip) print 'RUN >>>',cmd os.system(cmd) cmd = 'ip route add ::/0 via 2001:da8:200:900e::1 metric 1' print 'RUN >>>',cmd os.system(cmd)
代码: 全选
import socket
import fcntl
import struct
import os
def get_ip_address(ifname):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(s.fileno(),0x8915,struct.pack('256s', ifname[:15]))[20:24])
interface = 'ppp0'
ip = get_ip_address('ppp0')
print 'DBG >>> current inet ip on %s : %s'%(interface,ip)
interface = 'is_sjtu'
remoteip='202.112.26.246'
# cmd = 'modprobe ipv6'
# print 'RUN >>>',cmd
# os.system(cmd)
cmd = 'ip tunnel add %s mode isatap remote %s local %s'%(interface,remoteip,ip)
print 'RUN >>>',cmd
os.system(cmd)
cmd = 'ifconfig %s up'%(interface)
print 'RUN >>>',cmd
os.system(cmd)
cmd = 'ip tunnel prl prl-default %s dev %s'%(remoteip,interface)
print 'RUN >>>',cmd
os.system(cmd)
cmd = 'ip -6 route add default via fe80::5efe:%s dev %s'%(remoteip,interface)
print 'RUN >>>',cmd
os.system(cmd)
cmd = 'rdisc6 %s'%(interface)
print 'RUN >>>',cmd
os.system(cmd)
