大网数据广告活动
服务器运维问答

OpenVPN enable compression lz4-v2 instead of comp-lzo

· 52CE 我爱测

I want to enable OpenVPN compression lz4-v2 in server configuration file(server.ovpn) I have: ;comp-lzo compress lz4-v2 push "compress lz4-v2" in client.ovpn,instead of comp-lzo i put push "compress lz4-v2" is that the correct co…

问题原文

原帖链接 · mrapi · CC BY-SA 4.0

I want to enable OpenVPN compression lz4-v2 in server configuration file(server.ovpn) I have:

;comp-lzo 
compress lz4-v2
push "compress lz4-v2"

in client.ovpn,instead of comp-lzo i put push "compress lz4-v2"

is that the correct configuration?

thanks

社区高分解答

原帖链接 · Supercoder · CC BY-SA 4.0

Allowing compression in OpenVPN is discouraged for common usage. Compression has been used in the past to break encryption. Allowing compression allows attacks that break encryption. See WARNING: Compression for receiving enabled. Avoid using "--allow-compression yes".

Please note that if you add allow-compression yes to your client config file, you will instead get a warning message that it is strongly discouraged to use the compression in this context.

You can resolve both problems (Used Inconsistently and Missing in local config) for a particular compress command if present as per the following example.

WARNING:'link-mtu' is used inconsistently, local='link-mtu1633',remote='link-mtu 1634' 
WARNING:'comp-lzo' is present in remote config but missing in local config,remote='comp-lzo'

First, make sure the client-side .ovpn config file enables selective compression by having at least one --comp-lzo directive, such as --comp-lzo no. This will turn off compression by default, but allows a future directive push from the server to dynamically change the on/off/adaptive setting.

In other word, just add and save the following line in your client.conf file .ovpn:

comp-lzo no

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-05-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。