Explain why an IPsec tunnel works with classic keys and fails with hybrid

A classic IPsec tunnel can keep working while a hybrid one fails because the hybrid proposal adds a second key exchange that both peers, and every device on the path, must support. Compare the two logs side by side to find out which one.

On this page

Why does my tunnel connect with classic keys but fail with hybrid?

Your classic IPsec tunnel came up, and after you switched the proposal to a hybrid one it stopped connecting. The most likely cause is that the hybrid proposal adds an extra key exchange, written with the keX_ syntax (for example x25519-ke1_mlkem768), and the peer must accept that extra exchange as well. The failure is usually either a proposal mismatch, where the two sides cannot agree on a key exchange method for one round, or a path problem such as IKE messages being fragmented and dropped on the way. The existing classic tunnel is not affected by the failed attempt, because it stays established until its lifetime expires or it is rekeyed. The failed hybrid attempt is also not an encryption downgrade: the peers do not fall back to weaker encryption when a hybrid proposal fails, they simply do not establish that SA.

Whether this is urgent depends on whether the classic tunnel must stay in place during the change. If it must, do not remove the classic proposal from the peer until the hybrid one is confirmed working, and treat the failure as a planning issue rather than an outage. If the classic tunnel can be briefly interrupted, the change can proceed in a maintenance window. To narrow the cause, check the installed version with swanctl --version on both peers, then compare the algorithms each peer loaded with swanctl --list-algs, because a peer without an ML-KEM backend will never accept a keX_ round it cannot implement.

To compare the two attempts, enable charon.filelog with ike = 2, net = 2 and cfg = 2 on both peers, then record the classic and hybrid runs. Check the IKE_SA_INIT messages for FRAG_SUP notifies, which tell you whether fragmentation is supported, and look for retransmits that point to messages being lost. The swanctl --list-sas --ike output on the working classic tunnel shows exactly what was negotiated, which gives you a baseline. Confirm the exact proposal strings and key lengths each side uses in swanctl.conf, since a difference in either one is the most common reason the hybrid proposal is rejected with no common method.

Which steps compare a working classic tunnel with a failing hybrid one?

This sequence sets a working classic-only IPsec tunnel beside a failing hybrid one, so you can see whether the difference lies in proposal configuration, the installed plugins or the network path. Each step records a check you can compare line by line between the two attempts.

  1. Confirm the ML-KEM plugin is loaded

    On both peers, run swanctl --version to record the installed strongSwan version, then run swanctl --list-algs and look for the key exchange group entries under the dh category. Confirm that the ML-KEM algorithms (mlkem512, mlkem768 and mlkem1024) are listed with the plugin that implements them in brackets. If one peer does not list them, the hybrid attempt cannot succeed on that side, so stop here and fix the plugin before comparing anything else. Also note that the ML-KEM backends differ by version, so check the strongSwan 6.0.0 release notes for which backend your build uses.

  2. Record the proposal lines for both connections

    Open swanctl.conf on each peer and copy the proposals line from the classic connection and from the hybrid connection into a side-by-side note. In the hybrid line, look for the keX_ parts, such as x25519-ke1_mlkem768, and confirm the classic line omits them. Check that proposals are comma-separated and that the first entry is the one each side prefers. You are done when you can state, for each connection and each peer, the exact key exchange methods offered for IKE and for ESP. Mismatched entries here are a common cause of NO_PROPOSAL_CHOSEN, so write down any difference you find.

  3. Enable detailed charon logging on a test run

    On each peer, set charon.filelog in strongswan.conf with a dedicated log path and per-subsystem levels of ike = 2, net = 2, cfg = 2 and enc = 3. Use a test run only, because level 4 includes sensitive material such as keys, and remove or lower that level before you keep any log file. Reload or restart charon as your installation requires, then confirm the log file is being written. You are done when the log opens and shows IKE_SA_INIT activity for the test connection.

  4. Reproduce the classic and hybrid attempts

    Bring up the classic connection first and let it establish, then bring down the tunnel and attempt the hybrid connection under the same logging settings. Keep the two log files separate so each attempt can be read on its own. Note where each attempt stops: whether IKE_SA_INIT completes, whether IKE_INTERMEDIATE or IKE_AUTH messages appear, and whether a notify such as NO_PROPOSAL_CHOSEN is returned. You are done when you have one log for a working attempt and one for a failing attempt, and you can name the message at which the hybrid attempt diverges.

  5. Show the expected IKE SA line on the working tunnel

    While the classic tunnel is up, run swanctl --list-sas on each peer, optionally filtered with --ike. The IKE SA line lists encryption, integrity, PRF and key exchange, such as AES_CBC-128/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/CURVE_25519. Record this line as your reference format, then confirm both peers show matching values. If you later bring up a hybrid tunnel that succeeds, the key exchange field should show the additional ML-KEM group alongside the classic one, so compare against that when it appears.

  6. Compare retransmission timing with the defaults

    Check the retransmission settings in strongswan.conf on each peer, comparing charon.retransmit_timeout, charon.retransmit_tries and charon.retransmit_base against their defaults of 4.0 seconds, 5 and 1.8. In the two logs, measure the gaps between repeated requests for the same exchange. If the hybrid attempt retransmits on the same schedule as the defaults but never receives an answer, the problem is more likely a dropped or oversized message on the path. If the timing differs from the configured values, the settings on one peer differ from the other, so record which side changed. You are done when you can say whether the hybrid failure looks like a configuration mismatch or a path problem.

  7. Decide between configuration and path causes

    Using the proposal lines, plugin list, logs and retransmission pattern, decide which category the failure belongs to. A proposal or plugin mismatch points to configuration, while repeated retransmissions of a large message with no reply point to the path, such as fragmentation being blocked, which the strongSwan FAQ attributes to firewalls that drop IP fragments. Confirm fragmentation is not disabled in swanctl.conf and that FRAG_SUP notifies appear in the IKE_SA_INIT messages of both logs. You are done when you have written a single conclusion and the evidence line that supports it, ready to take into the matching fix page.

