找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 8145|回复: 19

咨询cmwap通过openvirtual**穿越的问题,望达人指点

[复制链接]
发表于 2010-8-9 09:21 | 显示全部楼层 |阅读模式
路由器 LinkSYS的wrt160N V3,刷了Tomato Pandora 0475 R2 virtual**版,在路由器上开了openvirtual** tap和tun服务各一,tun采用TCP 443端口,tap采用tcp 1194端口,其他配置默认,在使用PC测试的时候,连接均没有问题,能访问网关,但在手机上使用cmwap穿越时,tun和tap的openvirtual**都能连接成功,但无法ping通网关,无法解析DNS,无法访问网站,但client对服务器的服务开启关闭有反应,状态内有少量数据流量变化,手机为HTC Desire,Android 2.2,tap和tun的客户端配置文件如下,望各位达人能提供解决方法,
tap
-----------------------------------------
dev tap0
secret mykey.txt
proto tcp-client
remote xxxxx.3322.org 1194
keepalive 10 60
resolv-retry infinite
nobind
persist-key
persist-tun
http-proxy 10.0.0.172 80
http-proxy-timeout 100
http-proxy-retry # retry on connection failures
http-proxy-option AGENT "NokiaN95"
route-gateway 192.168.1.2
redirect-gateway def1
cipher BF-CBC
comp-lzo
verb 3
float

tun
-----------------------------------------------------
dev tun
ifconfig 192.168.10.2 192.168.10.1
secret mykey.txt
proto tcp-client
remote xxxxx.3322.org 443
keepalive 10 60
resolv-retry infinite
nobind
persist-key
persist-tun
route-gateway 192.168.10.1
redirect-gateway  def1
cipher BF-CBC
comp-lzo
verb 3
float
http-proxy 10.0.0.172 80
http-proxy-timeout 100
http-proxy-retry # retry on connection failures
http-proxy-option AGENT "NokiaN95"
script-security 2 system
dhcp-option DNS 192.168.10.1  
route-up "setprop net.dns1 192.168.10.1"
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2010-8-9 09:24 | 显示全部楼层
使用tap连接时,已在手机根据网络教程添加了路由
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-8-9 09:57 | 显示全部楼层

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-8-9 10:39 | 显示全部楼层
本帖最后由 hiyung 于 2010-8-9 10:43 编辑

3# salemsu
多谢关注,我的配置无问题,除了认证外基本和你图上相同,使用PC+3G网络登录openvirtual**无问题,访问也正常,通过cmwap可以正常连接,就是无法访问网关,也无法访问互联网
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-8-9 12:14 | 显示全部楼层
这是我的客户端脚本:
##############################################
# Sample client-side Openvirtual** 2.0 config file #
# for connecting to multi-client server.     #
#                                            #
# This configuration can be used by multiple #
# clients, however each client should have   #
# its own cert and key files.                #
#                                            #
# On Windows, you might want to rename this  #
# file so it has a .ovirtual** extension           #
##############################################

# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client

# Use the same setting as you are using on
# the server.
# On most systems, the virtual** will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
dev tap
;dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one.  On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap

# Are we connecting to a TCP or
# UDP server?  Use the same setting as
# on the server.
;proto tcp
proto tcp

# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.

remote yourIP 443
# Choose a random host from the remote
# list for load-balancing.  Otherwise
# try hosts in the order specified.
;remote-random

# Keep trying indefinitely to resolve the
# host name of the Openvirtual** server.  Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite

# Most clients don't need to bind to
# a specific local port number.
nobind

# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nobody

# Try to preserve some state across restarts.
;persist-key
;persist-tun

# If you are connecting through an
# HTTP proxy to reach the actual Openvirtual**
# server, put the proxy server/IP and
# port number here.  See the man page
# if your proxy server requires
# authentication.
http-proxy-retry # retry on connection failures
;http-proxy 192.168.36.254 8080 authfile.txt
http-proxy 10.0.0.172 80

# Wireless networks often produce a lot
# of duplicate packets.  Set this flag
# to silence duplicate packet warnings.
mute-replay-warnings

# SSL/TLS parms.
# See the server config file for more
# description.  It's best to use
# a separate .crt/.key file pair
# for each client.  A single ca
# file can be used for all clients.
ca ca.crt
cert client.crt
key client.key

# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to "server".  This is an
# important precaution to protect against
# a potential attack discussed here:
#  http://openvirtual**.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to "server".  The build-key-server
# script in the easy-rsa folder will do this.
ns-cert-type server

# If a tls-auth key is used on the server
# then every client must also have the key.
tls-auth ta.key 1

;remote-cert-tls server


# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x

# Enable compression on the virtual** link.
# Don't enable this unless it is also
# enabled in the server config file.
comp-lzo

# Set log file verbosity.
verb 3

# Silence repeating messages
;mute 20
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-8-9 12:23 | 显示全部楼层
G7 啊,我都想要
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-8-9 15:01 | 显示全部楼层
本帖最后由 hiyung 于 2010-8-9 15:03 编辑

5# salemsu

ta.key如何配置,web界面没有上传服务器的选项,静态密钥不写也可以吧
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-8-9 23:25 | 显示全部楼层
本帖最后由 hiyung 于 2010-8-9 23:27 编辑

