为什么只有推送路由的时候TUN接口才会出现故障?

为什么只有推送路由的时候TUN接口才会出现故障?

概括:Windows 10 OpenVPN 客户端在路由由 OpenVPN 服务器推送的情况下,处理路由设置时会遇到问题(但最终连接正常)。拒绝服务器路由的客户端会立即连接。

细节:我有一个 OpenVPN 服务器,用户可以从 Windows 10 机器连接。

客户端配置有两种类型:一种是服务器推送的路由被客户端拒绝(它会自行添加一些路由);另一种是客户端接收服务器配置,包括强制所有流量通过服务器的路由。

两种配置的区别在于以下几行(位于上面的第一个配置中)

# refuse routes from server
route-nopull
# add home routes
route 10.10.10.0 255.255.255.0
route 10.10.11.0 255.255.255.0
route 10.10.12.0 255.255.255.0

从这样的客户端连接时没有任何问题,连接很快建立,没有任何错误。

在第二种情况下,连接也通过(编辑:并且连接正确并按预期工作)但途中出现错误:

Tue Aug 16 18:16:53 2016 OpenVPN 2.3.11 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on May 10 2016
Tue Aug 16 18:16:53 2016 Windows version 6.2 (Windows 8 or greater) 64bit
Tue Aug 16 18:16:53 2016 library versions: OpenSSL 1.0.1t  3 May 2016, LZO 2.09
Enter Management Password:
Tue Aug 16 18:16:53 2016 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25342
Tue Aug 16 18:16:53 2016 Need hold release from management interface, waiting...
Tue Aug 16 18:16:54 2016 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25342
Tue Aug 16 18:16:54 2016 MANAGEMENT: CMD 'state on'
Tue Aug 16 18:16:54 2016 MANAGEMENT: CMD 'log all on'
Tue Aug 16 18:16:54 2016 MANAGEMENT: CMD 'hold off'
Tue Aug 16 18:16:54 2016 MANAGEMENT: CMD 'hold release'
Tue Aug 16 18:16:54 2016 Socket Buffers: R=[65536->65536] S=[65536->65536]
Tue Aug 16 18:16:54 2016 MANAGEMENT: >STATE:1471364214,RESOLVE,,,
Tue Aug 16 18:16:54 2016 UDPv4 link local: [undef]
Tue Aug 16 18:16:54 2016 UDPv4 link remote: [AF_INET]MY_SERVER_IP:1194
Tue Aug 16 18:16:54 2016 MANAGEMENT: >STATE:1471364214,WAIT,,,
Tue Aug 16 18:16:54 2016 MANAGEMENT: >STATE:1471364214,AUTH,,,
Tue Aug 16 18:16:54 2016 TLS: Initial packet from [AF_INET]MY_SERVER_IP:1194, sid=ee4d12d3 37c79813
Tue Aug 16 18:16:54 2016 VERIFY OK: depth=1, C=FR, ST=HOME, L=HOME, O=HOME, OU=HOME, CN=HOME CA, name=server, emailAddress=HOME@HOME
Tue Aug 16 18:16:54 2016 Validating certificate key usage
Tue Aug 16 18:16:54 2016 ++ Certificate has key usage  00a0, expects 00a0
Tue Aug 16 18:16:54 2016 VERIFY KU OK
Tue Aug 16 18:16:54 2016 Validating certificate extended key usage
Tue Aug 16 18:16:54 2016 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Tue Aug 16 18:16:54 2016 VERIFY EKU OK
Tue Aug 16 18:16:54 2016 VERIFY OK: depth=0, C=FR, ST=HOME, L=HOME, O=HOME, OU=HOME, CN=server, name=server, emailAddress=HOME@HOME
Tue Aug 16 18:16:54 2016 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Aug 16 18:16:54 2016 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Aug 16 18:16:54 2016 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Aug 16 18:16:54 2016 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Aug 16 18:16:54 2016 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Tue Aug 16 18:16:54 2016 [server] Peer Connection Initiated with [AF_INET]MY_SERVER_IP:1194
Tue Aug 16 18:16:55 2016 MANAGEMENT: >STATE:1471364215,GET_CONFIG,,,
Tue Aug 16 18:16:56 2016 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Tue Aug 16 18:16:56 2016 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.10.10.0 255.255.255.0 10.20.1.254,route 10.10.12.0 255.255.255.0 10.20.1.254,route-gateway 10.30.1.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.30.1.4 255.255.255.0'
Tue Aug 16 18:16:56 2016 OPTIONS IMPORT: timers and/or timeouts modified
Tue Aug 16 18:16:56 2016 OPTIONS IMPORT: --ifconfig/up options modified
Tue Aug 16 18:16:56 2016 OPTIONS IMPORT: route options modified
Tue Aug 16 18:16:56 2016 OPTIONS IMPORT: route-related options modified
Tue Aug 16 18:16:56 2016 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Tue Aug 16 18:16:56 2016 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 I=8 HWADDR=44:85:00:ec:ec:2b
Tue Aug 16 18:16:56 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Tue Aug 16 18:16:56 2016 MANAGEMENT: >STATE:1471364216,ASSIGN_IP,,10.30.1.4,
Tue Aug 16 18:16:56 2016 open_tun, tt->ipv6=0
Tue Aug 16 18:16:56 2016 TAP-WIN32 device [Ethernet 2] opened: \\.\Global\{83B07A98-A3E8-4A53-BDA5-44BA2C3ABB1B}.tap
Tue Aug 16 18:16:56 2016 TAP-Windows Driver Version 9.21 
Tue Aug 16 18:16:56 2016 Set TAP-Windows TUN subnet mode network/local/netmask = 10.30.1.0/10.30.1.4/255.255.255.0 [SUCCEEDED]
Tue Aug 16 18:16:56 2016 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.30.1.4/255.255.255.0 on interface {83B07A98-A3E8-4A53-BDA5-44BA2C3ABB1B} [DHCP-serv: 10.30.1.254, lease-time: 31536000]
Tue Aug 16 18:16:56 2016 Successful ARP Flush on interface [10] {83B07A98-A3E8-4A53-BDA5-44BA2C3ABB1B}
Tue Aug 16 18:17:01 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:01 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:06 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:06 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:07 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:07 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:08 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:08 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:09 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:09 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:11 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:11 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:12 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:12 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:13 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:13 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:14 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:14 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:16 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:16 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:17 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:17 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:18 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:18 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:19 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:19 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:21 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:21 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:22 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:22 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:23 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:23 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:24 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:24 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:25 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:25 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:27 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:27 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:28 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:28 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:29 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:29 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:30 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:30 2016 Route: Waiting for TUN/TAP interface to come up...
Tue Aug 16 18:17:31 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:31 2016 C:\Windows\system32\route.exe ADD MY_SERVER_IP MASK 255.255.255.255 192.168.1.1
Tue Aug 16 18:17:31 2016 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=25 and dwForwardType=4
Tue Aug 16 18:17:31 2016 Route addition via IPAPI succeeded [adaptive]
Tue Aug 16 18:17:31 2016 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.30.1.1
Tue Aug 16 18:17:31 2016 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Tue Aug 16 18:17:31 2016 Route addition via IPAPI succeeded [adaptive]
Tue Aug 16 18:17:31 2016 C:\Windows\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.30.1.1
Tue Aug 16 18:17:31 2016 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Tue Aug 16 18:17:31 2016 Route addition via IPAPI succeeded [adaptive]
Tue Aug 16 18:17:31 2016 MANAGEMENT: >STATE:1471364251,ADD_ROUTES,,,
Tue Aug 16 18:17:31 2016 C:\Windows\system32\route.exe ADD 10.10.10.0 MASK 255.255.255.0 10.20.1.254
Tue Aug 16 18:17:31 2016 Warning: route gateway is not reachable on any active network adapters: 10.20.1.254
Tue Aug 16 18:17:31 2016 Route addition via IPAPI failed [adaptive]
Tue Aug 16 18:17:31 2016 Route addition fallback to route.exe
Tue Aug 16 18:17:31 2016 env_block: add PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem
Tue Aug 16 18:17:31 2016 C:\Windows\system32\route.exe ADD 10.10.12.0 MASK 255.255.255.0 10.20.1.254
Tue Aug 16 18:17:31 2016 Warning: route gateway is not reachable on any active network adapters: 10.20.1.254
Tue Aug 16 18:17:31 2016 Route addition via IPAPI failed [adaptive]
Tue Aug 16 18:17:31 2016 Route addition fallback to route.exe
Tue Aug 16 18:17:31 2016 env_block: add PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem
SYSTEM ROUTING TABLE
0.0.0.0 0.0.0.0 192.168.1.1 p=0 i=8 t=4 pr=3 a=84556 h=0 m=25/0/0/0/0
0.0.0.0 128.0.0.0 10.30.1.1 p=0 i=10 t=4 pr=3 a=0 h=0 m=20/0/0/0/0
10.10.10.0 255.255.255.0 10.20.1.254 p=0 i=10 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
10.10.12.0 255.255.255.0 10.20.1.254 p=0 i=10 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
10.30.1.0 255.255.255.0 10.30.1.4 p=0 i=10 t=3 pr=2 a=34 h=0 m=276/0/0/0/0
10.30.1.4 255.255.255.255 10.30.1.4 p=0 i=10 t=3 pr=2 a=34 h=0 m=276/0/0/0/0
10.30.1.255 255.255.255.255 10.30.1.4 p=0 i=10 t=3 pr=2 a=34 h=0 m=276/0/0/0/0
MY_SERVER_IP 255.255.255.255 192.168.1.1 p=0 i=8 t=4 pr=3 a=0 h=0 m=25/0/0/0/0
127.0.0.0 255.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=2 a=84568 h=0 m=306/0/0/0/0
127.0.0.1 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=2 a=84568 h=0 m=306/0/0/0/0
127.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=2 a=84568 h=0 m=306/0/0/0/0
128.0.0.0 128.0.0.0 10.30.1.1 p=0 i=10 t=4 pr=3 a=0 h=0 m=20/0/0/0/0
192.168.1.0 255.255.255.0 192.168.1.115 p=0 i=8 t=3 pr=2 a=84556 h=0 m=281/0/0/0/0
192.168.1.115 255.255.255.255 192.168.1.115 p=0 i=8 t=3 pr=2 a=84556 h=0 m=281/0/0/0/0
192.168.1.255 255.255.255.255 192.168.1.115 p=0 i=8 t=3 pr=2 a=84556 h=0 m=281/0/0/0/0
192.168.56.0 255.255.255.0 192.168.56.1 p=0 i=7 t=3 pr=2 a=84561 h=0 m=266/0/0/0/0
192.168.56.1 255.255.255.255 192.168.56.1 p=0 i=7 t=3 pr=2 a=84561 h=0 m=266/0/0/0/0
192.168.56.255 255.255.255.255 192.168.56.1 p=0 i=7 t=3 pr=2 a=84561 h=0 m=266/0/0/0/0
224.0.0.0 240.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=2 a=84568 h=0 m=306/0/0/0/0
224.0.0.0 240.0.0.0 192.168.56.1 p=0 i=7 t=3 pr=2 a=84565 h=0 m=266/0/0/0/0
224.0.0.0 240.0.0.0 192.168.1.115 p=0 i=8 t=3 pr=2 a=84560 h=0 m=281/0/0/0/0
224.0.0.0 240.0.0.0 10.30.1.4 p=0 i=10 t=3 pr=2 a=2768 h=0 m=276/0/0/0/0
255.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=2 a=84568 h=0 m=306/0/0/0/0
255.255.255.255 255.255.255.255 192.168.56.1 p=0 i=7 t=3 pr=2 a=84565 h=0 m=266/0/0/0/0
255.255.255.255 255.255.255.255 192.168.1.115 p=0 i=8 t=3 pr=2 a=84560 h=0 m=281/0/0/0/0
255.255.255.255 255.255.255.255 10.30.1.4 p=0 i=10 t=3 pr=2 a=2768 h=0 m=276/0/0/0/0
SYSTEM ADAPTER LIST
VirtualBox Host-Only Ethernet Adapter
  Index = 7
  GUID = {7190082D-DE11-49F5-A991-69749CA819FA}
  IP = 192.168.56.1/255.255.255.0 
  MAC = 0a:00:27:00:00:07
  GATEWAY = 0.0.0.0/255.255.255.255 
  DNS SERV = 78.46.223.24/255.255.255.255 162.242.211.137/255.255.255.255 
