找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: dosar

[原创修改]TT+openvirtual**,使用修改autoddvirtual**方案实现自动fan wall

  [复制链接]
发表于 2011-2-23 09:48 | 显示全部楼层
virtual**登录记录(最近5次)
用户名        上传                 下载                     登录时间                               退出时间        连接时间(秒)
****        771.82KB        2.59MB        2011-02-23 09:20:15        2011-02-23 09:36:01        1500

反正没设置好,只读取DNS的话 用不了这么多流量啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-2-23 10:05 | 显示全部楼层
本帖最后由 dosar 于 2011-2-23 10:29 编辑
试了这2个网址 都上不去
www.youtube.com
www.virtual**cup.com
猢狲 发表于 2011-2-23 09:46

遇到这种情况,解决起来可以稍麻烦一点。
1、先用8.8.8.8解析一下www.youtube.com的IP,你会得到类似的:
# nslookup www.youtube.com 8.8.8.8
Server:    8.8.8.8
Address 1: 8.8.8.8 google-public-dns-a.google.com

Name:      www.youtube.com
Address 1: 72.14.213.190 pv-in-f190.1e100.net
2、用这个指令强制访问这个IP走virtual**
首先要知道你的virtual**gw
# ifconfig tun11 | grep -Eo "P-t-P:([0-9.]+)" | cut -d: -f2
你会得到类似这样的地址:192.168.8.5,接下来指定路由
# ip route add 192.168.8.5 via 72.14.213.190
--不好意思,写反了。应该是
# ip route add 72.14.213.190 via 192.168.8.5
这样估计可以,不过我目前手上没有条件测试。你可以试试。
另外关注流量问题,并不是说只有dns走virtual**的,如果你没有定义直连,那么不在列表中的(即国外的)网站访问都是要走virtual**的。这个列表你可以用route查看你的实际情况。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-2-23 10:21 | 显示全部楼层
只复制的tun11部分,其他的都走ppp0,不过走ppp0的ip列表还要自己去维护啊,好麻烦。

192.168.8.1     192.168.8.5     255.255.255.255 UGH   0      0        0 tun11
192.168.8.5     *                      255.255.255.255 UH    0      0        0 tun11
default            192.168.8.5          128.0.0.0          UG    0      0        0 tun11
128.0.0.0       192.168.8.5       128.0.0.0             UG    0      0        0 tun11
default            192.168.8.5       0.0.0.0                 UG    0      0        0 tun11

不知道你上次发的设置dd-wrt的DNS走virtual**在TT上能用不?不然流量真不够用
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-2-23 10:29 | 显示全部楼层
只复制的tun11部分,其他的都走ppp0,不过走ppp0的ip列表还要自己去维护啊,好麻烦。

192.168.8.1     192.168.8.5     255.255.255.255 UGH   0      0        0 tun11
192.168.8.5     *                      ...
猢狲 发表于 2011-2-23 10:21

不需要你维护,有人维护的。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-2-23 10:38 | 显示全部楼层
你可以修改一下源码,把默认defaut路由设置为$OLDGW。这样会把过来用,反过来定义要翻墙的网站地址。
大概是virtual**up.sh中的这两三行

  1. echo "$INFO $(date "+%d/%b/%Y:%H:%M:%S") delete default gw $OLDGW"  >> $LOG
  2. route del default gw $OLDGW

  3. echo "$INFO $(date "+%d/%b/%Y:%H:%M:%S") add default gw $virtual**GW"  >> $LOG
  4. route add default gw $virtual**GW
复制代码
你加#号把它们注释掉就可以了吧,但具体情况你要先看看你的路由表。但接下来你得维护你的翻墙地址列表了。方法就不再讲了吧。你试试。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-2-23 11:32 | 显示全部楼层
22/Feb/2011:01:27:10 add default gw 192.168.8.5
22/Feb/2011:01:27:10 adding the static routes, this may take a while.
22/Feb/2011:01:27:27 preparing the exceptional routes
22/Feb/2011:01:27:27  ...
wzywzy74 发表于 2011-2-22 01:33

应该能ping能服务器的:
# ping 192.168.8.1
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-2-23 12:27 | 显示全部楼层
本帖最后由 猢狲 于 2011-2-23 12:29 编辑

看了你的反过来定义要翻墙的网站地址的改法
我也有个想法不知道行不行。做法就跟你的ddwrt翻墙哪篇帖子一样。
就是把路由的dns设置成8.8.8.8或其他的境外dns,然后把8.8.8.8加入要翻墙的列表里,不知道能不能实现autoddvirtual**只对dns翻墙
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-2-23 12:59 | 显示全部楼层
看了你的反过来定义要翻墙的网站地址的改法
我也有个想法不知道行不行。做法就跟你的ddwrt翻墙哪篇帖子一样。
就是把路由的dns设置成8.8.8.8或其他的境外dns,然后把8.8.8.8加入要翻墙的列表里,不知道能不能实现a ...
猢狲 发表于 2011-2-23 12:27

本来8.8.8.8就是走virtual**的,你看一下源代码就知道了。
验证方法:
# traceroute -n 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 38 byte packets
1  192.168.8.1  202.685 ms  202.492 ms  204.493 ms
……
你看第一个节点就是virtual**的服务器IP。
另外,有一点要说明,伟大的墙不光过滤dns解析的,还过滤你要访问的敏感地址。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-2-23 13:02 | 显示全部楼层
想访问www.youtube.com
却不走virtual**流量,目前国内不太可能的。
有个思路你考虑一下,可以注册那些只限制连接台数,不限制流量的virtual**。一年的费用大约是1-200RMB吧。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-2-23 14:16 | 显示全部楼层
恼火,感觉还没直接上代理网站容易。
就只想把dns翻墙,其他的就上代理。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-2-23 22:08 | 显示全部楼层
非常好用。谢谢。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-2-24 13:23 | 显示全部楼层
楼主漏了些内容。

wget http://autoddvirtual**.googlecode.com/svn/trunk/pptp/jffs/run.sh
到/jffs/openvirtual**

再設置rc_startup

  1. $ nvram set rc_startup='/jffs/openvirtual**/run.sh'
  2. $ nvram commit
  3. $ reboot
复制代码
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-2-24 16:00 | 显示全部楼层
楼主漏了些内容。

wget http://autoddvirtual**.googlecode.com/svn/trunk/pptp/jffs/run.sh
到/jffs/openvirtual**

再設置rc_startup
$ nvram set rc_startup='/jffs/openvirtual**/run.sh'
$ nvram commit
$ reboot

5417 发表于 2011-2-24 13:23

这个是不需要的。你看看我在1楼的截图,已经在wan口生效后自己调用autoddvirtual**脚本了。所以run.sh是不需要的。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-2-24 19:50 | 显示全部楼层
28# dosar


用tt,就是为了pppoe的按需连接功能。
这个勾的话,会不会对按需连接有影响。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-2-24 21:11 | 显示全部楼层
28# dosar


用tt,就是为了pppoe的按需连接功能。
这个勾的话,会不会对按需连接有影响。
5417 发表于 2011-2-24 19:50

你可以试验一下。我的理解是不影响。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-19 16:59

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表