The profile downloads, imports and then stops at line 12 of the file with an Unrecognized option message that names keysize. Nothing about the account changed, and the server still accepts other clients. What changed is the client itself: Ubuntu 24.04 installs OpenVPN 2.6, while the export was written against 2.4. The repair is a short series of deletions, and the order matters because each stale option aborts the parse before the next one is ever read.

Read the error line before you touch the file

OpenVPN names the file and the line where parsing stopped, so you can only fix one problem per run. Start the profile from a terminal rather than a desktop applet, because the applet usually swallows stderr and the line number is the only reliable pointer you get: sudo openvpn --config /etc/openvpn/client/provider.ovpn. Fix that line, run again, and expect the next failure to name a different option.

A parse error always appears before any TLS handshake, so a message that mentions a certificate has already cleared the syntax stage. That distinction keeps you from editing a file that is only failing authentication. Read the first word of the message rather than the middle of it.

Three failure classes, three different repairs

Old exports fail in three distinguishable ways, and folding them into one problem is why people reinstall packages that were never broken. The wording of the message tells you which class you are in before you open the file.

  • Parse errors name a file and a line, and stop before any traffic exists.
  • Negotiation errors connect, then report that the two ends could not agree on a shared cipher or an acceptable data channel.
  • Authentication errors get furthest and name a certificate, a user or a rejected credential.

A profile edit only fixes the first class. Negotiation needs a decision on both ends of the tunnel, and a rejected credential is not a syntax problem at all. If your message mentions a shared cipher or a data channel, the deletions below will change nothing.

Delete the options that 2.6 removed, in this order

Each of these lines stops the parse on its own, so the client reports them one at a time. Work down the list and re-run after every deletion.

Remove keysize first, because it has no modern equivalent and its presence usually marks a cipher the current client refuses anyway. Then remove ncp-disable, which controlled cipher negotiation, was deprecated in 2.5 and is gone in 2.6. Replace ns-cert-type server with remote-cert-tls server, which states the same intent through a supported check. The 2.6 change history lists the remaining removals next to their replacements, so anything the parser still rejects has a documented answer.

Keep a copy of the original profile before the first edit. Providers do regenerate exports, and a diff against the untouched file is the fastest way to separate your changes from theirs. If a deletion lets the client start but the tunnel still fails, you have moved into the negotiation class and the remaining lines are not the cause. Put the client version in the file name so the next person knows which release the edits target.

Keep BF-CBC working only as a scoped fallback

Some providers still terminate on BF-CBC, which OpenVPN 2.6 will not negotiate without help because the cipher has a 64-bit block. The narrow fix is a fallback list plus the OpenSSL legacy provider, not a downgrade of the whole client.

providers legacy default
data-ciphers AES-256-GCM:AES-128-GCM
data-ciphers-fallback BF-CBC

The first line loads the legacy provider so OpenSSL can still instantiate that cipher, the second keeps modern negotiation for peers that support it, and the third applies only when the server offers nothing better. That is a deliberate weakening of the tunnel, so record why it exists beside the file. Ask the provider for a regenerated export at the same time, since the fallback is a bridge rather than a destination.

Do not reach for --compat-mode as a blanket answer. It changes several behaviours at once, including negotiation and renegotiation defaults, so you never learn which change mattered. Prefer the three explicit lines above, because each one states its own effect.

Verify with the profile the client actually loads

Imported connections are often copied into a system directory, so editing the file in your download folder can change nothing at all. Find the copy that runs: sudo grep -rl "remote " /etc/NetworkManager/system-connections /etc/openvpn. Then start the tunnel and read the log line that reports the data channel cipher actually chosen. A connection that completes the handshake on the fallback tells you the server never offered anything modern.

Test from a network that is not the one the provider expects, so a captive portal or a filtered guest network does not masquerade as a profile fault. Record the client version alongside any support request.

Once the tunnel is up, send one request that must cross it and one that must not, then confirm the resolver answer changed the way you expected. If the profile now parses but the connection still fails, you have left the syntax problem behind and the error text will name the new class. Keep the edited file in version control next to a note naming the OpenVPN release it targets.

Artaigilean co-cheangailte