Intel(R) Dual Band Wireless-AC 8260
  Index = 8
  GUID = {735F9562-13DF-473A-B9B4-81E14996782E}
  IP = 192.168.1.115/255.255.255.0 
  MAC = 44:85:00:ec:ec:2b
  GATEWAY = 192.168.1.1/255.255.255.255 
  DHCP SERV = 192.168.1.1/255.255.255.255 
  DHCP LEASE OBTAINED = Tue Aug 16 17:31:24 2016
  DHCP LEASE EXPIRES  = Tue Aug 23 16:11:24 2016
  DNS SERV = 78.46.223.24/255.255.255.255 162.242.211.137/255.255.255.255 
TAP-Windows Adapter V9
  Index = 10
  GUID = {83B07A98-A3E8-4A53-BDA5-44BA2C3ABB1B}
  IP = 10.30.1.4/255.255.255.0 
  MAC = 00:ff:83:b0:7a:98
  GATEWAY = 0.0.0.0/255.255.255.255 
  DHCP SERV = 10.30.1.254/255.255.255.255 
  DHCP LEASE OBTAINED = Tue Aug 16 18:16:56 2016
  DHCP LEASE EXPIRES  = Wed Aug 16 18:16:56 2017
  DNS SERV = 208.67.222.222/255.255.255.255 208.67.220.220/255.255.255.255 
