1.概况:我在linode的VPS(Ubuntu系统)上准备搭建个VPN,用的是OpenVPN。
现在客户端的日志如下:
Tue Mar 05 18:46:16 2013 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006
Tue Mar 05 18:46:16 2013 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Tue Mar 05 18:46:16 2013 WARNING: No server certificate verification method has been enabled. See
http://openvpn.net/howto.html#mitm for more info.
Tue Mar 05 18:46:16 2013 LZO compression initialized
Tue Mar 05 18:46:16 2013 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Tue Mar 05 18:46:16 2013 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Mar 05 18:46:16 2013 Local Options hash (VER=V4): '69109d17'
Tue Mar 05 18:46:16 2013 Expected Remote Options hash (VER=V4): 'c0103fa8'
Tue Mar 05 18:46:16 2013 Attempting to establish TCP connection with XX.XX.XX.XX:1194
Tue Mar 05 18:46:16 2013 TCP connection established with 96.126.98.54:1194
Tue Mar 05 18:46:16 2013 TCPv4_CLIENT link local: [undef]
Tue Mar 05 18:46:16 2013 TCPv4_CLIENT link remote: 96.126.98.54:1194
Tue Mar 05 18:46:16 2013 Connection reset, restarting [-1]
Tue Mar 05 18:46:16 2013 TCP/UDP: Closing socket
Tue Mar 05 18:46:16 2013 SIGUSR1[soft,connection-reset] received, process restarting
Tue Mar 05 18:46:16 2013 Restart pause, 5 second(s)
服务器端syslog中的日志:
Mar 5 06:04:25 localhost ovpn-server[19057]: MULTI: multi_create_instance called
Mar 5 06:04:25 localhost ovpn-server[19057]: Re-using SSL/TLS context
Mar 5 06:04:25 localhost ovpn-server[19057]: LZO compression initialized
Mar 5 06:04:25 localhost ovpn-server[19057]: Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Mar 5 06:04:25 localhost ovpn-server[19057]: Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Mar 5 06:04:25 localhost ovpn-server[19057]: Local Options hash (VER=V4): 'c0103fa8'
Mar 5 06:04:25 localhost ovpn-server[19057]: Expected Remote Options hash (VER=V4): '69109d17'
Mar 5 06:04:25 localhost ovpn-server[19057]: TCP connection established with [AF_INET]117.88.18.249:13886
Mar 5 06:04:25 localhost ovpn-server[19057]: Socket Buffers: R=[131072->131072] S=[131072->131072]
Mar 5 06:04:25 localhost ovpn-server[19057]: TCPv4_SERVER link local: [undef]
Mar 5 06:04:25 localhost ovpn-server[19057]: TCPv4_SERVER link remote: [AF_INET]117.88.18.249:13886
Mar 5 06:04:25 localhost ovpn-server[19057]: 117.88.18.249:13886 TLS: Initial packet from [AF_INET]117.88.18.249:13886, sid=a5e55d90 22b5ae99
Mar 5 06:04:25 localhost ovpn-server[19057]: 117.88.18.249:13886 Connection reset, restarting [-1]
Mar 5 06:04:25 localhost ovpn-server[19057]: 117.88.18.249:13886 SIGUSR1[soft,connection-reset] received, client-instance restarting
Mar 5 06:04:25 localhost ovpn-server[19057]: TCP/UDP: Closing socket
2.服务器端配置文件如下:
local 96.126.98.54
port 1194
proto tcp
dev tun
ca ca.crt
cert myservername.crt
key myservername.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
keepalive 10 120
persist-key
persist-tun
comp-lzo
verb 3
push "dhcp-option DNS 10.8.0.1"
3.客户端配置文件:
client
dev tun
proto tcp
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo
verb 3
请求各位大神指点啊~~~~
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.