Yunbao VPN

Linux network troubleshooting

Intermittent VPN failures? Read Linux conntrack table pressure

If new connections over a VPN fail intermittently while existing ones continue, check whether Linux conntrack is nearing its limit. This is a clue, not a diagnosis; firewall, routing or remote-network issues can look similar.

Content updated:

What do the conntrack counters mean?

Netfilter connection tracking keeps entries for flows it tracks. The kernel documents nf_conntrack_count as the current number of allocated entries and nf_conntrack_max as the permitted maximum. Not every Linux application or network path necessarily uses the same table, so first identify the host and network namespace involved.

Collect the current values without changing them

These commands only read kernel-exported counters. If the paths are missing or access is denied, record that as unavailable; do not install tools or change modules just for this check.

  1. On the affected Linux host, run:
  2. Read them on the affected host and in the relevant network namespace. Read-only commands: cat /proc/sys/net/netfilter/nf_conntrack_count; cat /proc/sys/net/netfilter/nf_conntrack_max
  3. Read nf_conntrack_count and nf_conntrack_max separately.
  4. Record the time, whether new connections fail, and a second sample shortly afterward.

How to tell whether the count is relevant

Take repeated samples on the same host and in the same network namespace while the failure is happening. If the current count remains near the maximum as new connections fail, give those timestamps to the server administrator to correlate with logs, conntrack and firewall state. A single high ratio does not prove the table caused the failure.

Avoid turning a check into blind tuning

Do not write to nf_conntrack_max, flush the table or disable the firewall just to test a guess. Those changes can affect other connections, and a full table may reflect unusual traffic, cleanup behavior or another policy. Preserve the counters and timestamps first, then let an authorized administrator investigate.

Compare other evidence before continuing

If the count is well below the maximum, continue by checking routing, reverse-path filtering and TCP retransmissions at the relevant stage. A ping or one port result does not fully prove an application tunnel works. Compare the same destination, time window and protocol.

References and further reading

Back to all guides

Ready to connect?

Get the app from the official website and follow the instructions for your device.

Download ↓