Intel(R) Ethernet Connection (2) I219-LM
  Index = 9
  GUID = {7AC44F3C-D902-4C9C-A02E-06DEE26BAEC8}
  IP = 0.0.0.0/0.0.0.0 
  MAC = 50:7b:9d:f6:98:80
  GATEWAY = 192.168.1.1/255.255.255.255 
  DHCP SERV =  
  DHCP LEASE OBTAINED = Tue Aug 16 18:17:31 2016
  DHCP LEASE EXPIRES  = Tue Aug 16 18:17:31 2016
  DNS SERV =  
Microsoft Wi-Fi Direct Virtual Adapter
  Index = 11
  GUID = {97977503-C285-490A-9494-4FF80043ED78}
  IP = 0.0.0.0/0.0.0.0 
  MAC = 44:85:00:ec:ec:2c
  GATEWAY = 0.0.0.0/255.255.255.255 
  DHCP SERV =  
  DHCP LEASE OBTAINED = Tue Aug 16 18:17:31 2016
  DHCP LEASE EXPIRES  = Tue Aug 16 18:17:31 2016
  DNS SERV =  
TAP-Windows Adapter V9 | NordVPN-9.21.2
  Index = 13
  GUID = {A8974F3C-BDB6-4CAF-912A-C8EAF9EE00C0}
  IP = 0.0.0.0/0.0.0.0 
  MAC = 00:ff:a8:97:4f:3c
  GATEWAY = 0.0.0.0/255.255.255.255 
  DHCP SERV =  
  DHCP LEASE OBTAINED = Tue Aug 16 18:17:31 2016
  DHCP LEASE EXPIRES  = Tue Aug 16 18:17:31 2016
  DNS SERV =  
