全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 6189|回复: 7
打印 上一主题 下一主题

[疑问] 安装openvpn出现错误请高人指点

[复制链接]
跳转到指定楼层
1#
发表于 2010-4-28 12:07:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
看了http://www.sunk.eu.org/viewthread.php?tid=8354&highlight=openVPN%2B%E5%AE%89%E8%A3%85
的教程。千辛万苦装好后还是出现问题。在百度、Google都没有找到相应的解决办法。特发贴求助。
qiqi13245修改的教程还有有几点要加注的地方:
今天特把这些地方标明方便以后有需要的朋友安装

使用命令:locate easy-rsa 这个命令时会出现错误locate: can not open `/var/lib/mlocate/mlocate.db': 没有找到指定数据库文件
使用 #updatedb,即可以解决问题。
使用命令:./build-ca server  前需要执行./clean-all
使用命令:sysctl -p 会出现错误:net.ipv4.ip_forward = 1error: "Operation not permitted" setting key "net.ipv4.tcp_syncookies"
前需要删除net.ipv4.tcp_syncookies这行内容
新建配置文件应该直接输入vi /etc/openvpn/server.conf


下面是OpenVPN连接时出现connecting to client 1 has failed错误。问题出在那里就不知道了
大家给看看


Wed Apr 28 11:53:30 2010 OpenVPN 2.1.1 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Dec 11 2009
Wed Apr 28 11:53:30 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Apr 28 11:53:31 2010 LZO compression initialized
Wed Apr 28 11:53:31 2010 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Wed Apr 28 11:53:31 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Apr 28 11:53:31 2010 Local Options hash (VER=V4): '69109d17'
Wed Apr 28 11:53:31 2010 Expected Remote Options hash (VER=V4): 'c0103fa8'
Wed Apr 28 11:53:31 2010 Attempting to establish TCP connection with 66.197.238.2:443
Wed Apr 28 11:53:31 2010 TCP connection established with 66.197.238.2:443
Wed Apr 28 11:53:31 2010 Socket Buffers: R=[8192->8192] S=[8192->8192]
Wed Apr 28 11:53:31 2010 TCPv4_CLIENT link local: [undef]
Wed Apr 28 11:53:31 2010 TCPv4_CLIENT link remote: 66.197.238.2:443
Wed Apr 28 11:53:31 2010 TLS: Initial packet from 66.197.238.2:443, sid=d4e3b4f1 f22084e3
Wed Apr 28 11:53:34 2010 VERIFY OK: depth=1, /C=CN/ST=BJ/L=BJ/O=valwoo.org/CN=server/[email protected]
Wed Apr 28 11:53:34 2010 VERIFY OK: nsCertType=SERVER
Wed Apr 28 11:53:34 2010 VERIFY OK: depth=0, /C=CN/ST=BJ/L=BJ/O=valwoo.org/CN=server/[email protected]
Wed Apr 28 11:53:41 2010 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Apr 28 11:53:41 2010 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Apr 28 11:53:41 2010 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Apr 28 11:53:41 2010 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Apr 28 11:53:41 2010 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Wed Apr 28 11:53:41 2010 [server] Peer Connection Initiated with 66.197.238.2:443
Wed Apr 28 11:53:43 2010 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Wed Apr 28 11:53:44 2010 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Wed Apr 28 11:53:44 2010 OPTIONS IMPORT: timers and/or timeouts modified
Wed Apr 28 11:53:44 2010 OPTIONS IMPORT: --ifconfig/up options modified
Wed Apr 28 11:53:44 2010 OPTIONS IMPORT: route options modified
Wed Apr 28 11:53:44 2010 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Apr 28 11:53:44 2010 ROUTE default_gateway=192.168.1.1
Wed Apr 28 11:53:44 2010 CreateFile failed on TAP device: \\.\Global\{7BCBDA4D-AE26-4706-8D1A-7AB792813FC8}.tap
Wed Apr 28 11:53:44 2010 All TAP-Win32 adapters on this system are currently in use.
Wed Apr 28 11:53:44 2010 Exiting

[ 本帖最后由 有点紧张 于 2010-4-28 12:09 编辑 ]
2#
 楼主| 发表于 2010-4-28 14:04:04 | 只看该作者
怎么没人指点呢
3#
 楼主| 发表于 2010-4-28 14:37:49 | 只看该作者
输入openvpn --config /etc/openvpn/server.conf &启动。
出现以下问题
[root@burst ~]# openvpn --config /etc/openvpn/server.conf &
[1] 5795
[root@burst ~]# Wed Apr 28 10:16:23 2010 OpenVPN 2.1.1 i386-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan 26 2010
Wed Apr 28 10:16:23 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Apr 28 10:16:23 2010 Diffie-Hellman initialized with 1024 bit key
Wed Apr 28 10:16:23 2010 TLS-Auth MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Wed Apr 28 10:16:23 2010 ROUTE default_gateway=192.0.2.1
Wed Apr 28 10:16:23 2010 TUN/TAP device tun1 opened
Wed Apr 28 10:16:23 2010 TUN/TAP TX queue length set to 100
Wed Apr 28 10:16:23 2010 /sbin/ip link set dev tun1 up mtu 1500
Wed Apr 28 10:16:23 2010 /sbin/ip addr add dev tun1 local 10.8.0.1 peer 10.8.0.2
Wed Apr 28 10:16:23 2010 /sbin/ip route add 10.8.0.0/24 via 10.8.0.2
RTNETLINK answers: File exists
Wed Apr 28 10:16:23 2010 ERROR: Linux route add command failed: external program exited with error status: 2
Wed Apr 28 10:16:23 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Apr 28 10:16:23 2010 Listening for incoming TCP connection on 66.197.238.2:1194
Wed Apr 28 10:16:23 2010 Socket Buffers: R=[87380->131072] S=[16384->131072]
Wed Apr 28 10:16:23 2010 TCPv4_SERVER link local (bound): 66.197.238.2:1194
Wed Apr 28 10:16:23 2010 TCPv4_SERVER link remote: [undef]
Wed Apr 28 10:16:23 2010 MULTI: multi_init called, r=256 v=256
Wed Apr 28 10:16:23 2010 IFCONFIG POOL: base=10.8.0.4 size=62
Wed Apr 28 10:16:23 2010 MULTI: TCP INIT maxclients=1024 maxevents=1028
Wed Apr 28 10:16:23 2010 Initialization Sequence Completed
4#
发表于 2010-4-28 14:53:49 | 只看该作者
All TAP-Win32 adapters on this system are currently in use.
你本地的问题,重启下计算机,不行就重装本地openvpn客户端
5#
 楼主| 发表于 2010-4-28 15:26:39 | 只看该作者
重装时openvpn出现这样的错误:An error occurred installing the TAP device driver
链接时还是出现connecting to client 1 has failed问题

Wed Apr 28 15:25:08 2010 OpenVPN 2.1.1 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Dec 11 2009
Wed Apr 28 15:25:08 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Apr 28 15:25:09 2010 LZO compression initialized
Wed Apr 28 15:25:09 2010 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Wed Apr 28 15:25:09 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Apr 28 15:25:09 2010 Local Options hash (VER=V4): '69109d17'
Wed Apr 28 15:25:09 2010 Expected Remote Options hash (VER=V4): 'c0103fa8'
Wed Apr 28 15:25:09 2010 Attempting to establish TCP connection with 66.197.238.2:443
Wed Apr 28 15:25:09 2010 TCP connection established with 66.197.238.2:443
Wed Apr 28 15:25:09 2010 Socket Buffers: R=[8192->8192] S=[8192->8192]
Wed Apr 28 15:25:09 2010 TCPv4_CLIENT link local: [undef]
Wed Apr 28 15:25:09 2010 TCPv4_CLIENT link remote: 66.197.238.2:443
Wed Apr 28 15:25:09 2010 TLS: Initial packet from 66.197.238.2:443, sid=5b7cabfc fed2b0f7
Wed Apr 28 15:25:12 2010 VERIFY OK: depth=1, /C=CN/ST=BJ/L=BJ/O=valwoo.org/CN=server/[email protected]
Wed Apr 28 15:25:12 2010 VERIFY OK: nsCertType=SERVER
Wed Apr 28 15:25:12 2010 VERIFY OK: depth=0, /C=CN/ST=BJ/L=BJ/O=valwoo.org/CN=server/[email protected]
Wed Apr 28 15:25:19 2010 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Apr 28 15:25:19 2010 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Apr 28 15:25:19 2010 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Apr 28 15:25:19 2010 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Apr 28 15:25:19 2010 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Wed Apr 28 15:25:19 2010 [server] Peer Connection Initiated with 66.197.238.2:443
Wed Apr 28 15:25:22 2010 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Wed Apr 28 15:25:22 2010 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Wed Apr 28 15:25:22 2010 OPTIONS IMPORT: timers and/or timeouts modified
Wed Apr 28 15:25:22 2010 OPTIONS IMPORT: --ifconfig/up options modified
Wed Apr 28 15:25:22 2010 OPTIONS IMPORT: route options modified
Wed Apr 28 15:25:22 2010 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Apr 28 15:25:22 2010 ROUTE default_gateway=192.168.1.1
Wed Apr 28 15:25:22 2010 There are no TAP-Win32 adapters on this system.  You should be able to create a TAP-Win32 adapter by going to Start -> All Programs -> OpenVPN -> Add a new TAP-Win32 virtual ethernet adapter.
Wed Apr 28 15:25:22 2010 Exiting
6#
发表于 2010-4-28 15:59:03 | 只看该作者
There are no TAP-Win32 adapters on this system.
本地openvpn客户端驱动没安装,重新来过。
7#
发表于 2010-5-15 09:35:24 | 只看该作者
原帖由 hx 于 2010-4-28 15:59 发表
There are no TAP-Win32 adapters on this system.
本地openvpn客户端驱动没安装,重新来过。

8#
发表于 2010-5-15 10:33:14 | 只看该作者
CreateFile failed on TAP device: \\.\Global\{7BCBDA4D-AE26-4706-8D1A-7AB792813FC8}.tap

虚拟网卡没有安装成功,重装吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-10-28 06:35 , Processed in 0.073028 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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