Who has to change what when the hybrid tunnel fails?

A hybrid IPsec tunnel depends on four parties agreeing on the same key exchange proposal and on a clean path between them. Each card below names one party, what that party controls, and what to confirm with them before changing anything on your side.

Gateway administrator

The gateway administrator controls swanctl.conf, the strongSwan build and the plugins that provide ML-KEM. Start by running swanctl --version and swanctl --list-algs to confirm the installed version and that an ML-KEM implementation (the ml, botan, wolfssl or openssl plugin) is loaded. Then confirm that the ke1_mlkem entries in the connection's proposal match what the classic comparison tunnel uses, apart from the added key exchange. A missing plugin looks like a configuration error, so check the build before editing proposals.

swanctl --list-algs

Peer administrator

The peer administrator controls the remote gateway's proposal list. The peer must offer the same additional key exchange, in the same position, or the responder has to reject with NO_PROPOSAL_CHOSEN. Ask them for the exact IKE and ESP proposal strings they configured, and confirm that they accept every key length you propose. Do not assume their product supports ML-KEM at the level you configured, because support often differs by version and by key size. Agree on one proposal string on both sides before the next test.

RFC 9370

Network team

The network team controls firewalls, MTU and any device that handles IP fragments on the path. Hybrid key exchange enlarges IKE_SA_INIT and certificate-carrying messages, so a firewall that drops fragments or a link with a reduced MTU can cause retransmits that look like negotiation failures. Ask the team to confirm that UDP 500 and UDP 4500 are open in both directions and that fragmented IP packets pass the path. Compare the retransmit pattern in the logs with the path MTU before blaming the proposal.

strongSwan FAQ

Appliance vendor

If either end is a commercial appliance rather than a self-managed strongSwan host, its vendor controls which key exchange methods the firmware supports and how it logs negotiation. The vendor's documentation, release notes and support team are the sources to consult, because the appliance's algorithm list may differ from the open-source list. Ask the vendor whether the firmware version supports the specific ML-KEM variant you propose, and whether it accepts additional key exchanges in the IKEv2 proposal. Request the vendor's debug output for the failed attempt, since it is often not visible in the standard event log.

Shared evidence for each party

Every party needs the same evidence to diagnose the failure: the installed version, the loaded algorithms, the exact proposal string, and a log of the failed attempt. Collect the swanctl --list-sas output from a working classic tunnel and from the failing hybrid one, then compare the IKE SA line field by field. Keep the logs at a consistent verbosity level, so the difference you see comes from the configuration and not from the logging setup.

swanctl --list-sas

Which symptoms point to configuration and which point to the path?

This table maps what you see in the logs to the most likely cause, so you can separate a proposal mismatch from a fragmentation or plugin problem. Read each row against both the working classic tunnel and the failing hybrid one, because the difference between them is usually the cause. The main takeaway is that a NO_PROPOSAL_CHOSEN reply points to the proposal lists, while repeated IKE_AUTH retransmits point to the path.

