当前位置: 技术问答>linux和unix
vps(ubuntu)搭建openvpn,win客户端连接超时,无法连接
来源: 互联网 发布时间:2017-02-24
本文导语: 本帖最后由 xlsoul 于 2012-05-19 19:33:07 编辑 嗯,就不多话了,进入主题。 linode的VPS,服务器端已经安装完成,tun/tap啥的也都有,nat肯定有,但是跟问题应该没什么关系: root@li295-157:~# /etc/init.d/openvpn status * VPN 'server' is runn...
linode的VPS,服务器端已经安装完成,tun/tap啥的也都有,nat肯定有,但是跟问题应该没什么关系:
root@li295-157:~# /etc/init.d/openvpn status
* VPN 'server' is running
server.conf是这么写的:
local 66.228.53.157
port 1194
proto udp
dev tun
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
ifconfig-pool-persist ipp.txt
server 10.168.1.0 255.255.255.0
push "redirect-gateway"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
client-to-client
;duplicate-cn
keepalive 20 60
comp-lzo
max-clients 50
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 3
mute 20
本地的client.ovpn是这么写的:
client
dev tun
proto udp
remote 66.228.53.157 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
redirect-gateway
keepalive 20 60
#tls-auth ta.key 1
comp-lzo
verb 3
mute 20
route-method exe
route-delay 2
按理说,即使ip转发什么的没有设置好,结果也应该是可以连接,但是不能上网,可是现在的情况却是连连接都不行,客户端的日志如下:
Sat May 19 19:19:47 2012 OpenVPN 2.2.2 Win32-MSVC++ [SSL] [LZO2] [PKCS11] built on Dec 15 2011
Sat May 19 19:19:47 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sat May 19 19:19:47 2012 LZO compression initialized
Sat May 19 19:19:47 2012 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Sat May 19 19:19:47 2012 Socket Buffers: R=[8192->8192] S=[8192->8192]
Sat May 19 19:19:47 2012 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Sat May 19 19:19:47 2012 Local Options hash (VER=V4): '41690919'
Sat May 19 19:19:47 2012 Expected Remote Options hash (VER=V4): '530fdded'
Sat May 19 19:19:47 2012 UDPv4 link local: [undef]
Sat May 19 19:19:47 2012 UDPv4 link remote: 66.228.53.157:1194
Sat May 19 19:20:48 2012 [UNDEF] Inactivity timeout (--ping-restart), restarting
Sat May 19 19:20:48 2012 TCP/UDP: Closing socket
Sat May 19 19:20:48 2012 SIGUSR1[soft,ping-restart] received, process restarting
Sat May 19 19:20:48 2012 Restart pause, 2 second(s)
Sat May 19 19:20:50 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sat May 19 19:20:50 2012 Re-using SSL/TLS context
Sat May 19 19:20:50 2012 LZO compression initialized
Sat May 19 19:20:50 2012 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Sat May 19 19:20:50 2012 Socket Buffers: R=[8192->8192] S=[8192->8192]
Sat May 19 19:20:50 2012 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Sat May 19 19:20:50 2012 Local Options hash (VER=V4): '41690919'
Sat May 19 19:20:50 2012 Expected Remote Options hash (VER=V4): '530fdded'
Sat May 19 19:20:50 2012 UDPv4 link local: [undef]
Sat May 19 19:20:50 2012 UDPv4 link remote: 66.228.53.157:1194
Sat May 19 19:21:51 2012 [UNDEF] Inactivity timeout (--ping-restart), restarting
Sat May 19 19:21:51 2012 TCP/UDP: Closing socket
Sat May 19 19:21:51 2012 SIGUSR1[soft,ping-restart] received, process restarting
总是一直连接不上,实在不知道问题出在哪里,如果大家还需要日志之类的东西,尽管说。感谢啊!
|
VPS 自身支持 VPN 么?