FULL AI ANALYSIS

KVM guests suffer one‑way UDP audio loss after nf_conntrack_udp timeout lowered on Linux NAT host

Generated Oct 28, 2026, 9:44:48 AM

Analysis summary

Shortening nf_conntrack_udp_timeout causes NAT mappings to be removed while a flow remains 'idle' longer than the timeout; when remote sends packets after mapping expiry, the host lacks the NAT mapping to forward them to the guest, producing one-way loss. KVM/NAT scenarios rely on conntrack entries to maintain NAT state. Lowering timeout below expected idle intervals for protocols like VoIP or games triggers this behavior. Restoring timeout fixed it, indicating conntrack timeout was causal.

Possible causes

nf_conntrack_udp_timeout set too low causing NAT mapping expiry while remote still sends packets after idle periods

95%

Conntrack table churn due to many short-lived flows combined with aggressive GC causing premature removal

45%

Offloading (GRO/GSO) or iptables conntrack helpers interfering with correct tracking for encapsulated guest packets

30%

Suggested fixes

1

Diagnostic step 1

Increase nf_conntrack_udp_timeout to the upstream default (e.g., 30s) or a value appropriate for the expected idle time of your UDP applications (60–120s for VoIP), then monitor conntrack table size.

2

Diagnostic step 2

If conntrack memory usage is the reason for lowering timeouts, raise nf_conntrack_max and ensure vm.max_map_count and net.netfilter settings allow the larger table, or implement per‑flow keepalive from guests to keep mappings alive.

3

Diagnostic step 3

Consider using hairpin NAT or a routed network for guests to avoid host NAT where possible; migrating guests to a routed setup eliminates NAT mapping expiry issues.

4

Diagnostic step 4

Enable conntrack helper or dedicated rules only where necessary and capture conntrack entries with conntrack -L to validate mapping behavior before/after change. Rollback is simple: restore previous timeout value.