OpenVPN-2.5.1-I601-amd64.msi
我在电脑上安装了 OpenVPN Windows 10 Pro x64
。
该服务器是 Netgear R6230 路由器,我为其配置了 DDNS 和 VPN。
以下是日志:
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_private_mode = 00000000
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_cert_private = DISABLED
Sun Mar 28 16:13:45 2021 pkcs11_pin_cache_period = -1
Sun Mar 28 16:13:45 2021 pkcs11_id = '[UNDEF]'
Sun Mar 28 16:13:45 2021 pkcs11_id_management = DISABLED
Sun Mar 28 16:13:45 2021 server_network = 0.0.0.0
Sun Mar 28 16:13:45 2021 server_netmask = 0.0.0.0
Sun Mar 28 16:13:45 2021 server_network_ipv6 = ::
Sun Mar 28 16:13:45 2021 server_netbits_ipv6 = 0
Sun Mar 28 16:13:45 2021 server_bridge_ip = 0.0.0.0
Sun Mar 28 16:13:45 2021 server_bridge_netmask = 0.0.0.0
Sun Mar 28 16:13:45 2021 server_bridge_pool_start = 0.0.0.0
Sun Mar 28 16:13:45 2021 server_bridge_pool_end = 0.0.0.0
Sun Mar 28 16:13:45 2021 ifconfig_pool_defined = DISABLED
Sun Mar 28 16:13:45 2021 ifconfig_pool_start = 0.0.0.0
Sun Mar 28 16:13:45 2021 ifconfig_pool_end = 0.0.0.0
Sun Mar 28 16:13:45 2021 ifconfig_pool_netmask = 0.0.0.0
Sun Mar 28 16:13:45 2021 ifconfig_pool_persist_filename = '[UNDEF]'
Sun Mar 28 16:13:45 2021 ifconfig_pool_persist_refresh_freq = 600
Sun Mar 28 16:13:45 2021 ifconfig_ipv6_pool_defined = DISABLED
Sun Mar 28 16:13:45 2021 ifconfig_ipv6_pool_base = ::
Sun Mar 28 16:13:45 2021 ifconfig_ipv6_pool_netbits = 0
Sun Mar 28 16:13:45 2021 n_bcast_buf = 256
Sun Mar 28 16:13:45 2021 tcp_queue_limit = 64
Sun Mar 28 16:13:45 2021 real_hash_size = 256
Sun Mar 28 16:13:45 2021 virtual_hash_size = 256
Sun Mar 28 16:13:45 2021 client_connect_script = '[UNDEF]'
Sun Mar 28 16:13:45 2021 learn_address_script = '[UNDEF]'
Sun Mar 28 16:13:45 2021 client_disconnect_script = '[UNDEF]'
Sun Mar 28 16:13:45 2021 client_config_dir = '[UNDEF]'
Sun Mar 28 16:13:45 2021 ccd_exclusive = DISABLED
Sun Mar 28 16:13:45 2021 tmp_dir = 'C:\Users\tammara\AppData\Local\Temp\'
Sun Mar 28 16:13:45 2021 push_ifconfig_defined = DISABLED
Sun Mar 28 16:13:45 2021 push_ifconfig_local = 0.0.0.0
Sun Mar 28 16:13:45 2021 push_ifconfig_remote_netmask = 0.0.0.0
Sun Mar 28 16:13:45 2021 push_ifconfig_ipv6_defined = DISABLED
Sun Mar 28 16:13:45 2021 push_ifconfig_ipv6_local = ::/0
Sun Mar 28 16:13:45 2021 push_ifconfig_ipv6_remote = ::
Sun Mar 28 16:13:45 2021 enable_c2c = DISABLED
Sun Mar 28 16:13:45 2021 duplicate_cn = DISABLED
Sun Mar 28 16:13:45 2021 cf_max = 0
Sun Mar 28 16:13:45 2021 cf_per = 0
Sun Mar 28 16:13:45 2021 max_clients = 1024
Sun Mar 28 16:13:45 2021 max_routes_per_client = 256
Sun Mar 28 16:13:45 2021 auth_user_pass_verify_script = '[UNDEF]'
Sun Mar 28 16:13:45 2021 auth_user_pass_verify_script_via_file = DISABLED
Sun Mar 28 16:13:45 2021 auth_token_generate = DISABLED
Sun Mar 28 16:13:45 2021 auth_token_lifetime = 0
Sun Mar 28 16:13:45 2021 auth_token_secret_file = '[UNDEF]'
Sun Mar 28 16:13:45 2021 vlan_tagging = DISABLED
Sun Mar 28 16:13:45 2021 vlan_accept = all
Sun Mar 28 16:13:45 2021 vlan_pvid = 1
Sun Mar 28 16:13:45 2021 client = ENABLED
Sun Mar 28 16:13:45 2021 pull = ENABLED
Sun Mar 28 16:13:45 2021 auth_user_pass_file = '[UNDEF]'
Sun Mar 28 16:13:45 2021 show_net_up = DISABLED
Sun Mar 28 16:13:45 2021 route_method = 3
Sun Mar 28 16:13:45 2021 block_outside_dns = DISABLED
Sun Mar 28 16:13:45 2021 ip_win32_defined = DISABLED
Sun Mar 28 16:13:45 2021 ip_win32_type = 3
Sun Mar 28 16:13:45 2021 dhcp_masq_offset = 0
Sun Mar 28 16:13:45 2021 dhcp_lease_time = 31536000
Sun Mar 28 16:13:45 2021 tap_sleep = 0
Sun Mar 28 16:13:45 2021 dhcp_options = DISABLED
Sun Mar 28 16:13:45 2021 dhcp_renew = DISABLED
Sun Mar 28 16:13:45 2021 dhcp_pre_release = DISABLED
Sun Mar 28 16:13:45 2021 domain = '[UNDEF]'
Sun Mar 28 16:13:45 2021 netbios_scope = '[UNDEF]'
Sun Mar 28 16:13:45 2021 netbios_node_type = 0
Sun Mar 28 16:13:45 2021 disable_nbt = DISABLED
Sun Mar 28 16:13:45 2021 OpenVPN 2.5.1 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Feb 24 2021
Sun Mar 28 16:13:45 2021 Windows version 10.0 (Windows 10 or greater) 64bit
Sun Mar 28 16:13:45 2021 library versions: OpenSSL 1.1.1j 16 Feb 2021, LZO 2.10
Sun Mar 28 16:13:45 2021 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Sun Mar 28 16:13:45 2021 Need hold release from management interface, waiting...
Sun Mar 28 16:13:45 2021 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Sun Mar 28 16:13:46 2021 MANAGEMENT: CMD 'state on'
Sun Mar 28 16:13:46 2021 MANAGEMENT: CMD 'log all on'
Sun Mar 28 16:13:46 2021 MANAGEMENT: CMD 'echo all on'
Sun Mar 28 16:13:46 2021 MANAGEMENT: CMD 'bytecount 5'
Sun Mar 28 16:13:46 2021 MANAGEMENT: CMD 'hold off'
Sun Mar 28 16:13:46 2021 MANAGEMENT: CMD 'hold release'
Sun Mar 28 16:13:46 2021 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Sun Mar 28 16:13:46 2021 LZO compression initializing
Sun Mar 28 16:13:46 2021 Control Channel MTU parms [ L:1654 D:1212 EF:38 EB:0 ET:0 EL:3 ]
Sun Mar 28 16:13:46 2021 MANAGEMENT: >STATE:1616973226,RESOLVE,,,,,,
Sun Mar 28 16:13:46 2021 Data Channel MTU parms [ L:1654 D:1450 EF:122 EB:411 ET:32 EL:3 ]
Sun Mar 28 16:13:46 2021 Local Options String (VER=V4): 'V4,dev-type tap,link-mtu 1590,tun-mtu 1532,proto UDPv4,comp-lzo,cipher AES-128-CBC,auth SHA1,keysize 128,key-method 2,tls-client'
Sun Mar 28 16:13:46 2021 Expected Remote Options String (VER=V4): 'V4,dev-type tap,link-mtu 1590,tun-mtu 1532,proto UDPv4,comp-lzo,cipher AES-128-CBC,auth SHA1,keysize 128,key-method 2,tls-server'
Sun Mar 28 16:13:46 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]172.88.131.44:12974
Sun Mar 28 16:13:46 2021 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun Mar 28 16:13:46 2021 UDP link local: (not bound)
Sun Mar 28 16:13:46 2021 UDP link remote: [AF_INET]172.88.131.44:12974
Sun Mar 28 16:13:46 2021 MANAGEMENT: >STATE:1616973226,WAIT,,,,,,
如你所见,选项并不多。我下载了配置文件,这没什么问题。
这是我下载的配置文件。我将通用名称更改为唯一名称。
client
dev tap
proto udp
dev-node NETGEAR-VPN
remote <DDNSName> 12974
resolv-retry infinite
nobind
**key-direction 1**
persist-key
persist-tun
ca ca<name>.crt
cert client<name>.crt
key client<name>.key
cipher AES-128-CBC
comp-lzo
verb 5
有什么想法吗?
答案 1 的更新
我添加了缺失的键方向,请参阅上面更新的脚本,两侧都有 ** 表示方向。
日志看起来一样。以下是最后几行。
Sun Mar 28 19:01:30 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]172.88.131.44:12974
Sun Mar 28 19:01:30 2021 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun Mar 28 19:01:30 2021 UDP link local: (not bound)
Sun Mar 28 19:01:30 2021 UDP link remote: [AF_INET]172.88.131.44:12974
Sun Mar 28 19:01:30 2021 MANAGEMENT: >STATE:1616983290,WAIT,,,,,,
答案1
标准 openvpn 配置包含一个项 key-direction,它控制哪一方开始密钥协商(这是您的连接卡住的地方)。我在您的客户端配置文件中没有看到这个。
尝试将以下内容添加到您的客户端配置文件中:
key-direction 1
它可以放置在“客户端”标签之后的任何位置。(正如评论中指出的那样,这个标签可能没有帮助。)
此外,可能还有防火墙。R6230 说明并未指出端口 12973/upd 和 12974/udp(原始配置)或您决定使用的任何端口都必须通过防火墙转发到 R6230,OpenVPN 才能正常工作。
添加