改成了多用户,tls-auth,结果还是一样,openvirtual**连接正常,但是无法获得ip地址,无法正常访问,也许是G7 android系统的缘故吧,还是苏州移动的控制
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-8-10 09:22 | 显示全部楼层
这个配置肯定是可以用的,我在出差时经常用这个方法.
可能的话把日志发给我看一下.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-8-10 10:19 | 显示全部楼层
服务器日志
Aug 10 10:14:28 tomato-rubin2 daemon.notice openvirtual**[6143]: TCP connection established with 221.131.128.200:54845
Aug 10 10:14:28 tomato-rubin2 daemon.notice openvirtual**[6143]: Socket Buffers: R=[87380->131072] S=[16384->131072]
Aug 10 10:14:28 tomato-rubin2 daemon.notice openvirtual**[6143]: TCPv4_SERVER link local (bound): [undef]:1194
Aug 10 10:14:28 tomato-rubin2 daemon.notice openvirtual**[6143]: TCPv4_SERVER link remote: 221.131.128.200:54845
Aug 10 10:14:29 tomato-rubin2 daemon.notice openvirtual**[6143]: Peer Connection Initiated with 221.131.128.200:54845
Aug 10 10:14:30 tomato-rubin2 daemon.notice openvirtual**[6143]: Initialization Sequence Completed
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: MULTI: multi_create_instance called
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: Re-using SSL/TLS context
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: LZO compression initialized
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: Control Channel MTU parms [ L:1576 D:168 EF:68 EB:0 ET:0 EL:0 ]
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: Data Channel MTU parms [ L:1576 D:1450 EF:44 EB:135 ET:32 EL:0 AF:3/1 ]
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: TCP connection established with 221.131.128.200:54879
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: Socket Buffers: R=[131072->131072] S=[131072->131072]
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: TCPv4_SERVER link local: [undef]
Aug 10 10:14:34 tomato-rubin2 daemon.notice openvirtual**[5520]: TCPv4_SERVER link remote: 221.131.128.200:54879
Aug 10 10:14:36 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 TLS: Initial packet from 221.131.128.200:54879, sid=b98c0724 773c63e5
Aug 10 10:14:51 tomato-rubin2 daemon.info httpd[6161]: 23501673.000000 24229268.000000
Aug 10 10:14:51 tomato-rubin2 daemon.info httpd[6161]: 3.0
Aug 10 10:14:55 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 VERIFY OK: depth=1, /C=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Aug 10 10:14:55 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 VERIFY OK: depth=0, /C=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Aug 10 10:14:57 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Aug 10 10:14:57 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Aug 10 10:14:57 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Aug 10 10:14:57 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Aug 10 10:14:58 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 Control Channel: TLSv1, cipher TLSv1/SSLv3 EDH-RSA-DES-CBC3-SHA, 1024 bit RSA
Aug 10 10:14:58 tomato-rubin2 daemon.notice openvirtual**[5520]: 221.131.128.200:54879 [XXXXX] Peer Connection Initiated with 221.131.128.200:54879
Aug 10 10:14:58 tomato-rubin2 daemon.err openvirtual**[5520]: XXXXX/221.131.128.200:54879 MULTI: no dynamic or static remote --ifconfig address is available for XXXXX/221.131.128.200:54879
Aug 10 10:15:01 tomato-rubin2 daemon.notice openvirtual**[5520]: XXXXX/221.131.128.200:54879 PUSH: Received control message: 'PUSH_REQUEST'
Aug 10 10:15:01 tomato-rubin2 daemon.notice openvirtual**[5520]: XXXXX/221.131.128.200:54879 SENT CONTROL [XXXXX]: 'PUSH_REPLY,redirect-gateway,route-gateway dhcp,ping 10,ping-restart 120' (status=1)
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-8-10 10:29 | 显示全部楼层
我使用的PC网络直连没有问题,服务器日志区别在这几句

Aug 10 10:11:22 tomato-rubin2 daemon.notice openvirtual**[5520]: XXXX/218.94.XXXXX:31346 SENT CONTROL [Hiyung]: 'PUSH_REPLY,redirect-gateway,route-gateway dhcp,ping 10,ping-restart 120' (status=1)
Aug 10 10:11:25 tomato-rubin2 daemon.notice openvirtual**[5520]: XXXX/218.94.XXXXX:31346 MULTI: Learn: 00:ff:dd:6f:58:b6 -> XXXXXXXX
Aug 10 10:11:26 tomato-rubin2 daemon.info dnsmasq-dhcp[5957]: DHCPREQUEST(br0) 192.168.1.138 00:ff:dd:6f:58:b6
Aug 10 10:11:26 tomato-rubin2 daemon.info dnsmasq-dhcp[5957]: DHCPACK(br0) 192.168.1.138 00:ff:dd:6f:58:b6 XXXXX

这儿明显获得了IP地址的分配
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-8-10 22:02 | 显示全部楼层
看不出问题,有客户端的日志吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-8-10 23:30 | 显示全部楼层
客户端日志比较过了,tap的路由添加的确有问题,和网上所说的相同,但是手动添加后也无法访问,tun连接的日志一切正常,但是也是无法访问,已经放弃了,还是使用cmwrap吧.....,目前怀疑为android 2.2系统和busybox 的配合问题
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-8-22 05:35 | 显示全部楼层
LZ
TAP改成443端口
然后 先不要重新设置网关
route-gateway 192.168.1.2
redirect-gateway def1
去掉

看看能不能连接和PING通自己路由
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-9-4 12:19 | 显示全部楼层
比较关注这个
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-26 07:41

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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