这是我最初问题的转发(OpenVPN 无法与任何 TLS 1.2 密码建立连接) 由于已经找到了 128 位密码套件的解决方案,因此问题被一分为二。
OpenVPN 无法连接这些密码套件:
TLS-DHE-RSA-WITH-AES-256-GCM-SHA384
TLS-DHE-RSA-WITH-AES-256-CBC-SHA256
我想知道是否有其他人成功使用它们。
我运行当前版本2.3.6,从源代码编译。
尝试过各种 Linux-Distros 和 Windows 客户端。
根据 wiki,密码应该可以工作: https://community.openvpn.net/openvpn/wiki/Hardening#Useof--tls-cipher
客户端错误:
[... Desktop]$ sudo openvpn home.ovpn
Sat Jan 24 15:18:28 2015 OpenVPN 2.3.6 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Jan 24 2015
Sat Jan 24 15:18:28 2015 library versions: OpenSSL 1.0.1l 15 Jan 2015, LZO 2.08
Sat Jan 24 15:18:28 2015 WARNING: file 'home/client1.key' is group or others accessible
Sat Jan 24 15:18:28 2015 WARNING: file 'home/ta.key' is group or others accessible
Sat Jan 24 15:18:28 2015 Control Channel Authentication: using 'home/ta.key' as a OpenVPN static key file
Sat Jan 24 15:18:28 2015 Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Jan 24 15:18:28 2015 Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Jan 24 15:18:28 2015 Attempting to establish TCP connection with [AF_INET]192.168.1.67:1194 [nonblock]
Sat Jan 24 15:18:29 2015 TCP connection established with [AF_INET]192.168.1.67:1194
Sat Jan 24 15:18:29 2015 TCPv4_CLIENT link local: [undef]
Sat Jan 24 15:18:29 2015 TCPv4_CLIENT link remote: [AF_INET]192.168.1.67:1194
Sat Jan 24 15:18:29 2015 TLS_ERROR: BIO read tls_read_plaintext error: error:140830B5:SSL routines:SSL3_CLIENT_HELLO:no ciphers available
Sat Jan 24 15:18:29 2015 TLS Error: TLS object -> incoming plaintext read error
Sat Jan 24 15:18:29 2015 TLS Error: TLS handshake failed
Sat Jan 24 15:18:29 2015 Fatal TLS error (check_tls_errors_co), restarting
Sat Jan 24 15:18:29 2015 SIGUSR1[soft,tls-error] received, process restarting
Sat Jan 24 15:18:30 2015 SIGINT[hard,init_instance] received, process exiting
答案1
是的,这应该可行,并且对我有用:
$ openvpn --config loopback-client --tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384 --tls-version-min 1.0
Thu Jan 29 00:13:13 2015 OpenVPN 2.3.6 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Dec 16 2014
Thu Jan 29 00:13:13 2015 library versions: OpenSSL 1.0.1f 6 Jan 2014, LZO 2.06
[...]
Thu Jan 29 00:13:13 2015 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Thu Jan 29 00:13:13 2015 [Test-Server] Peer Connection Initiated with [AF_INET]127.0.0.1:16000
Thu Jan 29 00:13:14 2015 Initialization Sequence Completed
这是使用 openvpn 提供的默认 loopback-server 和 loopback-client 配置文件。确保tls-version-min 1.0
在两端的配置中添加(或者 1.2,如果你想强制执行)。除此之外,我没有做任何特别的事情。
问题是否特别出在 AES-256 上?也就是说,TLS-DHE-RSA-WITH-AES-128-CBC-SHA 与 TLS-DHE-RSA-WITH-AES-256-CBC-SHA 的行为是否相同?