我已经使用以下networking设置安装了OpenVPN服务器:
topology subnet server 192.168.123.0 255.255.255.0 push "dhcp-option DNS 192.168.123.1" # DNS to server VPN IP push "route 192.168.2.0 255.255.255.0" # Workstations addresses via VPN keepalive 10 120
所以:
Linux客户端能够连接,但是Windows 7系统失败并出现以下错误:
在select–ifconfig端点时出现问题[local = 192.168.123.2,remote = 255.255.255.248]。 本地和远程VPN端点必须存在于同一个255.255.255.252子网内。 与TAP-WIN32驱动程序一起使用时,这是–dev tun的限制。 尝试'openvpn – 显示有效子网'….
这是连接初始化的完整输出:
Thu Jul 01 09:36:55 2010 [server.FOOBAR] Peer Connection Initiated with 84.80.YYY.ZZZ Thu Jul 01 09:36:56 2010 SENT CONTROL [server.FOOBAR]: 'PUSH_REQUEST' (status=1) Thu Jul 01 09:36:56 2010 PUSH: Received control message: 'PUSH_REPLY,route 192.168.2.0 255.255.255.252,dhcp-option DNS 192.168.123.1,route-gateway 192.168.123.1,topology subnet,ping 10,ping-restart 120,ifconfig 192.168.123.2 255.255.255.248' Thu Jul 01 09:36:56 2010 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:4: topology (2.0.9) Thu Jul 01 09:36:56 2010 OPTIONS IMPORT: timers and/or timeouts modified Thu Jul 01 09:36:56 2010 OPTIONS IMPORT: --ifconfig/up options modified Thu Jul 01 09:36:56 2010 OPTIONS IMPORT: route options modified< al>Thu Jul 01 09:36:56 2010 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified Thu Jul 01 09:36:56 2010 WARNING: Since you are using --dev tun, the second argument to --ifconfig must be an IP address. You are using something (255.255.255. 248) that looks more like a netmask. (silence this warning with --ifconfig-nowarn) Thu Jul 01 09:36:56 2010 There is a problem in your selection of --ifconfig endpoints [local=192.168.123.2, remote=255.255.255.248]. The local and remote VPN endpoints must exist within the same 255.255.255.252 subnet. This is a limitation of --dev tun when used with the TAP-WIN32 driver. Try 'openvpn --show-valid-subnets' ....
任何尝试将服务器设置更改为252范围会导致以下错误:
选项错误:–server指令与–dev tun一起使用时,必须定义255.255.255.248(/ 29)或更低的子网
我需要设置哪些服务器设置才能使此客户端连接? 服务器运行OpenVPN 2.1.1,Windows 7客户端运行OpenVPN 2.0.9(从http://openvpn.se最新的稳定版本)
@Evan:这是我的客户端configuration,不是很令人兴奋:
client dev tun proto tcp remote 84.80.203.199 1194 resolv-retry 2 nobind # Server keys ca SERVER-ca.crt tls-auth SERVER-ta.key 1 # Client key cert SOMEONE.crt key SOMEONE.key # Server settings to copy comp-lzo # Downgrade privileges after initialization (non-Windows only) user nobody group guest # Try to preserve some state across restarts. persist-key persist-tun # Verify server ns-cert-type server verb 3 ;cipher x ;mute 20 ;mute-replay-warnings
我首先将Windows Vista客户端更新到最新的OpenVPN Windows版本 ,特别是2.1.x 版本 。 2.0.x和2.1.x之间有很大的变化。 我不是说这绝对是问题,但我不想尝试。 特别是当来自连接的全部输出显示“选项错误”和警告。
更新Windows客户端后,如果这不能解决问题,我会尝试运行服务器和客户端与verb 4或verb 6来增加日志冗长。 这可能会帮助您找出问题所在。