OpenVPN 未按预期工作

OpenVPN 未按预期工作

我正在尝试使用 OpenVPN 连接到另一个位置。我已获得一个脚本,但是一旦它运行并显示“初始化序列已完成”,我检查我的 IP 并且它保持原样。输出如下:

Fri Jul 08 16:04:20 2016 NOTE: --group option is not implemented on Windows
Fri Jul 08 16:04:20 2016 NOTE: --user option is not implemented on Windows
Fri Jul 08 16:04:20 2016 OpenVPN 2.3.11 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on May 10 2016
Fri Jul 08 16:04:20 2016 Windows version 6.2 (Windows 8 or greater) 64bit
Fri Jul 08 16:04:20 2016 library versions: OpenSSL 1.0.1t  3 May 2016, LZO 2.09
Fri Jul 08 16:04:20 2016 Control Channel Authentication: tls-auth using INLINE static key file
Fri Jul 08 16:04:20 2016 Attempting to establish TCP connection with [AF_INET]103.240.178.197:21194 [nonblock]
Fri Jul 08 16:04:21 2016 TCP connection established with [AF_INET]103.240.178.197:21194
Fri Jul 08 16:04:21 2016 TCPv4_CLIENT link local: [undef]
Fri Jul 08 16:04:21 2016 TCPv4_CLIENT link remote: [AF_INET]???.???.???.???:?????
Fri Jul 08 16:04:21 2016 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Jul 08 16:04:27 2016 [OpenVPN Server] Peer Connection Initiated with [AF_INET]???.???.???.???:?????
Fri Jul 08 16:04:31 2016 Options error: --dhcp-option: unknown option type 'domain-name-servers' or missing parameter
Fri Jul 08 16:04:31 2016 Options error: --dhcp-option: unknown option type 'domain-name-servers' or missing parameter
Fri Jul 08 16:04:32 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Fri Jul 08 16:04:32 2016 open_tun, tt->ipv6=0
Fri Jul 08 16:04:32 2016 TAP-WIN32 device [Ethernet] opened: ???.tap
Fri Jul 08 16:04:32 2016 Notified TAP-Windows driver to set a DHCP IP/netmask of ???.??.??.???(hidden for security reasons)/255.255.255.252 on interface {???-???-???-???} [DHCP-serv: ???.??.??.???, lease-time: 31536000]
Fri Jul 08 16:04:32 2016 Successful ARP Flush on interface [42] {???-???-???-???-????}
Fri Jul 08 16:04:34 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:34 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:34 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:35 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:36 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:36 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:36 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:36 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:36 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:36 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:36 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 16:04:36 2016 Initialization Sequence Completed
Fri Jul 08 16:05:54 2016 Connection reset, restarting [0]
Fri Jul 08 16:05:54 2016 SIGUSR1[soft,connection-reset] received, process restarting
Fri Jul 08 16:05:59 2016 Attempting to establish TCP connection with [AF_INET]103.240.178.197:21194 [nonblock]
Fri Jul 08 16:06:00 2016 TCP connection established with [AF_INET]103.240.178.197:21194
Fri Jul 08 16:06:00 2016 TCPv4_CLIENT link local: [undef]
Fri Jul 08 16:06:00 2016 TCPv4_CLIENT link remote: [AF_INET]103.240.178.197:21194
Fri Jul 08 16:06:07 2016 [OpenVPN Server] Peer Connection Initiated with [AF_INET]???.???.???.???:?????
Fri Jul 08 16:06:11 2016 Options error: --dhcp-option: unknown option type 'domain-name-servers' or missing parameter
Fri Jul 08 16:06:11 2016 Options error: --dhcp-option: unknown option type 'domain-name-servers' or missing parameter
Fri Jul 08 16:06:12 2016 Preserving previous TUN/TAP instance: Ethernet
Fri Jul 08 16:06:12 2016 Initialization Sequence Completed
Fri Jul 08 17:10:22 2016 TUN/TAP I/O operation aborted, restarting
Fri Jul 08 17:10:22 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem
Fri Jul 08 17:10:23 2016 env_block: add PATH=C:\windows\System32;C:\windows;C:\windows\System32\Wbem

我该如何诊断问题?它多次运行 env_block 这一事实让我很担心,但又不太清楚从哪里开始。

答案1

据我了解,您的日志:env_block是一条错误消息,表示环境变量存在问题。更具体地说,变量 PATH 不包含 OpenVPN 所需的元素。这意味着 OpenVPN 无法启动正确配置 Windows 所需的工具。

要检查这是否确实是问题所在:

  1. 打开控制面板
  2. 转至系统属性
  3. 在左侧,单击高级系统参数
  4. 单击“环境变量”
  5. 在列表中找到“路径”,选择它并单击修改
  6. 检查一下,确保C:\windows\System32;C:\windows;C:\windows\System32\Wbem里面有
  7. 如果有或者没有部分内容,请添加。确保添加的任何内容都以分号开始和结束。

请注意C:\windows可以用%SystemRoot%或代替%windir%

相关内容