ObservationLikely causeWhat to check next
Peer replies NO_PROPOSAL_CHOSEN to IKE_SA_INITProposal mismatch: the peer does not accept one of the key exchanges in your proposalConfirm the peer supports every ke1 or later round you propose, per the strongSwan FAQ and RFC 9370, and compare both proposal lists
Classic tunnel works, hybrid tunnel fails with the same peerDifference in the proposal, not the path, if the peer accepts the classic proposalDiff the IKE and ESP proposal strings, looking for keX_ parts such as x25519-ke1_mlkem768 that the classic one omits
Repeated IKE_AUTH retransmits with no replyFragmentation or a blocked IP fragment on the pathCheck for FRAG_SUP notifies in IKE_SA_INIT, the fragmentation setting in swanctl.conf, and whether a firewall drops IP fragments
ML-KEM algorithm missing from swanctl --list-algsPlugin problem: no loaded plugin implements the ML-KEM methodConfirm the installed version with swanctl --version and that a plugin backing ML-KEM is loaded, per the strongSwan 6.0.0 release notes
Hybrid tunnel comes up but SA shows only classic key exchangeProposal order or fallback: the classic method was selected because the peer did not agree to the added roundRun swanctl --list-sas --ike and check that the key exchange field names the ML-KEM method alongside CURVE_25519
Retransmit timing differs between the two attemptsPath delay or retransmission settings, not the proposalCompare charon.retransmit_timeout, retransmit_tries and retransmit_base in strongswan.conf against the defaults in daemon.log

How do you go from a failed hybrid attempt to the cause?

Start with the failed hybrid tunnel and confirm the ML-KEM plugin is loaded using swanctl --list-algs. If it is, check whether the peer answers with NO_PROPOSAL_CHOSEN, which points to a proposal mismatch. If it does not, check whether FRAG_SUP appears in the IKE_SA_INIT messages, since missing fragmentation support or blocked fragments can cause problems. Finally, look for retransmits during IKE_AUTH, which often indicate a path MTU or fragmentation issue. The path ends at either a proposal fix or a path fix.

Decision path from a failed hybrid tunnel to proposal or path causes.

What should a gateway operator, a remote user and a network engineer each do?

The gateway operator owns the side that runs the strongSwan daemon and the configuration that offers the proposals. Start by confirming the installed version with swanctl --version and the loaded algorithms with swanctl --list-algs, so you know whether the ML-KEM plugin you expect is present. Then compare the working classic connection with the failing hybrid one in swanctl.conf, changing only the keX_ parts of the proposal string. A classic-only proposal omits those parts entirely, so any difference in the proposals line is the first thing to examine. Enable logging with charon.filelog at ike = 2, net = 2, cfg = 2 and enc = 3, and capture both attempts.

  • Check the proposal order: confirm the hybrid line lists the expected keX_mlkem entries and that the classic fallback still appears.
  • Compare the logs: look for the proposal list each peer sent and for NO_PROPOSAL_CHOSEN in the failing run.
  • Check fragmentation settings: note whether connections.<conn>.fragmentation is set and whether charon.fragment_size is changed in strongswan.conf.
  • Confirm peer support: look for FRAG_SUP notifies in IKE_SA_INIT messages to see whether the other side advertises fragmentation.
  • Hand over evidence: send the two log excerpts, the swanctl.conf connection block and the swanctl --version output to the next role.

The gateway operator should finish with a clear answer to whether the proposal list itself differs between the working and failing configurations.

What can break if people react by weakening the configuration?

When a hybrid tunnel fails, the quickest fixes often remove the very setting that caused the mismatch or hide the symptom. Each change below can make the tunnel appear to work while leaving the cause unfound, exposing keys, or creating a new mismatch.

Dropping the hybrid proposal without a cause

Removing the keX_ parts from swanctl.conf makes the tunnel come up, but it does not tell you which side rejected which transform. Compare both peers' swanctl --list-sas output and logs first, so you know whether the rejected item was an ML-KEM keyword, a missing plugin or a fragmentation problem. Without that, the same failure returns on the next change, and you have no record of what the peer actually supports.

strongSwan FAQ

A permanent classic-only fallback

A classic-only proposal is useful as a temporary comparison, but leaving it in place means the tunnel no longer uses the post-quantum key exchange you intended to enable. Treat any fallback as a dated exception with an owner and a plan to restore the hybrid proposal once the mismatch is fixed. Record the exception in your change log so it does not become the permanent setting by default.

Retransmission values that hide the failure

Raising charon.retransmit_timeout or charon.retransmit_tries in strongswan.conf can make a slow or fragmenting exchange appear to succeed. The defaults are 4.0 seconds for the timeout and 5 tries, so a larger value stretches the wait without fixing the cause. Compare the retransmitted messages in the log against the classic run, and check for FRAG_SUP notifies and fragmentation settings before changing any timer.