Tue Aug 16 18:17:31 2016 Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )
Tue Aug 16 18:17:31 2016 MANAGEMENT:   >STATE:1471364251,CONNECTED,ERROR,10.30.1.4,MY_SERVER_IP

以下这一系列令人担忧的台词是:

Tue Aug 16 18:17:01 2016 TEST ROUTES: 1/3 succeeded len=2 ret=0 a=0 u/d=up
Tue Aug 16 18:17:01 2016 Route: Waiting for TUN/TAP interface to come up...

对于第一个连接,连接日志的相关部分(两个日志之间不同)是

(...)
Tue Aug 16 18:42:07 2016 Successful ARP Flush on interface [10] {83B07A98-A3E8-4A53-BDA5-44BA2C3ABB1B}
Tue Aug 16 18:42:12 2016 TEST ROUTES: 3/3 succeeded len=3 ret=1 a=0 u/d=up
Tue Aug 16 18:42:12 2016 MANAGEMENT: >STATE:1471365732,ADD_ROUTES,,,
Tue Aug 16 18:42:12 2016 C:\Windows\system32\route.exe ADD 10.10.10.0 MASK 255.255.255.0 10.30.1.1
Tue Aug 16 18:42:12 2016 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Tue Aug 16 18:42:12 2016 Route addition via IPAPI succeeded [adaptive]
Tue Aug 16 18:42:12 2016 C:\Windows\system32\route.exe ADD 10.10.11.0 MASK 255.255.255.0 10.30.1.1
Tue Aug 16 18:42:12 2016 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Tue Aug 16 18:42:12 2016 Route addition via IPAPI succeeded [adaptive]
Tue Aug 16 18:42:12 2016 C:\Windows\system32\route.exe ADD 10.10.12.0 MASK 255.255.255.0 10.30.1.1
Tue Aug 16 18:42:12 2016 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Tue Aug 16 18:42:12 2016 Route addition via IPAPI succeeded [adaptive]
Tue Aug 16 18:42:12 2016 Initialization Sequence Completed
Tue Aug 16 18:42:12 2016 MANAGEMENT: >STATE:1471365732,CONNECTED,SUCCESS,10.30.1.4,MY_SERVER_IP

