openvpn.is
English
简体中文繁體中文EnglishРусскийفارسی

HomeBlogConfiguration

Old gaps in the wall

Cipher warnings or no common cipher after an OpenVPN upgrade: why BF-CBC was dropped, how to write data-ciphers, removing comp-lzo, old devices.

Compiled on

A wall left unrepaired has gaps in the same old places
A wall left unrepaired has gaps in the same old places A.-K. D., CC BY-SA 4.0

After moving to 2.6 or 2.7 the log fills with warnings, or nothing connects. The new version no longer accepts some old things.

A warning does not mean it is unsafe today; it says support will end. ERROR, or no connection, needs action now. First see which you have.

The old things

OptionProblemUse instead
cipher BF-CBCBlocks too small for long transfersdata-ciphers AES-256-GCM
cipher AES-256-CBC aloneNew versions ignore itAdd data-ciphers
comp-lzo, compressCompression leaks contentsDelete on both sides
ns-cert-type serverRemovedremote-cert-tls server
secret static.keyNo forward secrecyCertificates
tls-authStill workstls-crypt for new setups
dh dh1024.pemToo shortdh none
An old city wall: like walls, old ciphers develop cracks
An old city wall: like walls, old ciphers develop cracks --Xocolatl 17:43, 2 December 2007 (UTC), Public domain

How to write it now

The same on both ends
data-ciphers AES-256-GCM:CHACHA20-POLY1305:AES-128-GCM

The two sides choose one they share. If one is very old and knows only CBC, add it at the end for now:

Only for old devices
data-ciphers AES-256-GCM:AES-128-GCM:AES-256-CBC
data-ciphers-fallback AES-256-CBC

Removing compression

If the server pushes compression and the client lacks it, you get Bad compression stub. Remove comp-lzo and push "comp-lzo ..." from the server first, then from clients.

  1. Upgrade the serverLeave the configuration alone
  2. Add data-ciphersKeep the old one as fallback
  3. Change clients one by oneCheck each
  4. Remove the fallbackLast
Order of change
A reinforced wall: set data-ciphers to AES-GCM and ChaCha20
A reinforced wall: set data-ciphers to AES-GCM and ChaCha20 Palauenc05, CC BY-SA 4.0

What the lines mean

LogLevelDo
--cipher set ... but missing in --data-ciphersWarningAdd data-ciphers
failed to negotiate cipher with serverErrorNothing in common
Unsupported cipher in --data-ciphers: BF-CBCErrorRemove BF-CBC
Compression for receiving enabledWarningRemove compression
Bad compression stub decompression headerErrorOne side compresses
ns-cert-type ignored or removedEitherremote-cert-tls
INSECURE cipher (BF-CBC)WarningReplace soon

What changed when

VersionChange
2.4Negotiation, AES-256-GCM by default
2.5data-ciphers; BF-CBC no longer default
2.6A lone cipher is hardly read; compression refused
2.7Static keys off by default; DCO normal

Jumping a server from 2.4 to 2.6 loses old clients in batches, and the other way round.

One setting for a transition

Server
data-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:AES-256-CBC
data-ciphers-fallback AES-256-CBC
Clients from 2.5
data-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305

2.4 does not know data-ciphers; put ignore-unknown-option data-ciphers on the line before.

What was agreed

Look for
Data Channel: cipher 'AES-256-GCM'

The server shows it for every client. List those still on CBC, update them, then remove the fallback.

Removing compression without a break

  1. Server firstcompress stub-v2, and push the same
  2. ClientsNew profiles without compression
  3. Server lastRemove every compression option
Within a week

stub-v2 keeps the format without compressing, so both kinds connect.

Old routers

Firmware that stopped may hold OpenVPN 2.3, which cannot negotiate. Give it its own port with the loosest settings and only its certificate, rather than weakening the whole server. Better new firmware, or a small PC behind it.

The router's firmware is too old?

Live with the fallback and replace the firmware when you can. Otherwise give it a service of its own.

What if I ignore the warnings?

It works today and may stop with the next major version.

Does the auth line matter?

With GCM only for the control channel; the same on both sides, or left out.

Is AES-128 much weaker than AES-256?

Both are enough in practice; 128 is a little faster.

Can warnings be hidden?

With a lower verb, but the reason remains.

Walk on

Nearby gates

Signposts: OpenVPN cipher warning, data-ciphers, comp-lzo deprecated