strongSwan retransmission

Level 4 logging that exposes keys

Setting a subsystem such as enc to level 4 writes sensitive material, including keys, into the log file. Use level 2 for ike, net and cfg, and level 3 only when you need raw hex dumps for a short capture. Restrict access to the log file, remove it after the comparison, and lower the level again once you finish the investigation.

strongSwan logging

One-sided proposal list changes

Editing the proposal list on one gateway but not the other produces a mismatch that looks like a new failure. The proposal order defines preference, and both peers must agree on a key exchange method for each round unless neither defines one. Change both gateways in the same window, then confirm with swanctl --list-sas on each side that the same key exchange appears in the IKE SA line.

Rollbacks that were never tested

A rollback is itself a configuration change, so it can fail for the same reasons the original change did. Test the rollback the way you tested the change: apply it on a lab pair or during a maintenance window, then bring the tunnel up and capture the same swanctl --list-sas output. Keep the previous swanctl.conf and strongswan.conf files so you can restore them exactly.

Where can I check each claim in the sources listed on this page?

Start with the strongSwan proposals page at strongSwan proposals. It explains the keX_ syntax, the ML-KEM keywords mlkem512, mlkem768 and mlkem1024, and the rule that peers must agree on a key exchange method for each round. Compare the proposal string on each side of the tunnel against it. To confirm what each daemon actually loaded, run swanctl --list-algs, which is documented at swanctl --list-algs. Check whether the ML-KEM entries appear and which plugin implements them, since the plugin set depends on your build and version. Confirm your version with swanctl --version using the swanctl command overview.

To verify what was negotiated, use the swanctl --list-sas page. Compare the IKE SA line on the working classic tunnel with the failing hybrid one, looking at the key exchange field. The strongSwan FAQ covers the "no proposal chosen" case and fragmentation, and the logging page and retransmission page explain how to capture the logs and timing you need for the comparison. Confirm the exact logging levels and retransmission defaults on your installed version, since the sources list them for the latest release.

For the rules behind the failure messages, read RFC 9370, which requires a responder that cannot choose a non-duplicated algorithm for each proposed key exchange to reject with NO_PROPOSAL_CHOSEN. For fragmentation, read RFC 7383. Confirm that your swanctl.conf and strongswan.conf settings match what you expect, using the swanctl.conf reference and the strongswan.conf reference. If a claim in your own notes cannot be traced to one of these pages, treat it as unverified until you confirm it on the installed version.

What do people ask after a hybrid IPsec tunnel fails?

Is my existing IPsec tunnel still encrypted if the hybrid attempt fails?

Yes, the tunnel that is still up keeps the security association it was built with, and a failed hybrid attempt does not tear it down by itself. The failure only affects new negotiations, such as a rekey or a new connection that offers the hybrid proposal. Check the state of the surviving SA with swanctl --list-sas. The IKE SA line shows the encryption, integrity, PRF and key exchange in use, so you can confirm that the live tunnel still uses a classic key exchange such as CURVE_25519. If the connection that is still up shows only classic values, the traffic on it is protected by those classic values, and you can continue operating while you fix the hybrid proposal.

Is a failed hybrid IPsec tunnel urgent to fix?

How urgent it is depends on your migration schedule, not on the failed attempt itself. If the classic tunnel is still up and you are not yet required to add post-quantum key exchange on that path, the failure is a planning item, not an outage. If your organization has set a date for hybrid key exchange on this gateway, the failure is urgent in proportion to how close that date is. Ask your security or architecture owner for the schedule that applies to this tunnel, then decide whether the fix belongs in the current change window or the next planned one.

Can I silence the IPsec logs that show the hybrid failure?

This is not recommended. The log entries are the evidence you need to compare the failing hybrid negotiation with the working classic one, and silencing them removes the signal you will use to find the cause. If the noise is a real operational problem, reduce it by changing the logging level for the relevant subsystems in charon.filelog rather than disabling output altogether, and restore the default levels once the fix is confirmed. Keep at least one log from the failed attempt, because it is the only record of which proposal the peer rejected and why.

Why does the hybrid tunnel fail now when the classic tunnel worked for years?

The classic tunnel worked because its proposal listed only classic key exchange methods, which the peer already supports. The hybrid attempt fails because someone added an extra key exchange to the proposal, such as x25519-ke1_mlkem768, and the peer either does not implement that method or does not accept the proposal in the order offered. Compare the two proposal lines in swanctl.conf: the hybrid one carries a keX_ part that the classic one omits. Confirm which side changed, because the peer may have been upgraded or the local configuration may have been edited, and both possibilities lead to the same mismatch.