这似乎是一个已知问题(已有几年了),但是仅适用于最终失败的连接(如上所述,我的两个客户端场景都连接了)。有一些深奥的解决方法对我来说不起作用(但它们都围绕着启用接口 - 在我的情况下这不是问题)。

问题似乎出在来自服务器的路由设置上。客户端设置的路由直接应用即可。

答案1

在诊断问题时,我建议首先在日志中搜索包含error/ fail/ denied/的行warning,因为它们通常最有帮助。您的日志给出了以下行:

Tue Aug 16 18:17:31 2016 C:\Windows\system32\route.exe ADD 10.10.10.0 MASK 255.255.255.0 10.20.1.254
Tue Aug 16 18:17:31 2016 Warning: route gateway is not reachable on any active network adapters: 10.20.1.254
Tue Aug 16 18:17:31 2016 Route addition via IPAPI failed [adaptive]
Tue Aug 16 18:17:31 2016 Route addition fallback to route.exe
Tue Aug 16 18:17:31 2016 env_block: add PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem
Tue Aug 16 18:17:31 2016 C:\Windows\system32\route.exe ADD 10.10.12.0 MASK 255.255.255.0 10.20.1.254
Tue Aug 16 18:17:31 2016 Warning: route gateway is not reachable on any active network adapters: 10.20.1.254
Tue Aug 16 18:17:31 2016 Route addition via IPAPI failed [adaptive]
Tue Aug 16 18:17:31 2016 Route addition fallback to route.exe
Tue Aug 16 18:17:31 2016 env_block: add PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem

10.10.10.0/24这意味着您的配置文件包含无效的指令,无法使用不存在的适配器创建路由10.20.1.254,这可能是旧配置的遗留问题......

相关内容