OpenVPN 无法禁用加密

use*_*761 14 openvpn

我在服务器和客户端配置中都设置了:

cipher none
auth none
Run Code Online (Sandbox Code Playgroud)

按照这个建议,我也使用 UDP 端口 1195。

当我启动服务器和客户端时,我收到以下警告:

Tue Dec  4 12:58:25 2018 ******* WARNING *******: '--cipher none' was specified. This means NO encryption will be performed and tunnelled data WILL be transmitted in clear text over the network! PLEASE DO RECONSIDER THIS SETTING!
Tue Dec  4 12:58:25 2018 ******* WARNING *******: '--auth none' was specified. This means no authentication will be performed on received packets, meaning you CANNOT trust that the data received by the remote side have NOT been manipulated. PLEASE DO RECONSIDER THIS SETTING!
Run Code Online (Sandbox Code Playgroud)

...这很好,但 openvpn 仍在使用加密。我知道这一点,因为:

1)当客户端连接时,我在服务器端收到以下消息:

Tue Dec  4 12:59:59 2018 client_abc/10.20.73.2:36752 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Tue Dec  4 12:59:59 2018 client_abc/10.20.73.2:36752 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Run Code Online (Sandbox Code Playgroud)

2)我在两边都得到了巨大的 CPU 负载

3) 我在 Wireshark 中看到数据是加密的

禁用加密还需要什么?

use*_*517 32

您似乎启用了可协商加密参数 (NCP)。你应该指定

ncp-disable
Run Code Online (Sandbox Code Playgroud)

禁用“可协商的加密参数”。这完全禁用了密码协商。

当两个 OpenVPN 实例启用了 NCP(最新版本的默认设置)时,它们将从 ncp-ciphers 定义的一组密码中协商使用哪种密码。默认设置为“AES-256-GCM:AES-128-GCM”,这解释了为什么您会在连接上看到 AES-256-GCM。


Pet*_*een 13

假设您正在运行 openvpn 2.4 我相信您还需要设置

ncp-禁用

https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/

一些背景:

Openvpn 过去需要您手动将加密算法配置为两端相同的值。然而,这带来了一个问题,它使得在现有的多用户 VPN 上升级加密变得非常困难。2016 年,设计了一种名为“sweet32”的攻击,允许在某些情况下恢复明文。这在实践中并不是一个容易实现的攻击,有一种方法可以在不改变密码的情况下减轻它,但它仍然是一个令人担忧的发展。

Openvpn 2.4 引入了一项新功能,默认启用以协商加密参数。我不确定这是对 sweet32 的反应还是普遍担心被有效锁定在单个密码套件中的影响的结果。

因此,当启用加密参数协商时,如果连接的另一端不支持协商,则“密码”设置有效地充当要使用的回退。