我有一个正在运行的 openvpn 服务器,我可以使用以下客户端配置文件连接到它:
client
dev tun
proto udp
remote myremote 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
verb 3
comp-lzo
ca C:\\Users\\Alex\\Downloads\\ca.crt
cert C:\\Users\\Alex\\Downloads\\client.crt
key C:\\Users\\Alex\\Downloads\\client.key
tls-auth C:\\Users\\Alex\\Downloads\\ta.key 1
但我无法使用此配置文件来执行此操作:
client
dev tun
proto udp
remote myremote 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
verb 3
comp-lzo
<ca>
-----BEGIN CERTIFICATE-----
-----
-----END CERTIFICATE-----
</ca>
<cert>
-----
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
----
-----END PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
----
-----END OpenVPN Static key V1-----
</tls-auth>
我将所有证书/密钥从不起作用的证书/密钥复制并粘贴到单独的文件中,它正常工作。
使用配置文件时,出现此错误:
Fri Feb 08 19:06:01 2019 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Fri Feb 08 19:06:01 2019 TLS Error: TLS handshake failed
服务器:Ubuntu 16
客户端:Windows 10