What should I do if I cannot upgrade the peer gateway?

Keep the classic proposal active on this tunnel and plan the change for when the peer can support the hybrid method. A proposal that the peer cannot answer is worse than a classic one, because the negotiation fails and the tunnel may not come up after a rekey. Record the peer's current version and its supported key exchange methods, then schedule the upgrade with the team that owns that gateway. Until then, document the tunnel as classic-only and note the planned change date, so that the next review does not treat it as an unexplained gap.

How do I confirm the peer's real limits before changing my side?

Check the strongSwan version on your side with swanctl --version, then list the loaded algorithms with swanctl --list-algs and confirm that the ML-KEM method you intend to use appears in the dh group. Ask the peer's administrator for the same information on their side. The strongSwan FAQ advises confirming that the peer supports every IKE and ESP algorithm you propose, including key lengths, because a peer that rejects the proposal keeps answering no proposal chosen. Matching the proposal lists on both sides before you make the change prevents most of the guesswork.

When should I bring in outside help for hybrid IPsec failures?

Bring in outside help when many gateways or appliances are involved, because the same proposal mismatch can appear on each one with slightly different logs and configuration. Outside help is also useful when the peer belongs to another organization, when the vendors' implementations differ, or when the change must be documented as evidence for an assessment. DeployOpen plans, implements, tests and documents self-hosted network platforms inside your own infrastructure, and it can review the proposal lists, logs and rollback steps across a fleet. Scope, deliverables and timelines are agreed in writing before work starts, and the quote follows from that scope.

When should a network team bring in outside help with a hybrid tunnel?

Bring in outside help when the work outgrows one team's ability to test and document each change safely. The clearest signal is scale: when one site-to-site tunnel becomes dozens of gateways, appliances or managed services on one or both ends, the comparison described above has to be repeated for each pair, and each pair may run a different strongSwan version, a different plugin set or a different vendor's proposal syntax. A team that can compare one classic tunnel with one hybrid tunnel by hand may not be able to keep those comparisons consistent across a fleet. Ask whether you can state, for every peer, which proposal list it offers, which key exchange it actually negotiated, and which plugin backs it. If you cannot answer that from a current inventory, the work is probably larger than a single engineer's week.

A second signal is a peer you cannot change. If the far end is a managed service, a partner's appliance or a device whose vendor has not released a version that supports the additional key exchange, you cannot make both sides match by editing your own configuration. In that case the realistic options are to hold the tunnel on classic key exchange, to isolate it, or to negotiate a change with the other party. Outside help can map which peers are blocked and which are not, so you can plan around the blocked ones instead of discovering them during a change window. Confirm with each vendor, in its own documentation or support channel, whether a hybrid option exists for the version you run.

The third signal is regulation. If your environment requires documented evidence of each change, its test and its rollback, a fix that works in your lab is only part of the job. Auditors and internal reviewers will ask for the before and after logs, the proposal lists, the test scope and the approval trail for every tunnel. Outside specialists can set up that record, but they do not produce audit reports or certify compliance, and your own assessors decide what the evidence is worth. Agree the evidence format before work starts, and ask for it in writing as part of the scope.

How DeployOpen helps network teams clear a hybrid tunnel failure

DeployOpen starts by capturing a working classic IKEv2 tunnel and a failing hybrid tunnel under the same conditions, then compares proposals, negotiated algorithms and logs side by side. That separates configuration mismatches from path problems such as fragmentation, so the fix targets the actual cause.

How we scope

  • Agree in writing which gateways, peers and tunnels are in scope before any change is made to the configuration.
  • Collect the swanctl.conf proposal lines from both peers for the classic and hybrid connections, so the keX_ differences are documented.
  • Confirm the strongSwan version and loaded plugins on each side with swanctl --version and swanctl --list-algs.

How we build

  • Build a comparison log set with charon.filelog and per-subsystem levels for ike, net, cfg and enc, kept separate for each attempt.
  • Check the negotiated IKE SA line in swanctl --list-sas against the proposal each side offered, to confirm which key exchange was chosen.
  • Test whether IKE_SA_INIT messages carry FRAG_SUP notifies and whether retransmits point to fragmentation or a path MTU limit.

How we hand over

  • Deliver a written comparison of the working and failing attempts, showing each difference and the evidence for it.
  • Document the configuration changes made, with the exact swanctl.conf and strongswan.conf settings and the reason for each.
  • Provide a retest record showing the hybrid tunnel result after changes, alongside the classic baseline for reference.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and retesting are available as a retainer if your tunnels need continued attention.
  • Where the logs point to a vendor or path issue outside your control, we tell you what to raise with that party and what to confirm.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.