服务器端:sudo openvpn /etc/openvpn/server.conf
代码: 全选
Tue Sep 14 22:08:47 2010 Initialization Sequence Completed
Tue Sep 14 22:08:47 2010 MULTI: multi_create_instance called
Tue Sep 14 22:08:47 2010 125.39.160.250:42601 Re-using SSL/TLS context
Tue Sep 14 22:08:47 2010 125.39.160.250:42601 LZO compression initialized
Tue Sep 14 22:08:47 2010 125.39.160.250:42601 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Sep 14 22:08:47 2010 125.39.160.250:42601 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Sep 14 22:08:47 2010 125.39.160.250:42601 Local Options hash (VER=V4): '530fdded'
Tue Sep 14 22:08:47 2010 125.39.160.250:42601 Expected Remote Options hash (VER=V4): '41690919'
Tue Sep 14 22:08:47 2010 125.39.160.250:42601 TLS: Initial packet from [AF_INET]125.39.160.250:42601, sid=4413bede fd98a302
Tue Sep 14 22:09:47 2010 125.39.160.250:42601 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Sep 14 22:09:47 2010 125.39.160.250:42601 TLS Error: TLS handshake failed
Tue Sep 14 22:09:47 2010 125.39.160.250:42601 SIGUSR1[soft,tls-error] received, client-instance restarting
Tue Sep 14 22:09:48 2010 MULTI: multi_create_instance called
Tue Sep 14 22:09:48 2010 125.39.160.250:43001 Re-using SSL/TLS context
Tue Sep 14 22:09:48 2010 125.39.160.250:43001 LZO compression initialized
Tue Sep 14 22:09:48 2010 125.39.160.250:43001 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Sep 14 22:09:48 2010 125.39.160.250:43001 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Sep 14 22:09:48 2010 125.39.160.250:43001 Local Options hash (VER=V4): '530fdded'
Tue Sep 14 22:09:48 2010 125.39.160.250:43001 Expected Remote Options hash (VER=V4): '41690919'
Tue Sep 14 22:09:48 2010 125.39.160.250:43001 TLS: Initial packet from [AF_INET]125.39.160.250:43001, sid=0b9305e8 e41e86b6
代码: 全选
Tue Sep 14 22:07:43 2010 LZO compression initialized
Tue Sep 14 22:07:43 2010 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Sep 14 22:07:43 2010 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Sep 14 22:07:43 2010 Local Options hash (VER=V4): '41690919'
Tue Sep 14 22:07:43 2010 Expected Remote Options hash (VER=V4): '530fdded'
Tue Sep 14 22:07:43 2010 Socket Buffers: R=[112640->131072] S=[112640->131072]
Tue Sep 14 22:07:43 2010 UDPv4 link local: [undef]
Tue Sep 14 22:07:43 2010 UDPv4 link remote: [AF_INET]64.120.233.241:1194
Tue Sep 14 22:08:43 2010 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Sep 14 22:08:43 2010 TLS Error: TLS handshake failed
Tue Sep 14 22:08:43 2010 TCP/UDP: Closing socket
Tue Sep 14 22:08:43 2010 SIGUSR1[soft,tls-error] received, process restarting
Tue Sep 14 22:08:43 2010 Restart pause, 2 second(s)
Tue Sep 14 22:08:45 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue Sep 14 22:08:45 2010 Re-using SSL/TLS context
Tue Sep 14 22:08:45 2010 LZO compression initialized
Tue Sep 14 22:08:45 2010 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Sep 14 22:08:45 2010 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Sep 14 22:08:45 2010 Local Options hash (VER=V4): '41690919'
Tue Sep 14 22:08:45 2010 Expected Remote Options hash (VER=V4): '530fdded'
Tue Sep 14 22:08:45 2010 Socket Buffers: R=[112640->131072] S=[112640->131072]
Tue Sep 14 22:08:45 2010 UDPv4 link local: [undef]
Tue Sep 14 22:08:45 2010 UDPv4 link remote: [AF_INET]64.120.233.241:1194
代码: 全选
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet1 -j SNAT --to-source 64.120.233.241
代码: 全选
Warning: weird character in interface `venet0:1' (No aliases, :, ! or *).
附上 ifconfig 信息:
代码: 全选
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
inet6 addr: ::1/128 Scope:Host
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:13097 errors:0 dropped:0 overruns:0 frame:0
TX packets:13711 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4961999 (4.9 MB) TX bytes:3443700 (3.4 MB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:64.120.233.240 P-t-P:64.120.233.240 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:64.120.233.241 P-t-P:64.120.233.241 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1