3

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

mrapi
  • 153
  • 2
  • 8
  • seems that for v2.4+ clients no compression specific config required at the client end as long the above config is 'pushable' but on client side I got WARNING: 'comp-lzo' is present in remote config but missing in local config, remote='comp-lzo' In server config I have one line commented: # comp-lzo – mrapi May 19 '19 at 09:14

2 Answers2

5

Put

compress lz4-v2

in client.conf as well.

cyoborg
  • 101
  • 1
  • 9
4

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
Supercoder
  • 141
  • 4
  • In case it helps someone, I came here because I was unable to connect to ProtonVPN via OpenVPN. I was getting: "OPTIONS ERROR: server pushed compression settings that are not allowed and will result in a non-working connection. See also allow-compression in the manual." After adding `comp-lzo no`, it worked. – Craig Silver May 06 '23 at 05:58